From da2854403ecae88f1e26f0e1cf490723a6572695 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Wed, 22 Apr 2015 14:10:10 -0400 Subject: [PATCH] Copter: Explicitly define tuning_func enum value --- ArduCopter/defines.h | 80 ++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/ArduCopter/defines.h b/ArduCopter/defines.h index 01f1b1af10..3794bdd76f 100644 --- a/ArduCopter/defines.h +++ b/ArduCopter/defines.h @@ -115,46 +115,46 @@ enum autopilot_modes { // Tuning enumeration enum tuning_func { - TUNING_NONE = 0, // 0, - TUNING_STABILIZE_ROLL_PITCH_KP, // 1, stabilize roll/pitch angle controller's P term - TUNING_STABILIZE_YAW_KP = 3, // 3, stabilize yaw heading controller's P term - TUNING_RATE_ROLL_PITCH_KP, // 4, body frame roll/pitch rate controller's P term - TUNING_RATE_ROLL_PITCH_KI, // 5, body frame roll/pitch rate controller's I term - TUNING_YAW_RATE_KP, // 6, body frame yaw rate controller's P term - TUNING_THROTTLE_RATE_KP, // 7, throttle rate controller's P term (desired rate to acceleration or motor output) - TUNING_WP_SPEED = 10, // 10, maximum speed to next way point (0 to 10m/s) - TUNING_LOITER_POSITION_KP = 12, // 12, loiter distance controller's P term (position error to speed) - TUNING_HELI_EXTERNAL_GYRO, // 13, TradHeli specific external tail gyro gain - TUNING_ALTITUDE_HOLD_KP, // 14, altitude hold controller's P term (alt error to desired rate) - TUNING_RATE_ROLL_PITCH_KD = 21, // 21, body frame roll/pitch rate controller's D term - TUNING_VEL_XY_KP, // 22, loiter rate controller's P term (speed error to tilt angle) - TUNING_ACRO_RP_KP = 25, // 25, acro controller's P term. converts pilot input to a desired roll, pitch or yaw rate - TUNING_YAW_RATE_KD, // 26, body frame yaw rate controller's D term - TUNING_VEL_XY_KI = 28, // 28, loiter rate controller's I term (speed error to tilt angle) - TUNING_AHRS_YAW_KP = 30, // 30, ahrs's compass effect on yaw angle (0 = very low, 1 = very high) - TUNING_AHRS_KP, // 31, accelerometer effect on roll/pitch angle (0=low) - TUNING_ACCEL_Z_KP = 34, // 34, accel based throttle controller's P term - TUNING_ACCEL_Z_KI, // 35, accel based throttle controller's I term - TUNING_ACCEL_Z_KD, // 36, accel based throttle controller's D term - TUNING_DECLINATION = 38, // 38, compass declination in radians - TUNING_CIRCLE_RATE, // 39, circle turn rate in degrees (hard coded to about 45 degrees in either direction) - TUNING_ACRO_YAW_KP, // 40, acro controller's P term. converts pilot input to a desired roll, pitch or yaw rate - TUNING_SONAR_GAIN, // 41, sonar gain - TUNING_EKF_VERTICAL_POS, // 42, EKF's baro vs accel (higher rely on accels more, baro impact is reduced). Range should be 0.2 ~ 4.0? 2.0 is default - TUNING_EKF_HORIZONTAL_POS, // 43, EKF's gps vs accel (higher rely on accels more, gps impact is reduced). Range should be 1.0 ~ 3.0? 1.5 is default - TUNING_EKF_ACCEL_NOISE, // 44, EKF's accel noise (lower means trust accels more, gps & baro less). Range should be 0.02 ~ 0.5 0.5 is default (but very robust at that level) - TUNING_RC_FEEL_RP, // 45, roll-pitch input smoothing - TUNING_RATE_PITCH_KP, // 46, body frame pitch rate controller's P term - TUNING_RATE_PITCH_KI, // 47, body frame pitch rate controller's I term - TUNING_RATE_PITCH_KD, // 48, body frame pitch rate controller's D term - TUNING_RATE_ROLL_KP, // 49, body frame roll rate controller's P term - TUNING_RATE_ROLL_KI, // 50, body frame roll rate controller's I term - TUNING_RATE_ROLL_KD, // 51, body frame roll rate controller's D term - TUNING_RATE_PITCH_FF, // 52, body frame pitch rate controller FF term - TUNING_RATE_ROLL_FF, // 53, body frame roll rate controller FF term - TUNING_RATE_YAW_FF, // 54, body frame yaw rate controller FF term - TUNING_RATE_MOT_YAW_HEADROOM, // 55, motors yaw headroom minimum - TUNING_RATE_YAW_FILT // 56, yaw rate input filter + TUNING_NONE = 0, // + TUNING_STABILIZE_ROLL_PITCH_KP = 1, // stabilize roll/pitch angle controller's P term + TUNING_STABILIZE_YAW_KP = 3, // stabilize yaw heading controller's P term + TUNING_RATE_ROLL_PITCH_KP = 4, // body frame roll/pitch rate controller's P term + TUNING_RATE_ROLL_PITCH_KI = 5, // body frame roll/pitch rate controller's I term + TUNING_YAW_RATE_KP = 6, // body frame yaw rate controller's P term + TUNING_THROTTLE_RATE_KP = 7, // throttle rate controller's P term (desired rate to acceleration or motor output) + TUNING_WP_SPEED = 10, // maximum speed to next way point (0 to 10m/s) + TUNING_LOITER_POSITION_KP = 12, // loiter distance controller's P term (position error to speed) + TUNING_HELI_EXTERNAL_GYRO = 13, // TradHeli specific external tail gyro gain + TUNING_ALTITUDE_HOLD_KP = 14, // altitude hold controller's P term (alt error to desired rate) + TUNING_RATE_ROLL_PITCH_KD = 21, // body frame roll/pitch rate controller's D term + TUNING_VEL_XY_KP = 22, // loiter rate controller's P term (speed error to tilt angle) + TUNING_ACRO_RP_KP = 25, // acro controller's P term. converts pilot input to a desired roll, pitch or yaw rate + TUNING_YAW_RATE_KD = 26, // body frame yaw rate controller's D term + TUNING_VEL_XY_KI = 28, // loiter rate controller's I term (speed error to tilt angle) + TUNING_AHRS_YAW_KP = 30, // ahrs's compass effect on yaw angle (0 = very low, 1 = very high) + TUNING_AHRS_KP = 31, // accelerometer effect on roll/pitch angle (0=low) + TUNING_ACCEL_Z_KP = 34, // accel based throttle controller's P term + TUNING_ACCEL_Z_KI = 35, // accel based throttle controller's I term + TUNING_ACCEL_Z_KD = 36, // accel based throttle controller's D term + TUNING_DECLINATION = 38, // compass declination in radians + TUNING_CIRCLE_RATE = 39, // circle turn rate in degrees (hard coded to about 45 degrees in either direction) + TUNING_ACRO_YAW_KP = 40, // acro controller's P term. converts pilot input to a desired roll, pitch or yaw rate + TUNING_SONAR_GAIN = 41, // sonar gain + TUNING_EKF_VERTICAL_POS = 42, // EKF's baro vs accel (higher rely on accels more, baro impact is reduced). Range should be 0.2 ~ 4.0? 2.0 is default + TUNING_EKF_HORIZONTAL_POS = 43, // EKF's gps vs accel (higher rely on accels more, gps impact is reduced). Range should be 1.0 ~ 3.0? 1.5 is default + TUNING_EKF_ACCEL_NOISE = 44, // EKF's accel noise (lower means trust accels more, gps & baro less). Range should be 0.02 ~ 0.5 0.5 is default (but very robust at that level) + TUNING_RC_FEEL_RP = 45, // roll-pitch input smoothing + TUNING_RATE_PITCH_KP = 46, // body frame pitch rate controller's P term + TUNING_RATE_PITCH_KI = 47, // body frame pitch rate controller's I term + TUNING_RATE_PITCH_KD = 48, // body frame pitch rate controller's D term + TUNING_RATE_ROLL_KP = 49, // body frame roll rate controller's P term + TUNING_RATE_ROLL_KI = 50, // body frame roll rate controller's I term + TUNING_RATE_ROLL_KD = 51, // body frame roll rate controller's D term + TUNING_RATE_PITCH_FF = 52, // body frame pitch rate controller FF term + TUNING_RATE_ROLL_FF = 53, // body frame roll rate controller FF term + TUNING_RATE_YAW_FF = 54, // body frame yaw rate controller FF term + TUNING_RATE_MOT_YAW_HEADROOM = 55, // motors yaw headroom minimum + TUNING_RATE_YAW_FILT = 56 // yaw rate input filter }; // Acro Trainer types