commander log full status flags

This commit is contained in:
Daniel Agar
2018-01-28 19:28:32 +01:00
committed by Lorenz Meier
parent dc2d6e8aab
commit 8b0ba3c34c
5 changed files with 59 additions and 228 deletions
+31 -57
View File
@@ -1,61 +1,35 @@
# define mask for conditions flags
uint16 CONDITION_CALIBRATION_ENABLE_MASK = 1
uint16 CONDITION_SYSTEM_SENSORS_INITIALIZED_MASK = 2
uint16 CONDITION_SYSTEM_PREARM_ERROR_REPORTED_MASK = 4
uint16 CONDITION_SYSTEM_HOTPLUG_TIMEOUT_MASK = 8
uint16 CONDITION_SYSTEM_RETURNED_TO_HOME_MASK = 16
uint16 CONDITION_AUTO_MISSION_AVAILABLE_MASK = 32
uint16 CONDITION_GLOBAL_POSITION_VALID_MASK = 64
uint16 CONDITION_HOME_POSITION_VALID_MASK = 128
uint16 CONDITION_LOCAL_POSITION_VALID_MASK = 256
uint16 CONDITION_LOCAL_ALTITUDE_VALID_MASK = 512
uint16 CONDITION_AIRSPEED_VALID_MASK = 1024
uint16 CONDITION_POWER_INPUT_VALID_MASK = 2048
# uint16 reserved for future implementation
# uint16 reserved for future implementation
# uint16 reserved for future implementation
# uint16 reserved for future implementation
# This is a struct used by the commander internally.
uint16 conditions
bool condition_calibration_enabled
bool condition_system_sensors_initialized
bool condition_system_prearm_error_reported # true if errors have already been reported
bool condition_system_hotplug_timeout # true if the hotplug sensor search is over
bool condition_system_returned_to_home
bool condition_auto_mission_available
bool condition_global_position_valid # set to true by the commander app if the quality of the global position estimate is good enough to use for navigation
bool condition_global_velocity_valid # set to true by the commander app if the quality of the global horizontal velocity data is good enough to use for navigation
bool condition_home_position_valid # indicates a valid home position (a valid home position is not always a valid launch)
bool condition_local_position_valid # set to true by the commander app if the quality of the local position estimate is good enough to use for navigation
bool condition_local_velocity_valid # set to true by the commander app if the quality of the local horizontal velocity data is good enough to use for navigation
bool condition_local_altitude_valid
bool condition_airspeed_valid # set to true by the commander app if there is a valid airspeed measurement available
bool condition_power_input_valid # set if input power is valid
# define mask for circuit breaker flags
uint8 CIRCUIT_BREAKER_ENGAGED_POWER_CHECK_MASK = 1
uint8 CIRCUIT_BREAKER_ENGAGED_AIRSPD_CHECK_MASK = 2
uint8 CIRCUIT_BREAKER_ENGAGED_ENGINEFAILURE_CHECK_MASK = 4
uint8 CIRCUIT_BREAKER_ENGAGED_GPSFAILURE_CHECK_MASK = 8
uint8 CIRCUIT_BREAKER_FLIGHT_TERMINATION_DISABLED_MASK = 16
uint8 CIRCUIT_BREAKER_ENGAGED_USB_CHECK_MASK = 32
bool circuit_breaker_engaged_power_check
bool circuit_breaker_engaged_airspd_check
bool circuit_breaker_engaged_enginefailure_check
bool circuit_breaker_engaged_gpsfailure_check
bool circuit_breaker_flight_termination_disabled
bool circuit_breaker_engaged_usb_check
bool circuit_breaker_engaged_posfailure_check # set to true when the position valid checks have been disabled
# 0x0001 circuit_breaker_engaged_power_check
# 0x0002 circuit_breaker_engaged_airspd_check
# 0x0004 circuit_breaker_engaged_enginefailure_check
# 0x0008 circuit_breaker_engaged_gpsfailure_check
# 0x0010 circuit_breaker_flight_termination_disabled
# 0x0020 circuit_breaker_engaged_usb_check
bool offboard_control_signal_found_once
bool offboard_control_signal_lost
bool offboard_control_set_by_command # true if the offboard mode was set by a mavlink command and should not be overridden by RC
bool offboard_control_loss_timeout # true if offboard is lost for a certain amount of time
uint8 circuit_breakers
# define mask for other flags
uint16 USB_CONNECTED_MASK = 1
uint16 OFFBOARD_CONTROL_SIGNAL_FOUND_ONCE_MASK = 2
uint16 OFFBOARD_CONTROL_SIGNAL_LOST_MASK = 4
uint16 OFFBOARD_CONTROL_SIGNAL_WEAK_MASK = 8
uint16 OFFBOARD_CONTROL_SET_BY_COMMAND_MASK = 16
uint16 OFFBOARD_CONTROL_LOSS_TIMEOUT_MASK = 32
uint16 RC_SIGNAL_FOUND_ONCE_MASK = 64
uint16 RC_INPUT_BLOCKED_MASK = 256
uint16 VTOL_TRANSITION_FAILURE_MASK = 1024
uint16 GPS_FAILURE_MASK = 4096
# 0x0001 usb_connected: status of the USB power supply
# 0x0002 offboard_control_signal_found_once
# 0x0004 offboard_control_signal_lost
# 0x0008 offboard_control_signal_weak
# 0x0010 offboard_control_set_by_command: true if the offboard mode was set by a mavlink command and should not be overridden by RC
# 0x0020 offboard_control_loss_timeout: true if offboard is lost for a certain amount of time
# 0x0040 rc_signal_found_once
# 0x0100 rc_input_blocked: set if RC input should be ignored temporarily
# 0x0400 vtol_transition_failure: Set to true if vtol transition failed
# 0x1000 gps_failure: Set to true if a gps failure is detected
uint16 other_flags
bool rc_signal_found_once
bool rc_input_blocked # set if RC input should be ignored temporarily
bool vtol_transition_failure # Set to true if vtol transition failed
bool gps_failure # Set to true if a gps failure is detected
bool usb_connected # status of the USB power supply