Readded BAK / 25R cells
This commit is contained in:
@ -88,6 +88,24 @@ float getBatteryPercentage(float batVoltage, BatteryCellType cellType)
|
||||
CURVE(2.80, 2.50, 2.5, 2.60)
|
||||
break;
|
||||
}
|
||||
case BatteryCellType::BAK_25R:
|
||||
{
|
||||
const float expected_ah = 2.5;
|
||||
if(cellVoltage > 4.15){
|
||||
return 100;
|
||||
}
|
||||
CURVE(4.15, 4.06, 0, 0.25)
|
||||
CURVE(4.06, 3.96, 0.25, 0.5)
|
||||
CURVE(3.96, 3.88, 0.5, 0.75)
|
||||
CURVE(3.88, 3.77, 0.75, 1)
|
||||
CURVE(3.77, 3.68, 1, 1.25)
|
||||
CURVE(3.68, 3.62, 1.25, 1.5)
|
||||
CURVE(3.62, 3.56, 1.5, 1.75)
|
||||
CURVE(3.56, 3.47, 1.75, 2)
|
||||
CURVE(3.47, 3.31, 2, 2.25)
|
||||
CURVE(3.31, 2.50, 2.25, 2.5)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0.f;
|
||||
}
|
||||
@ -99,6 +117,7 @@ float getRemainingWattHours()
|
||||
if(BatteryCellType(settings.battery.cellType) == BatteryCellType::HG2) target_mah = 3000;
|
||||
if(BatteryCellType(settings.battery.cellType) == BatteryCellType::MH1) target_mah = 3200;
|
||||
if(BatteryCellType(settings.battery.cellType) == BatteryCellType::VTC5) target_mah = 2600;
|
||||
if(BatteryCellType(settings.battery.cellType) == BatteryCellType::BAK_25R) target_mah = 2500;
|
||||
|
||||
float avgVoltage = 0;
|
||||
for (auto &controller : controllers)
|
||||
|
Reference in New Issue
Block a user