From 5e80f0cf7292ebc9b1b5b8ce8e561c6072280550 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 14 Aug 2014 16:03:23 +1000 Subject: [PATCH] APM_Control: allow for multiple stop calls in autotune --- libraries/APM_Control/AP_AutoTune.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/APM_Control/AP_AutoTune.cpp b/libraries/APM_Control/AP_AutoTune.cpp index e3165593c8..3f972eb894 100644 --- a/libraries/APM_Control/AP_AutoTune.cpp +++ b/libraries/APM_Control/AP_AutoTune.cpp @@ -150,8 +150,10 @@ void AP_AutoTune::start(void) */ void AP_AutoTune::stop(void) { - running = false; - save_gains(restore); + if (running) { + running = false; + save_gains(restore); + } }