Repository navigation
Add POWER_CONFIG power FSM state; raise McuProtocolError on unknown state - #7
Merged
Merged
Conversation
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.
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.