From 7a72c3b1fb9c10ce1972930e375a6d279b5f501c Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 18 Jul 2017 20:59:02 +1000 Subject: [PATCH] Sub: move try_send_message mission handling up --- ArduSub/GCS_Mavlink.cpp | 20 -------------------- ArduSub/Sub.h | 1 - 2 files changed, 21 deletions(-) diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index a3b8d8d9f2..00b24df989 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -337,11 +337,6 @@ void NOINLINE Sub::send_vfr_hud(mavlink_channel_t chan) climb_rate / 100.0f); } -void NOINLINE Sub::send_current_waypoint(mavlink_channel_t chan) -{ - mavlink_msg_mission_current_send(chan, mission.get_current_nav_index()); -} - /* send RPM packet */ @@ -534,21 +529,11 @@ bool GCS_MAVLINK_Sub::try_send_message(enum ap_message id) send_sensor_offsets(sub.ins, sub.compass, sub.barometer); break; - case MSG_CURRENT_WAYPOINT: - CHECK_PAYLOAD_SIZE(MISSION_CURRENT); - sub.send_current_waypoint(chan); - break; - case MSG_NEXT_PARAM: CHECK_PAYLOAD_SIZE(PARAM_VALUE); queued_param_send(); break; - case MSG_NEXT_WAYPOINT: - CHECK_PAYLOAD_SIZE(MISSION_REQUEST); - queued_waypoint_send(); - break; - case MSG_RANGEFINDER: #if RANGEFINDER_ENABLED == ENABLED CHECK_PAYLOAD_SIZE(RANGEFINDER); @@ -646,11 +631,6 @@ bool GCS_MAVLINK_Sub::try_send_message(enum ap_message id) send_vibration(sub.ins); break; - case MSG_MISSION_ITEM_REACHED: - CHECK_PAYLOAD_SIZE(MISSION_ITEM_REACHED); - mavlink_msg_mission_item_reached_send(chan, mission_item_reached_index); - break; - case MSG_BATTERY_STATUS: send_battery_status(sub.battery); break; diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index 269d5240c0..2cf46f0d80 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -486,7 +486,6 @@ private: void send_hwstatus(mavlink_channel_t chan); void send_radio_out(mavlink_channel_t chan); void send_vfr_hud(mavlink_channel_t chan); - void send_current_waypoint(mavlink_channel_t chan); #if RPM_ENABLED == ENABLED void send_rpm(mavlink_channel_t chan); void rpm_update();