1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Disable and cleanup some debug output.

This commit is contained in:
Dominic Clifton 2014-11-26 00:28:53 +00:00
parent 9a9c789c69
commit d41e8631ee
3 changed files with 7 additions and 11 deletions

View file

@ -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;

View file

@ -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()) {

View file

@ -272,10 +272,6 @@ void annexCode(void)
updateWarningLed(currentTime);
}
#if 0
debug[0] = armingFlags;
#endif
#ifdef TELEMETRY
checkTelemetryState();
#endif