From f2b1387c1ccac7af60f255178f11fc5462935279 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 4 Aug 2018 12:12:40 +1000 Subject: [PATCH] RC_Channel: add AUTOTUNE to init_aux_function routine Also, cark it in SITL if we fail to initialise an aux function --- ArduCopter/RC_Channel.cpp | 1 + libraries/RC_Channel/RC_Channel.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ArduCopter/RC_Channel.cpp b/ArduCopter/RC_Channel.cpp index a0d45b0065..a5ec2d6c10 100644 --- a/ArduCopter/RC_Channel.cpp +++ b/ArduCopter/RC_Channel.cpp @@ -93,6 +93,7 @@ void RC_Channel_Copter::init_aux_function(const aux_func_t ch_option, const aux_ case SAVE_WP: case RESETTOARMEDYAW: case AUTO: + case AUTOTUNE: break; default: RC_Channel::init_aux_function(ch_option, ch_flag); diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 80abef9e71..5fe41c89eb 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -432,6 +432,9 @@ void RC_Channel::init_aux_function(const aux_func_t ch_option, const aux_switch_ break; default: gcs().send_text(MAV_SEVERITY_WARNING, "Failed to initialise RC function (%u)", ch_option); +#if CONFIG_HAL_BOARD == HAL_BOARD_SITL + AP_HAL::panic("Initialisation failed"); +#endif break; } }