You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a proposal for how to do basic mode management:
1) FPP updates - Add a new SpacecraftModeenumeration that lives in the project config directory. That allows projects to customize it to modes they like. For instance:
Define a port type that allows getting the current mode (SpacecraftModeGet) for command checking, and setting (SpacecraftModeSet) for components (like fault protection) to set the mode.
2) FPP Autocoder
For commands that have the modes attribute, add a call to generated code to check the spacecraft mode via the SpacecraftModeGet port prior to executing the command.
3) Components: Write a basic SpacecraftMode component. This component would implement the SpacecraftModeGet and SpacecraftModeSet ports to store the current spacecraft mode. It would have commands to set the mode for ground operators.
If projects wanted more sophisticated mode management, they could implement their own component with SpacecraftModeGet and SpacecraftModeSet ports, but the above would provide a basic implementation.
This could also be wired into the basic fault protection component as a mode switch due to a fault.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a follow-up to this discussion.
Here is a proposal for how to do basic mode management:
1) FPP updates - Add a new
SpacecraftMode
enumeration that lives in the project config directory. That allows projects to customize it to modes they like. For instance:Add an optional
modes
attribute to commands that specify a set of modes where the command is valid. For instance:Define a port type that allows getting the current mode (
SpacecraftModeGet
) for command checking, and setting (SpacecraftModeSet
) for components (like fault protection) to set the mode.2) FPP Autocoder
For commands that have the
modes
attribute, add a call to generated code to check the spacecraft mode via theSpacecraftModeGet
port prior to executing the command.3) Components: Write a basic
SpacecraftMode
component. This component would implement theSpacecraftModeGet
andSpacecraftModeSet
ports to store the current spacecraft mode. It would have commands to set the mode for ground operators.If projects wanted more sophisticated mode management, they could implement their own component with
SpacecraftModeGet
andSpacecraftModeSet
ports, but the above would provide a basic implementation.This could also be wired into the basic fault protection component as a mode switch due to a fault.
Beta Was this translation helpful? Give feedback.
All reactions