diff --git a/libraries/AP_Tuning/AP_Tuning.cpp b/libraries/AP_Tuning/AP_Tuning.cpp index 638c80b3af..83df2e5203 100644 --- a/libraries/AP_Tuning/AP_Tuning.cpp +++ b/libraries/AP_Tuning/AP_Tuning.cpp @@ -189,9 +189,6 @@ void AP_Tuning::check_input(uint8_t flightmode) last_channel_value = chan_value; } - // check for controller error - check_controller_error(); - if (fabsf(chan_value - last_channel_value) < 0.01) { // ignore changes of less than 1% return; @@ -335,19 +332,3 @@ const char *AP_Tuning::get_tuning_name(uint8_t parm) } return "UNKNOWN"; } - -/* - check for controller error - */ -void AP_Tuning::check_controller_error(void) -{ - float err = controller_error(current_parm); - if (err > error_threshold && !mid_point_wait && error_threshold > 0) { - uint32_t now = AP_HAL::millis(); - if (now - last_controller_error_ms > 2000 && hal.util->get_soft_armed()) { - AP_Notify::events.tune_error = 1; - gcs().send_text(MAV_SEVERITY_INFO, "Tuning: error %.2f", (double)err); - last_controller_error_ms = now; - } - } -} diff --git a/libraries/AP_Tuning/AP_Tuning.h b/libraries/AP_Tuning/AP_Tuning.h index 06a7d20d8d..9be466391b 100644 --- a/libraries/AP_Tuning/AP_Tuning.h +++ b/libraries/AP_Tuning/AP_Tuning.h @@ -80,9 +80,6 @@ private: // last flight mode we were tuning in uint8_t last_flightmode; - // last time we reported controller error - uint32_t last_controller_error_ms; - const tuning_set *tuning_sets; const tuning_name *tuning_names; @@ -92,7 +89,6 @@ private: void save_parameters(void); void revert_parameters(void); const char *get_tuning_name(uint8_t parm); - void check_controller_error(void); protected: // virtual functions that must be implemented in vehicle subclass @@ -100,7 +96,6 @@ protected: virtual void save_value(uint8_t parm) = 0; virtual void reload_value(uint8_t parm) = 0; virtual void set_value(uint8_t parm, float value) = 0; - virtual float controller_error(uint8_t parm) = 0; // parmset is in vehicle subclass var table AP_Int16 parmset;