mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Cut case MAVLINK_MSG_ID_HIL_GPS content and paste into handle_message_hil_gps() method.
This commit is contained in:
parent
b705bf6b1c
commit
801cbc856e
@ -332,6 +332,7 @@ private:
|
||||
|
||||
void handle_message(mavlink_message_t *msg);
|
||||
void handle_message_distance_sensor(const mavlink_message_t *msg);
|
||||
void handle_message_hil_gps(const mavlink_message_t *msg);
|
||||
void handle_message_hil_sensor(const mavlink_message_t *msg);
|
||||
void handle_message_hil_state_quaternion(const mavlink_message_t *msg);
|
||||
void handle_message_landing_target(const mavlink_message_t *msg);
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user