diff --git a/src/main/flight/autotune.c b/src/main/flight/autotune.c index 029e23c5ba..9d3135e294 100644 --- a/src/main/flight/autotune.c +++ b/src/main/flight/autotune.c @@ -178,9 +178,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin return errorAngle; } - debug[0] = 0; -#if 0 +#ifdef DEBUG_AUTOTUNE + debug[0] = 0; debug[1] = inclination->rawAngles[angleIndex]; #endif @@ -193,7 +193,7 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin currentAngle = DECIDEGREES_TO_DEGREES(-inclination->raw[angleIndex]); } -#if 1 +#ifdef DEBUG_AUTOTUNE debug[1] = DEGREES_TO_DECIDEGREES(currentAngle); debug[2] = DEGREES_TO_DECIDEGREES(targetAngle); #endif @@ -253,7 +253,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin if (secondPeakAngle > targetAngleAtPeak) { // overshot +#ifdef DEBUG_AUTOTUNE debug[0] = 1; +#endif #ifdef PREFER_HIGH_GAIN_SOLUTION if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) { @@ -269,8 +271,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin #endif } else { // undershot +#ifdef DEBUG_AUTOTUNE debug[0] = 2; - +#endif if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) { // we have too much oscillation pid.d *= AUTOTUNE_DECREASE_MULTIPLIER; diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 6a0ad7b242..46f5dcf28c 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -568,9 +568,6 @@ void applyLedWarningLayer(uint8_t updateNow) uint8_t ledIndex; static uint8_t warningFlashCounter = 0; - debug[0] = warningFlashCounter; - - if (updateNow && warningFlashCounter == 0) { warningFlags = WARNING_FLAG_NONE; if (feature(FEATURE_VBAT) && shouldSoundBatteryAlarm()) { diff --git a/src/main/mw.c b/src/main/mw.c index 3a9b260839..c582a3c40b 100755 --- a/src/main/mw.c +++ b/src/main/mw.c @@ -272,10 +272,6 @@ void annexCode(void) updateWarningLed(currentTime); } -#if 0 - debug[0] = armingFlags; -#endif - #ifdef TELEMETRY checkTelemetryState(); #endif