From 5f2e79d1c7d837a80a75d09f5fa9aa46fc01f8df Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Wed, 26 Nov 2014 10:11:09 -0600 Subject: [PATCH] autotune: Correct macro name in comments * Update the comments to reflect the code. * No functional change. --- src/main/flight/autotune.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/flight/autotune.c b/src/main/flight/autotune.c index 9d3135e294..5ba9664f66 100644 --- a/src/main/flight/autotune.c +++ b/src/main/flight/autotune.c @@ -66,10 +66,10 @@ extern int16_t debug[4]; * In the BradWii software, it alternates between doing the P and D step and doing the I step so you can quit whenever you * want without having to tell it specifically to do the I term. The sequence is actually P&D, P&D, I, P&D, P&D, I... * - * Note: The 4 degrees mentioned above is the value of AUTOTUNE_MAX_OSCILLATION. In the BradWii code at the time of writing + * Note: The 4 degrees mentioned above is the value of AUTOTUNE_MAX_OSCILLATION_ANGLE. In the BradWii code at the time of writing * the default value was 1.0f instead of 4.0f. * - * To adjust how aggressive the tuning is, adjust the AUTOTUNEMAXOSCILLATION value. A larger value will result in more + * To adjust how aggressive the tuning is, adjust the AUTOTUNE_MAX_OSCILLATION_ANGLE value. A larger value will result in more * aggressive tuning. A lower value will result in softer tuning. It will rock back and forth between -AUTOTUNE_TARGET_ANGLE * and AUTOTUNE_TARGET_ANGLE degrees * AUTOTUNE_D_MULTIPLIER is a multiplier that puts in a little extra D when autotuning is done. This helps damp the wobbles @@ -249,7 +249,7 @@ float autotune(angle_index_t angleIndex, const rollAndPitchInclination_t *inclin // stop looking for the 2nd peak if we time out or if we change direction again after moving by more than half the maximum oscillation if (timedOut || (oscillationAmplitude > AUTOTUNE_MAX_OSCILLATION_ANGLE / 2 && currentAngle > firstPeakAngle)) { // analyze the data - // Our goal is to have zero overshoot and to have AUTOTUNEMAXOSCILLATION amplitude + // Our goal is to have zero overshoot and to have AUTOTUNE_MAX_OSCILLATION_ANGLE amplitude if (secondPeakAngle > targetAngleAtPeak) { // overshot