FW Launch Detection: refactor state machine and pubish launch_detection_status message

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-11-25 18:45:36 +01:00
parent 35da7f9bc4
commit 90e1f98c57
7 changed files with 109 additions and 58 deletions
+9
View File
@@ -0,0 +1,9 @@
# Status of the launch detection state machine (fixed-wing only)
uint64 timestamp # time since system start (microseconds)
uint8 STATE_WAITING_FOR_LAUNCH = 0 # waiting for launch
uint8 STATE_LAUNCH_DETECTED_DISABLED_MOTOR = 1 # launch detected, but keep motor(s) disabled (e.g. because it can't spin freely while on catapult)
uint8 STATE_FLYING = 2 # launch detected, use normal takeoff/flying configuration
uint8 launch_detection_state