Skip to content

Add many more commands#355

Open
JohnAZoidberg wants to merge 9 commits into
mainfrom
ectool
Open

Add many more commands#355
JohnAZoidberg wants to merge 9 commits into
mainfrom
ectool

Conversation

@JohnAZoidberg

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
> framework_tool --protoinfo
Protocol info:
  protocol versions: 3
  max request:   256 bytes
  max response:  256 bytes
  flags: 0x00000000

Signed-off-by: Daniel Schaefer <dhs@frame.work>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands framework_tool with several additional EC-focused commands (thermal threshold get/set, basic EC “hello”, protocol info, switch state, port 80 history, and panic info), wiring them through the CLI (both clap and UEFI parsing), EC host-command layer, and shell completions, plus updating example documentation accordingly.

Changes:

  • Add new EC host commands and higher-level helpers for thermal thresholds, port 80 history, and panic info decoding/printing.
  • Extend command-line parsing/execution paths to expose new commands (--thermalget, --thermalset, --hello, --protoinfo, --switches, --port80read, --panicinfo).
  • Update bash/fish/zsh completions and refresh docs/examples for the new/updated outputs.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
framework_tool/completions/zsh/_framework_tool Adds new flags to zsh completion definitions.
framework_tool/completions/fish/framework_tool.fish Adds new flags to fish completions.
framework_tool/completions/bash/framework_tool Adds new flags and arg completion handling to bash completions.
framework_lib/src/power.rs Adds thermal threshold get/set and switch printing; refactors thermal sensor display.
framework_lib/src/commandline/uefi.rs Adds new option fields and parsing for UEFI mode.
framework_lib/src/commandline/mod.rs Wires new CLI flags to EC operations; adds port 80 history printing and selftest hello check.
framework_lib/src/commandline/clap_std.rs Adds clap definitions for new flags and maps them into the shared Cli.
framework_lib/src/chromium_ec/panic.rs New module to decode/print EC panic data with tests.
framework_lib/src/chromium_ec/mod.rs Exposes new panic module and adds EC methods for new host commands.
framework_lib/src/chromium_ec/commands.rs Defines request/response structs/constants for new EC commands.
framework_lib/src/chromium_ec/command.rs Extends EcCommands enum with new command IDs.
EXAMPLES.md Updates thermal examples and adds thermalget/thermalset examples.
EXAMPLES_ADVANCED.md Adds new advanced usage examples for switches/port80read/panicinfo.
Comments suppressed due to low confidence (1)

EXAMPLES.md:492

  • This example block still contains unresolved Git merge-conflict markers (<<<<<<< / ======= / >>>>>>>), which will render the markdown broken and confusing for readers. Resolve the conflict and keep a single, consistent example output.
<<<<<<< HEAD
  F75303_Local: 43 C
  F75303_CPU:   44 C
  F75303_DDR:   39 C
  APU:          62 C

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread framework_lib/src/power.rs Outdated
Comment thread framework_lib/src/power.rs
Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
Show thermal thresholds

Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
We can figure them out from EC_CMD_TEMP_SENSOR_GET_INFO

Signed-off-by: Daniel Schaefer <dhs@frame.work>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

'--device=[]:DEVICE:(bios ec pd0 pd1 rtm01 rtm23 ac-left ac-right)' \
'--compare-version=[]:COMPARE_VERSION:_default' \
'--smartbattery=[Show detailed smart battery information, or load from dump file]::FILE:_files' \
'*--thermalset=[Set thermal thresholds of a sensor in degrees Celsius\: <SENSOR> <WARN> \[<HIGH> \[<HALT> \[<FAN_OFF> \[<FAN_MAX>\]\]\]\] (-1 keeps the current threshold, 0 disables it)]:THERMALSET:_default:THERMALSET:_default' \
Comment thread framework_tool/completions/bash/framework_tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants