fw pos ctrl: rework landing abort status

abort boolean and reasons no longer separated, single status field with corresponding abort triggers
This commit is contained in:
Thomas Stastny
2022-07-18 10:51:11 +02:00
committed by Daniel Agar
parent 694d36050a
commit 121cc1fce8
5 changed files with 76 additions and 43 deletions
+11 -6
View File
@@ -1,11 +1,16 @@
uint64 timestamp # [us] time since system start
float32 lateral_touchdown_offset # [m] lateral touchdown position offset manually commanded during landing
bool flaring # true if the aircraft is flaring
bool abort_landing # true if landing should be aborted
int32 abort_reason # the singular abort criterion which triggered the landing abort
# abort status is:
# 0 if not aborted
# >0 if aborted, with the singular abort criterion which triggered the landing abort enumerated by the following abort reasons
uint8 abort_status
# abort reasons
# corresponds to individual bits of param FW_LND_ABORT
uint8 kAbortReasonNone = 0
uint8 kAbortReasonTerrainNotFound = 1 # (1 << 0)
uint8 kAbortReasonTerrainTimeout = 2 # (1 << 1)
# after the manual operator abort, corresponds to individual bits of param FW_LND_ABORT
uint8 kNotAborted = 0
uint8 kAbortedByOperator = 1
uint8 kTerrainNotFound = 2 # FW_LND_ABORT (1 << 0)
uint8 kTerrainTimeout = 3 # FW_LND_ABORT (1 << 1)
uint8 kUnknownAbortCriterion = 4