From 59d1367d37a1c5086b4fd0aaf07dc75df6c25715 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Fri, 24 Aug 2012 22:35:21 -0500 Subject: [PATCH] Autotuning: Make the output also follow the hysteresis output --- flight/Modules/Stabilization/relay_tuning.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/Modules/Stabilization/relay_tuning.c b/flight/Modules/Stabilization/relay_tuning.c index 835786a02..5d53aa7d3 100644 --- a/flight/Modules/Stabilization/relay_tuning.c +++ b/flight/Modules/Stabilization/relay_tuning.c @@ -93,7 +93,7 @@ int stabilization_relay_rate(float error, float *output, int axis, bool reinit) RelayTuningSettingsGet(&relaySettings); // Compute output, simple threshold on error - *output = error > 0 ? relaySettings.Amplitude : -relaySettings.Amplitude; + *output = high ? relaySettings.Amplitude : -relaySettings.Amplitude; /**** The code below here is to estimate the properties of the oscillation ****/