Rover: eliminate gcs_send_mission_item_reached wrapper

This commit is contained in:
Peter Barker 2017-07-08 11:23:25 +10:00 committed by Francisco Ferreira
parent f82fa22833
commit 2692ee22d3
4 changed files with 2 additions and 11 deletions

View File

@ -439,7 +439,7 @@ void Rover::update_current_mode(void)
if (rtl_complete || verify_RTL()) {
// we have reached destination so stop where we are
if (fabsf(g2.motors.get_throttle()) > g.throttle_min.get()) {
gcs_send_mission_item_reached_message(0);
gcs().send_mission_item_reached_message(0);
}
g2.motors.set_throttle(g.throttle_min.get());
g2.motors.set_steering(0.0f);

View File

@ -1592,14 +1592,6 @@ void Rover::mavlink_delay_cb()
in_mavlink_delay = false;
}
/*
* send a mission item reached message and load the index before the send attempt in case it may get delayed
*/
void Rover::gcs_send_mission_item_reached_message(uint16_t mission_index)
{
gcs().send_mission_item_reached_message(mission_index);
}
/*
* send data streams in the given rate range on both links
*/

View File

@ -451,7 +451,6 @@ private:
void send_rangefinder(mavlink_channel_t chan);
void send_current_waypoint(mavlink_channel_t chan);
bool telemetry_delayed(mavlink_channel_t chan);
void gcs_send_mission_item_reached_message(uint16_t mission_index);
void gcs_data_stream_send(void);
void gcs_update(void);
void gcs_retry_deferred(void);

View File

@ -145,7 +145,7 @@ bool Rover::verify_command_callback(const AP_Mission::Mission_Command& cmd)
// send message to GCS
if (cmd_complete) {
gcs_send_mission_item_reached_message(cmd.index);
gcs().send_mission_item_reached_message(cmd.index);
}
return cmd_complete;