mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: Re-enable GPS Injection Packets
This commit is contained in:
parent
704e75d140
commit
2a5b25ddbf
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue