1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

Removed VBat PID compensation.

This commit is contained in:
mikeller 2020-03-24 02:54:49 +13:00
parent 97ad043f9e
commit b6689edc26
13 changed files with 7 additions and 27 deletions

View file

@ -460,15 +460,6 @@ void batteryUpdateCurrentMeter(timeUs_t currentTimeUs)
}
}
float calculateVbatPidCompensation(void) {
float batteryScaler = 1.0f;
if (batteryConfig()->voltageMeterSource != VOLTAGE_METER_NONE && batteryCellCount > 0) {
// Up to 33% PID gain. Should be fine for 4,2to 3,3 difference
batteryScaler = constrainf((( (float)batteryConfig()->vbatmaxcellvoltage * batteryCellCount ) / (float) voltageMeter.displayFiltered), 1.0f, 1.33f);
}
return batteryScaler;
}
uint8_t calculateBatteryPercentageRemaining(void)
{
uint8_t batteryPercentage = 0;

View file

@ -101,7 +101,6 @@ void batteryUpdateAlarms(void);
struct rxConfig_s;
float calculateVbatPidCompensation(void);
uint8_t calculateBatteryPercentageRemaining(void);
bool isBatteryVoltageConfigured(void);
uint16_t getBatteryVoltage(void);