diff --git a/src/main/blackbox/blackbox.c b/src/main/blackbox/blackbox.c index 4a098709c9..58b33cead4 100644 --- a/src/main/blackbox/blackbox.c +++ b/src/main/blackbox/blackbox.c @@ -1214,7 +1214,7 @@ static bool blackboxWriteSysinfo() BLACKBOX_PRINT_HEADER_LINE_CUSTOM( if (testBlackboxCondition(FLIGHT_LOG_FIELD_CONDITION_VBAT)) { - blackboxPrintfHeaderLine("vbatscale", "%u", voltageSensorADCConfig(VOLTAGE_SENSOR_ADC_VBAT)->vbatscale); + blackboxPrintfHeaderLine("vbat_scale", "%u", voltageSensorADCConfig(VOLTAGE_SENSOR_ADC_VBAT)->vbatscale); } else { xmitState.headerIndex += 2; // Skip the next two vbat fields too } diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 292a0d551e..d366954982 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -493,7 +493,6 @@ typedef union { cliMinMaxConfig_t minmax; } cliValueConfig_t; -#ifdef USE_PARAMETER_GROUPS typedef struct { const char *name; const uint8_t type; // see cliValueFlag_e @@ -975,7 +974,6 @@ displayPortProfile_t displayPortProfileMax7456Copy; static pidConfig_t pidConfigCopy; static controlRateConfig_t controlRateProfilesCopy[CONTROL_RATE_PROFILE_COUNT]; static pidProfile_t pidProfileCopy[MAX_PROFILE_COUNT]; -#endif // USE_PARAMETER_GROUPS static void cliPrint(const char *str) { diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 302e9ec8b9..3700fdd749 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -273,13 +273,13 @@ static float calcHorizonLevelStrength(void) { static float pidLevel(int axis, const pidProfile_t *pidProfile, const rollAndPitchTrims_t *angleTrim, float currentPidSetpoint) { // calculate error angle and limit the angle to the max inclination - float errorAngle = pidProfile->levelSensitivity * getRcDeflection(axis); + float angle = pidProfile->levelSensitivity * getRcDeflection(axis); #ifdef GPS - errorAngle += GPS_angle[axis]; + angle += GPS_angle[axis]; #endif - errorAngle = constrainf(errorAngle, -pidProfile->levelAngleLimit, pidProfile->levelAngleLimit); - errorAngle = errorAngle - ((attitude.raw[axis] - angleTrim->raw[axis]) / 10.0f); - if(FLIGHT_MODE(ANGLE_MODE)) { + angle = constrainf(angle, -pidProfile->levelAngleLimit, pidProfile->levelAngleLimit); + const float errorAngle = angle - ((attitude.raw[axis] - angleTrim->raw[axis]) / 10.0f); + if (FLIGHT_MODE(ANGLE_MODE)) { // ANGLE mode - control is angle based, so control loop is needed currentPidSetpoint = errorAngle * levelGain; } else {