Sub: Remove DISALLOW_GCS_MODE_CHANGE_DURING_RC_FAILSAFE

This commit is contained in:
Jacob Walser 2017-04-06 17:48:39 -04:00
parent 1bd6480a41
commit 6a80fe3c22
2 changed files with 0 additions and 10 deletions

View File

@ -19,7 +19,6 @@
//#define AC_RALLY ENABLED // enable rally points library
//#define AC_TERRAIN ENABLED // enable terrain library (Must also enable Rally)
//#define OPTFLOW ENABLED // enable optical flow sensor support
//#define DISALLOW_GCS_MODE_CHANGE_DURING_RC_FAILSAFE // disable mode changes from GCS during Radio failsafes. Avoids a race condition for vehicle like Solo in which the RC and telemetry travel along the same link
// User Hooks : For User Developed code that you wish to run
// Put your variable definitions into the UserVariables.h file (or another file name and then change the #define below).

View File

@ -923,16 +923,7 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
}
case MAVLINK_MSG_ID_SET_MODE: { // MAV ID: 11
#ifdef DISALLOW_GCS_MODE_CHANGE_DURING_RC_FAILSAFE
if (!sub.failsafe.manual_control) {
handle_set_mode(msg, FUNCTOR_BIND(&sub, &Sub::gcs_set_mode, bool, uint8_t));
} else {
// don't allow mode changes while in radio failsafe
mavlink_msg_command_ack_send_buf(msg, chan, MAVLINK_MSG_ID_SET_MODE, MAV_RESULT_FAILED);
}
#else
handle_set_mode(msg, FUNCTOR_BIND(&sub, &Sub::gcs_set_mode, bool, uint8_t));
#endif
break;
}