mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 04:40:35 +08:00
Cut case MAVLINK_MSG_ID_HIL_GPS content and paste into handle_message_hil_gps() method.
This commit is contained in:
@@ -310,14 +310,7 @@ void Simulator::handle_message(mavlink_message_t *msg)
|
||||
break;
|
||||
|
||||
case MAVLINK_MSG_ID_HIL_GPS:
|
||||
mavlink_hil_gps_t gps_sim;
|
||||
mavlink_msg_hil_gps_decode(msg, &gps_sim);
|
||||
|
||||
if (_publish) {
|
||||
//PX4_WARN("FIXME: Need to publish GPS topic. Not done yet.");
|
||||
}
|
||||
|
||||
update_gps(&gps_sim);
|
||||
handle_message_hil_gps(msg);
|
||||
break;
|
||||
|
||||
case MAVLINK_MSG_ID_RC_CHANNELS:
|
||||
@@ -351,6 +344,18 @@ void Simulator::handle_message_distance_sensor(const mavlink_message_t *msg)
|
||||
publish_distance_topic(&dist);
|
||||
}
|
||||
|
||||
void Simulator::handle_message_hil_gps(const mavlink_message_t *msg)
|
||||
{
|
||||
mavlink_hil_gps_t gps_sim;
|
||||
mavlink_msg_hil_gps_decode(msg, &gps_sim);
|
||||
|
||||
if (_publish) {
|
||||
//PX4_WARN("FIXME: Need to publish GPS topic. Not done yet.");
|
||||
}
|
||||
|
||||
update_gps(&gps_sim);
|
||||
}
|
||||
|
||||
void Simulator::handle_message_hil_sensor(const mavlink_message_t *msg)
|
||||
{
|
||||
mavlink_hil_sensor_t imu;
|
||||
|
||||
Reference in New Issue
Block a user