GCS_MAVLink: Re-enable GPS Injection Packets

This commit is contained in:
Niels Joubert 2015-04-22 16:11:43 -07:00 committed by Andrew Tridgell
parent 704e75d140
commit 2a5b25ddbf
2 changed files with 13 additions and 0 deletions

View File

@ -297,6 +297,8 @@ private:
void handle_set_mode(mavlink_message_t* msg, bool (*set_mode)(uint8_t mode));
void handle_gimbal_report(AP_Mount &mount, mavlink_message_t *msg) const;
void handle_gps_inject(const mavlink_message_t *msg, AP_GPS &gps);
// return true if this channel has hardware flow control
bool have_flow_control(void);
};

View File

@ -787,6 +787,17 @@ mission_ack:
result);
}
void
GCS_MAVLINK::handle_gps_inject(const mavlink_message_t *msg, AP_GPS &gps)
{
mavlink_gps_inject_data_t packet;
mavlink_msg_gps_inject_data_decode(msg, &packet);
//TODO: check target
gps.inject_data(packet.data, packet.len);
}
// send a message using mavlink, handling message queueing
void GCS_MAVLINK::send_message(enum ap_message id)
{