Browse Source

Plane: ignore guided cmds from mavlink if we're in avoidADSB.

This change makes it behave like MAVLINK_MSG_ID_SET_POSITION_TARGET_LOCAL_NED
zr-v5.1
Tom Pittenger 5 years ago committed by Andrew Tridgell
parent
commit
87c75332e7
  1. 5
      ArduPlane/GCS_Mavlink.cpp

5
ArduPlane/GCS_Mavlink.cpp

@ -1168,8 +1168,7 @@ void GCS_MAVLINK_Plane::handleMessage(const mavlink_message_t &msg) @@ -1168,8 +1168,7 @@ void GCS_MAVLINK_Plane::handleMessage(const mavlink_message_t &msg)
// in e.g., RTL, CICLE. Specifying a single mode for companion
// computer control is more safe (even more so when using
// FENCE_ACTION = 4 for geofence failures).
if ((plane.control_mode != &plane.mode_guided) &&
(plane.control_mode != &plane.mode_avoidADSB)) { // don't screw up failsafes
if (plane.control_mode != &plane.mode_guided) { // don't screw up failsafes
break;
}
@ -1279,7 +1278,7 @@ void GCS_MAVLINK_Plane::handleMessage(const mavlink_message_t &msg) @@ -1279,7 +1278,7 @@ void GCS_MAVLINK_Plane::handleMessage(const mavlink_message_t &msg)
// in modes such as RTL, CIRCLE, etc. Specifying ONLY one mode
// for companion computer control is more safe (provided
// one uses the FENCE_ACTION = 4 (RTL) for geofence failures).
if (plane.control_mode != &plane.mode_guided && plane.control_mode != &plane.mode_avoidADSB) {
if (plane.control_mode != &plane.mode_guided) {
//don't screw up failsafes
break;
}

Loading…
Cancel
Save