mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Disable and cleanup some debug output.
This commit is contained in:
parent
9a9c789c69
commit
d41e8631ee
3 changed files with 7 additions and 11 deletions
|
@ -178,9 +178,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin
|
||||||
return errorAngle;
|
return errorAngle;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug[0] = 0;
|
|
||||||
|
|
||||||
#if 0
|
#ifdef DEBUG_AUTOTUNE
|
||||||
|
debug[0] = 0;
|
||||||
debug[1] = inclination->rawAngles[angleIndex];
|
debug[1] = inclination->rawAngles[angleIndex];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin
|
||||||
currentAngle = DECIDEGREES_TO_DEGREES(-inclination->raw[angleIndex]);
|
currentAngle = DECIDEGREES_TO_DEGREES(-inclination->raw[angleIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
#ifdef DEBUG_AUTOTUNE
|
||||||
debug[1] = DEGREES_TO_DECIDEGREES(currentAngle);
|
debug[1] = DEGREES_TO_DECIDEGREES(currentAngle);
|
||||||
debug[2] = DEGREES_TO_DECIDEGREES(targetAngle);
|
debug[2] = DEGREES_TO_DECIDEGREES(targetAngle);
|
||||||
#endif
|
#endif
|
||||||
|
@ -253,7 +253,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin
|
||||||
|
|
||||||
if (secondPeakAngle > targetAngleAtPeak) {
|
if (secondPeakAngle > targetAngleAtPeak) {
|
||||||
// overshot
|
// overshot
|
||||||
|
#ifdef DEBUG_AUTOTUNE
|
||||||
debug[0] = 1;
|
debug[0] = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PREFER_HIGH_GAIN_SOLUTION
|
#ifdef PREFER_HIGH_GAIN_SOLUTION
|
||||||
if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) {
|
if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) {
|
||||||
|
@ -269,8 +271,9 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
// undershot
|
// undershot
|
||||||
|
#ifdef DEBUG_AUTOTUNE
|
||||||
debug[0] = 2;
|
debug[0] = 2;
|
||||||
|
#endif
|
||||||
if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) {
|
if (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE) {
|
||||||
// we have too much oscillation
|
// we have too much oscillation
|
||||||
pid.d *= AUTOTUNE_DECREASE_MULTIPLIER;
|
pid.d *= AUTOTUNE_DECREASE_MULTIPLIER;
|
||||||
|
|
|
@ -568,9 +568,6 @@ void applyLedWarningLayer(uint8_t updateNow)
|
||||||
uint8_t ledIndex;
|
uint8_t ledIndex;
|
||||||
static uint8_t warningFlashCounter = 0;
|
static uint8_t warningFlashCounter = 0;
|
||||||
|
|
||||||
debug[0] = warningFlashCounter;
|
|
||||||
|
|
||||||
|
|
||||||
if (updateNow && warningFlashCounter == 0) {
|
if (updateNow && warningFlashCounter == 0) {
|
||||||
warningFlags = WARNING_FLAG_NONE;
|
warningFlags = WARNING_FLAG_NONE;
|
||||||
if (feature(FEATURE_VBAT) && shouldSoundBatteryAlarm()) {
|
if (feature(FEATURE_VBAT) && shouldSoundBatteryAlarm()) {
|
||||||
|
|
|
@ -272,10 +272,6 @@ void annexCode(void)
|
||||||
updateWarningLed(currentTime);
|
updateWarningLed(currentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
debug[0] = armingFlags;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TELEMETRY
|
#ifdef TELEMETRY
|
||||||
checkTelemetryState();
|
checkTelemetryState();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue