Add many more commands#355
Open
JohnAZoidberg wants to merge 9 commits into
Open
Conversation
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>
b44de05 to
ca02e07
Compare
There was a problem hiding this comment.
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.
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>
| '--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' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.