commander: rework arming checks to use the events interface

This commit is contained in:
Beat Küng
2022-08-25 22:02:15 -04:00
committed by Daniel Agar
parent b4a3597c7d
commit 6d1fb92eb7
70 changed files with 3738 additions and 2423 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ uint8[25] arguments # (optional) arguments, depend on event id
uint8 log_levels # Log levels: 4 bits MSB: internal, 4 bits LSB: external
uint8 ORB_QUEUE_LENGTH = 8
uint8 ORB_QUEUE_LENGTH = 16
+19
View File
@@ -113,3 +113,22 @@ uint64 onboard_control_sensors_health
bool safety_button_available # Set to true if a safety button is connected
bool safety_off # Set to true if safety is off
bool auto_mission_available
bool power_input_valid # set if input power is valid
bool usb_connected # set to true (never cleared) once telemetry received from usb link
bool parachute_system_present
bool parachute_system_healthy
bool avoidance_system_required # Set to true if avoidance system is enabled via COM_OBS_AVOID parameter
bool avoidance_system_valid # Status of the obstacle avoidance system
bool battery_healthy # set if battery is available and not low
bool circuit_breaker_engaged_power_check
bool circuit_breaker_engaged_airspd_check
bool circuit_breaker_flight_termination_disabled
bool circuit_breaker_engaged_usb_check
bool circuit_breaker_vtol_fw_arming_check # set to true if for VTOLs arming in fixed-wing mode should be allowed
+15 -18
View File
@@ -1,7 +1,21 @@
# This is a struct used by the commander internally.
# TODO: rename to failsafe_flags (will be input to failsafe state machine)
#
uint64 timestamp # time since system start (microseconds)
# Per-mode requirements
uint32 mode_req_angular_velocity
uint32 mode_req_attitude
uint32 mode_req_local_position
uint32 mode_req_global_position
uint32 mode_req_local_alt
uint32 mode_req_mission
uint32 mode_req_offboard_signal
uint32 mode_req_home_position
uint32 mode_req_prevent_arming # if set, cannot arm while in this mode
uint32 mode_req_other # other requirements, not covered above (for external modes)
bool calibration_enabled
bool pre_flight_checks_pass # true if all checks necessary to arm pass
bool auto_mission_available
@@ -13,8 +27,6 @@ bool local_velocity_valid # set to true by the commander app if the quality of
bool 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 gps_position_valid
bool home_position_valid # indicates a valid home position (a valid home position is not always a valid launch)
bool power_input_valid # set if input power is valid
bool battery_healthy # set if battery is available and not low
bool escs_error # set to true if one or more ESCs reporting esc_status are offline
bool escs_failure # set to true if one or more ESCs reporting esc_status has a failure
@@ -23,25 +35,10 @@ bool position_reliant_on_optical_flow
bool position_reliant_on_vision_position
bool dead_reckoning
bool flight_terminated
bool circuit_breaker_engaged_power_check
bool circuit_breaker_engaged_airspd_check
bool circuit_breaker_flight_termination_disabled
bool circuit_breaker_engaged_usb_check
bool circuit_breaker_vtol_fw_arming_check # set to true if for VTOLs arming in fixed-wing mode should be allowed
bool offboard_control_signal_lost
bool rc_signal_found_once
bool rc_calibration_in_progress
bool rc_calibration_valid # set if RC calibration is valid
bool vtol_transition_failure # Set to true if vtol transition failed
bool usb_connected # status of the USB power supply
bool sd_card_detected_once # set to true if the SD card was detected
bool avoidance_system_required # Set to true if avoidance system is enabled via COM_OBS_AVOID parameter
bool avoidance_system_valid # Status of the obstacle avoidance system
bool parachute_system_present
bool parachute_system_healthy