mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
The implementation before this change had two timeouts, a hard-coded timeout of 0.5 seconds as well as a by param configurable timeout with certain failsafe actions set. This change aims to fix two problems: 1. The hard-coded offboard timeout can be triggered easily with sped up lockstep simulation. Since i t is hard-coded it can't be adapted to the speed factor. 2. The offboard signal can time out but no action will be taken just yet. This means we end up in an in-between stage where no warning or failsafe action has happened yet, even though certain flags are set to a timeout state. This patch aims to fix this by unifying the two timeouts to the existing configurable param. The convoluted double timeout logic is replaced by a simple hysteresis. For anyone that has previously not changed the default timeout param (0), the param will now be changed to 0.5 seconds which reflects the previously hardcoded time. For anyone with a specific timeout configured, the behaviour should remain the same. Also, going forward, timeouts lower than 0.5 seconds should be possible.
38 lines
2.4 KiB
Plaintext
38 lines
2.4 KiB
Plaintext
# This is a struct used by the commander internally.
|
|
|
|
uint64 timestamp # time since system start (microseconds)
|
|
|
|
bool condition_calibration_enabled
|
|
bool condition_system_sensors_initialized
|
|
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_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_power_input_valid # set if input power is valid
|
|
bool condition_battery_healthy # set if battery is available and not low
|
|
bool condition_escs_error # set to true if one or more ESCs reporting esc_status are offline
|
|
bool circuit_breaker_engaged_power_check
|
|
bool circuit_breaker_engaged_airspd_check
|
|
bool circuit_breaker_engaged_enginefailure_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
|
|
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_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 rc_signal_found_once
|
|
bool rc_input_blocked # set if RC input should be ignored temporarily
|
|
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 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
|