diff --git a/src/main/config/config.c b/src/main/config/config.c index b66c8838c0..330561d7e8 100755 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -154,7 +154,7 @@ static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims) accelerometerTrims->values.yaw = 0; } -static void resetPidProfile(pidProfile_t *pidProfile) +void resetPidProfile(pidProfile_t *pidProfile) { #if (defined(STM32F10X)) @@ -169,7 +169,7 @@ static void resetPidProfile(pidProfile_t *pidProfile) pidProfile->P8[PITCH] = 50; pidProfile->I8[PITCH] = 40; pidProfile->D8[PITCH] = 18; - pidProfile->P8[YAW] = 90; + pidProfile->P8[YAW] = 80; pidProfile->I8[YAW] = 45; pidProfile->D8[YAW] = 20; pidProfile->P8[PIDALT] = 50; @@ -194,10 +194,10 @@ static void resetPidProfile(pidProfile_t *pidProfile) pidProfile->yaw_p_limit = YAW_P_LIMIT_MAX; pidProfile->yaw_lpf_hz = 80; - pidProfile->rollPitchItermIgnoreRate = 200; + pidProfile->rollPitchItermIgnoreRate = 180; pidProfile->yawItermIgnoreRate = 35; - pidProfile->dterm_lpf_hz = 50; // filtering ON by default - pidProfile->deltaMethod = DELTA_FROM_ERROR; + pidProfile->dterm_lpf_hz = 100; // filtering ON by default + pidProfile->deltaMethod = DELTA_FROM_MEASUREMENT; pidProfile->dynamic_pid = 1; #ifdef GTUNE diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index d50a8caeda..ab195fa8fd 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -1500,7 +1500,7 @@ static bool processInCommand(void) break; case MSP_SET_RESET_CURR_PID: - //resetPidProfile(¤tProfile->pidProfile); + resetPidProfile(¤tProfile->pidProfile); break; case MSP_SET_SENSOR_ALIGNMENT: diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index b22955cead..8fe83d2445 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -166,6 +166,8 @@ void gyroUpdate(void) gyroADCf[axis] = applyBiQuadFilter((float) gyroADC[axis], &gyroFilterState[axis]); gyroADC[axis] = lrintf(gyroADCf[axis]); } + } else { + gyroADCf[axis] = gyroADC[axis]; // Otherwise float pid controller will not have gyro input when filter disabled } } } diff --git a/src/main/version.h b/src/main/version.h index c973dcd678..5ec30cdd32 100644 --- a/src/main/version.h +++ b/src/main/version.h @@ -16,8 +16,8 @@ */ #define FC_VERSION_MAJOR 2 // increment when a major release is made (big new feature, etc) -#define FC_VERSION_MINOR 8 // increment when a minor release is made (small new feature, change etc) -#define FC_VERSION_PATCH_LEVEL 2 // increment when a bug is fixed +#define FC_VERSION_MINOR 9 // increment when a minor release is made (small new feature, change etc) +#define FC_VERSION_PATCH_LEVEL 0 // increment when a bug is fixed #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) diff --git a/src/main/version.h.save b/src/main/version.h.save deleted file mode 100644 index 91390c7c6c..0000000000 --- a/src/main/version.h.save +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This file is part of Cleanflight. - * - * Cleanflight is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Cleanflight is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Cleanflight. If not, see . - */ - -#define FC_VERSION_MAJOR 2 // increment when a major release is made (big new feature, etc) -#define FC_VERSION_MINOR 3 // increment when a minor release is made (small new feature, change etc) -#define FC_VERSION_PATCH_LEVEL 5 // increment when a bug is fixed - -#define STR_HELPER(x) #x -#define STR(x) STR_HELPER(x) -#define FC_VERSION_STRING STR(FC_VERSION_MAJOR) "." STR(FC_VERSION_MINOR) "." STR(FC_VERSION_PATCH_LEVEL) - -#define MW_VERSION 231 - -extern const char* const targetName; - -#define GIT_SHORT_REVISION_LENGTH 7 // lower case hexadecimal digits. -extern const char* const shortGitRevision; - -#define BUILD_DATE_LENGTH 11 -extern const char* const buildDate; // "MMM DD YYYY" MMM = Jan/Feb/... - -#define BUILD_TIME_LENGTH 8 -extern const char* const buildTime; // "HH:MM:SS"