mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-09 04:31:37 +08:00
commander: cleanup mavlink system present and validity checks
- try to handle mavlink system validity and present checks more consistently - telemetry_status unify heartbeats and healthy flags across MAV_TYPE and MAV_COMPONENT (once it's outside of mavlink we don't care about the difference) - add gimbal
This commit is contained in:
committed by
Matthias Grob
parent
47fcdb1fdb
commit
e389d6ffbb
+34
-21
@@ -37,25 +37,38 @@ float32 rx_message_lost_rate
|
||||
|
||||
uint64 HEARTBEAT_TIMEOUT_US = 1500000 # Heartbeat timeout 1.5 seconds
|
||||
|
||||
# Heartbeats per type
|
||||
bool heartbeat_type_antenna_tracker # MAV_TYPE_ANTENNA_TRACKER
|
||||
bool heartbeat_type_gcs # MAV_TYPE_GCS
|
||||
bool heartbeat_type_onboard_controller # MAV_TYPE_ONBOARD_CONTROLLER
|
||||
bool heartbeat_type_gimbal # MAV_TYPE_GIMBAL
|
||||
bool heartbeat_type_adsb # MAV_TYPE_ADSB
|
||||
bool heartbeat_type_camera # MAV_TYPE_CAMERA
|
||||
bool heartbeat_type_parachute # MAV_TYPE_PARACHUTE
|
||||
# Heartbeats
|
||||
bool heartbeat_adsb # MAV_TYPE_ADSB
|
||||
bool heartbeat_antenna_tracker # MAV_TYPE_ANTENNA_TRACKER
|
||||
bool heartbeat_battery # MAV_TYPE_BATTERY
|
||||
bool heartbeat_camera # MAV_TYPE_CAMERA
|
||||
bool heartbeat_gcs # MAV_TYPE_GCS
|
||||
bool heartbeat_gimbal # MAV_TYPE_GIMBAL
|
||||
bool heartbeat_log # MAV_COMP_ID_LOG
|
||||
bool heartbeat_obstacle_avoidance # MAV_COMP_ID_OBSTACLE_AVOIDANCE
|
||||
bool heartbeat_onboard_controller # MAV_TYPE_ONBOARD_CONTROLLER
|
||||
bool heartbeat_osd # MAV_COMP_ID_OSD
|
||||
bool heartbeat_pairing_manager # MAV_COMP_ID_PAIRING_MANAGER
|
||||
bool heartbeat_parachute # MAV_TYPE_PARACHUTE
|
||||
bool heartbeat_telemetry_radio # MAV_COMP_ID_TELEMETRY_RADIO
|
||||
bool heartbeat_uart_bridge # MAV_COMP_ID_UART_BRIDGE
|
||||
bool heartbeat_udp_bridge # MAV_COMP_ID_UDP_BRIDGE
|
||||
bool heartbeat_vio # MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY
|
||||
|
||||
# Heartbeats per component
|
||||
bool heartbeat_component_telemetry_radio # MAV_COMP_ID_TELEMETRY_RADIO
|
||||
bool heartbeat_component_log # MAV_COMP_ID_LOG
|
||||
bool heartbeat_component_osd # MAV_COMP_ID_OSD
|
||||
bool heartbeat_component_obstacle_avoidance # MAV_COMP_ID_OBSTACLE_AVOIDANCE
|
||||
bool heartbeat_component_vio # MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY
|
||||
bool heartbeat_component_pairing_manager # MAV_COMP_ID_PAIRING_MANAGER
|
||||
bool heartbeat_component_udp_bridge # MAV_COMP_ID_UDP_BRIDGE
|
||||
bool heartbeat_component_uart_bridge # MAV_COMP_ID_UART_BRIDGE
|
||||
|
||||
# Misc component health
|
||||
bool avoidance_system_healthy
|
||||
bool parachute_system_healthy
|
||||
# system status healthy
|
||||
bool system_healthy_adsb
|
||||
bool system_healthy_antenna_tracker
|
||||
bool system_healthy_battery
|
||||
bool system_healthy_camera
|
||||
bool system_healthy_gcs
|
||||
bool system_healthy_gimbal
|
||||
bool system_healthy_log
|
||||
bool system_healthy_obstacle_avoidance
|
||||
bool system_healthy_onboard_controller
|
||||
bool system_healthy_osd
|
||||
bool system_healthy_pairing_manager
|
||||
bool system_healthy_parachute
|
||||
bool system_healthy_telemetry_radio
|
||||
bool system_healthy_uart_bridge
|
||||
bool system_healthy_udp_bridge
|
||||
bool system_healthy_vio
|
||||
|
||||
@@ -36,8 +36,16 @@ bool vtol_transition_failure # Set to true if vtol transi
|
||||
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 system_required_obstacle_avoidance # Set to true if avoidance system is enabled via COM_OBS_AVOID parameter
|
||||
|
||||
bool parachute_system_present
|
||||
bool parachute_system_healthy
|
||||
bool system_present_gcs
|
||||
bool system_present_gimbal
|
||||
bool system_present_obstacle_avoidance
|
||||
bool system_present_onboard_controller
|
||||
bool system_present_parachute
|
||||
|
||||
bool system_valid_gcs
|
||||
bool system_valid_gimbal
|
||||
bool system_valid_obstacle_avoidance
|
||||
bool system_valid_onboard_controller
|
||||
bool system_valid_parachute
|
||||
|
||||
Reference in New Issue
Block a user