-
Notifications
You must be signed in to change notification settings - Fork 9
Add finite state machine diagram for ModeManager Safe Mode transitions #305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Mikefly123 <61564344+Mikefly123@users.noreply.github.com>
Co-authored-by: Mikefly123 <61564344+Mikefly123@users.noreply.github.com>
|
@copilot check that you are using the right escape character for mermaid diagrams. The |
Co-authored-by: Mikefly123 <61564344+Mikefly123@users.noreply.github.com>
Fixed in commit 81d1029. Replaced all |
|
LGTM! Also tested claude code to conduct review, nothing major was found. |
ineskhou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One correction, one nitpick
|
|
||
| #### Entry Actions | ||
| When entering SAFE_MODE, the ModeManager: | ||
| 1. Executes the safe mode radio sequence (`/seq/radio_enter_safe.bin`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the last Pr this has changed to enter_safe.bin -- in hindsight mayeb we want to change it back since radio_enter_safe is what the 3 sats in space are expecting? Either we shoudl change this docs or the parameter default name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to /seq/enter_safe.bin in commit 0c807d5.
| | `GROUND_COMMAND` | ❌ No | Operator explicitly commanded safe mode; requires operator approval to exit | | ||
| | `EXTERNAL_REQUEST` | ❌ No | Another component detected a fault; requires component-specific recovery | | ||
| | `LORA` | ❌ No | Communication fault may indicate antenna deployment issue or ground station unavailability | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick but this ia bit repetitive id put any info not in Entry Transitions: NORMAL → SAFE_MODE in that section and remove this seciotn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the redundant "Event Notifications" section in commit 0c807d5. All event information is now consolidated into the Entry Actions and Exit Actions sections where they're more contextually relevant.
Co-authored-by: Mikefly123 <61564344+Mikefly123@users.noreply.github.com>
ineskhou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Code reviewFound 2 issues:
proves-core-reference/FprimeZephyrReference/Components/ModeManager/docs/safe-mode-fsm.md Lines 70 to 84 in 0c807d5
proves-core-reference/docs-site/components/ModeManager.md Lines 185 to 189 in 0c807d5
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't know if the above is still necessary, this was generated by claude code
Description
Added comprehensive FSM documentation for ModeManager Safe Mode behavior. The diagram captures all state transitions, triggers, and recovery logic in a single reference.
New Document:
FprimeZephyrReference/Components/ModeManager/docs/safe-mode-fsm.mdLOW_BATTERY(auto, debounced),SYSTEM_FAULT(boot detection),GROUND_COMMAND,EXTERNAL_REQUEST,LORA/seq/enter_safe.bin\nwith<br/>for proper line break renderingUpdated:
docs-site/components/ModeManager.md- added link to FSM documentDocumentation Structure:
Related Issues/Tickets
How Has This Been Tested?
Screenshots / Recordings (if applicable)
N/A - Documentation only
Checklist
Further Notes / Considerations
The FSM diagram consolidates information scattered across code, existing docs, and tests into a single visual reference. Particularly valuable for understanding:
The Mermaid diagram uses proper HTML
<br/>tags for multi-line transition labels to ensure correct rendering in documentation viewers.The documentation is organized to minimize redundancy by integrating event notifications directly into the Entry Actions and Exit Actions sections where they naturally occur, rather than maintaining a separate Event Notifications section.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.