File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -743,16 +743,14 @@ void GCS_MAVLINK_Sub::handle_message(const mavlink_message_t &msg)
743743 break ;
744744 }
745745
746- // This adds support for leak detectors in a separate enclosure
747- // connected to a mavlink enabled subsystem
746+ // Remote leak sensor support (e.g. in a separate enclosure), via MAVLink status messages.
748747 case MAVLINK_MSG_ID_SYS_STATUS: {
749- uint32_t MAV_SENSOR_WATER = 0x20000000 ;
750748 mavlink_sys_status_t packet;
751749 mavlink_msg_sys_status_decode (&msg, &packet);
752750 if ((msg.sysid == gcs ().sysid_this_mav ()) &&
753- (packet.onboard_control_sensors_enabled & MAV_SENSOR_WATER ) &&
754- ! (packet.onboard_control_sensors_health & MAV_SENSOR_WATER)
755- ) {
751+ (packet.onboard_control_sensors_present & MAV_SYS_STATUS_EXTENSION_USED ) &&
752+ (packet.onboard_control_sensors_enabled_extended & MAV_SYS_STATUS_SENSOR_LEAK) &&
753+ !(packet. onboard_control_sensors_health_extended & MAV_SYS_STATUS_SENSOR_LEAK) ) {
756754 sub.leak_detector .set_detect ();
757755 }
758756 break ;
You can’t perform that action at this time.
0 commit comments