Skip to content

Commit 815a2ae

Browse files
committed
Sub: update for sysid_is_gcs()
1 parent 341f9d6 commit 815a2ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ArduSub/GCS_MAVLink_Sub.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void GCS_MAVLINK_Sub::handle_message(const mavlink_message_t &msg)
457457
switch (msg.msgid) {
458458

459459
case MAVLINK_MSG_ID_MANUAL_CONTROL: { // MAV ID: 69
460-
if (msg.sysid != gcs().sysid_gcs()) {
460+
if (!gcs().sysid_is_gcs(msg.sysid)) {
461461
break; // Only accept control from our gcs
462462
}
463463
mavlink_manual_control_t packet;
@@ -493,7 +493,7 @@ void GCS_MAVLINK_Sub::handle_message(const mavlink_message_t &msg)
493493
}
494494

495495
case MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE: { // MAV ID: 70
496-
if (msg.sysid != gcs().sysid_gcs()) {
496+
if (!gcs().sysid_is_gcs(msg.sysid)) {
497497
break; // Only accept control from our gcs
498498
}
499499

ArduSub/failsafe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void Sub::failsafe_gcs_check()
337337
// Send a warning every 30 seconds
338338
if (tnow - failsafe.last_gcs_warn_ms > 30000) {
339339
failsafe.last_gcs_warn_ms = tnow;
340-
gcs().send_text(MAV_SEVERITY_WARNING, "MYGCS: %u, heartbeat lost", unsigned(gcs().sysid_gcs()));
340+
gcs().send_text(MAV_SEVERITY_WARNING, "MYGCS: heartbeat lost");
341341
}
342342

343343
// do nothing if we have already triggered the failsafe action, or if the motors are disarmed

0 commit comments

Comments
 (0)