mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 09:45:37 +03:00
Merge pull request #9633 from mikeller/remove_vbat_pid_compensation
Remove vbat pid compensation
This commit is contained in:
commit
41fa8754bc
13 changed files with 7 additions and 27 deletions
|
@ -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;
|
||||
|
|
|
@ -101,7 +101,6 @@ void batteryUpdateAlarms(void);
|
|||
|
||||
struct rxConfig_s;
|
||||
|
||||
float calculateVbatPidCompensation(void);
|
||||
uint8_t calculateBatteryPercentageRemaining(void);
|
||||
bool isBatteryVoltageConfigured(void);
|
||||
uint16_t getBatteryVoltage(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue