Repository navigation
--thermal: Hide AP throttle status when unsupported by EC - #410
Merged
JohnAZoidberg merged 1 commit intoDec 6, 2026
Conversation
Instead of silently swallowing `get_ap_throttle_status()` errors via `.ok()` and printing `AP Throttle Status: Unknown` on platforms whose EC firmware does not implement `0x3E22`, distinguish `InvalidCommand` (logged at debug level) from unexpected errors (logged at warn level) and only print the AP Throttle Status section when supported—logging `Not supported` at info level like absent fans. Fixes FrameworkComputer#386
JohnAZoidberg
force-pushed
the
fix/issue-386-thermal-throttle-unsupported
branch
from
December 6, 2026 15:07
24dd336 to
23ac5ae
Compare
JohnAZoidberg
approved these changes
Dec 6, 2026
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.
Summary
Keeps
ThermalInfo.throttle: Option<ApThrottleInfo>unchanged so the publicframework_libAPI is preserved and matchesFanSpeed::NotPresent(logged atinfo!, hidden by default).Evidence
EC_CMD_GET_AP_THROTTLE_STATUS(0x3E22),get_ap_throttle_status()returnedErr(InvalidCommand)which was silently discarded via.ok(), causing--thermalto printAP Throttle Status/Unknown.cargo fmt --all -- --check— passcargo clippy -p framework_lib -p framework_tool -- -D warnings— passcargo test -p framework_lib -p framework_tool— 65 passed, 0 failed (including newdecode_ap_throttle_supportedanddecode_ap_throttle_unsupported_and_errors), 2 doc-tests passedcargo check -p framework_lib --target x86_64-unknown-uefi --no-default-features --features uefi— passRUSTDOCFLAGS="-Dwarnings" cargo doc --no-deps— passMerge Danger
Door: Two-way
Blast Radius: Low — isolated to
framework_lib/src/power.rs(get_thermal/print_thermal); no public struct or CLI flag changes.Fixes #386