mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 07:40:34 +08:00
FD: use flags union instead of bitmask
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
# FailureDetector status
|
||||
uint8 FAILURE_NONE = 0
|
||||
uint8 FAILURE_ROLL = 1 # (1 << 0)
|
||||
uint8 FAILURE_PITCH = 2 # (1 << 1)
|
||||
uint8 FAILURE_ALT = 4 # (1 << 2)
|
||||
uint8 FAILURE_EXT = 8 # (1 << 3)
|
||||
uint8 FAILURE_ARM_ESC = 16 # (1 << 4)
|
||||
uint8 FAILURE_HIGH_WIND = 32 # (1 << 5)
|
||||
uint8 FAILURE_BATTERY = 64 # (1 << 6)
|
||||
uint8 FAILURE_IMBALANCED_PROP = 128 # (1 << 7)
|
||||
|
||||
uint8 failure_status # Bitmask containing FailureDetector status
|
||||
bool fd_roll
|
||||
bool fd_pitch
|
||||
bool fd_alt
|
||||
bool fd_ext
|
||||
bool fd_arm_escs
|
||||
bool fd_high_wind
|
||||
bool fd_battery
|
||||
bool fd_imbalanced_prop
|
||||
|
||||
float32 imbalanced_prop_metric # Metric of the imbalanced propeller check (low-passed)
|
||||
|
||||
Reference in New Issue
Block a user