Skip to content

Add POWER_CONFIG power FSM state; raise McuProtocolError on unknown state - #7

Merged
pwittich merged 1 commit into
mainfrom
fix/power-config-state
Oct 20, 2026
Merged

pwittich merged 1 commit into
mainfrom
fix/power-config-state

Conversation

@pwittich

Copy link
Copy Markdown
Contributor

Firmware PR apollo-lhc/cm_mcu#316 adds a new power FSM state, POWER_CONFIG (11), which runs during LGA80D init on each power-up. PowerFsmState stopped at 10, so a read_power() during that window raised a bare ValueError. This adds POWER_CONFIG = 11. If the firmware reports a state the enum still doesn't know, read_power() now raises McuProtocolError with a message naming the raw value. A new wire-contract test checks PowerFsmState against the firmware's X_MACRO_PS_SYSTEM_STATES list in Tasks.h, so the two can't drift apart silently again. Like the other wire-contract tests, it is skipped in CI, and it fails locally until #316 is merged into cm_mcu master. The change is backward-compatible with current firmware, so it is safe to merge before #316.

@pwittich pwittich changed the title Add POWER_CONFIG power FSM state; raise McuProtocolError on unknown s… Add POWER_CONFIG power FSM state; raise McuProtocolError on unknown state Oct 20, 2026
@pwittich
pwittich merged commit 64bbacf into main Oct 20, 2026
3 checks passed
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.

1 participant