mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 00:41:36 +08:00
filter gps simulation hil gps message with sysid
This commit is contained in:
@@ -182,7 +182,7 @@ MavlinkReceiver::handle_message(mavlink_message_t *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (_mavlink->get_hil_enabled() || _mavlink->get_use_hil_gps()) {
|
if (_mavlink->get_hil_enabled() || (_mavlink->get_use_hil_gps() && msg->sysid == mavlink_system.sysid)) {
|
||||||
switch (msg->msgid) {
|
switch (msg->msgid) {
|
||||||
case MAVLINK_MSG_ID_HIL_GPS:
|
case MAVLINK_MSG_ID_HIL_GPS:
|
||||||
handle_message_hil_gps(msg);
|
handle_message_hil_gps(msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user