Added calculation of megajoules

This commit is contained in:
CommanderRedYT committed 2022-03-02 15:09:44 +01:00
1 parent e7379fd3df
commit c3cf4a74b0
3 files changed
+14 -2

No files matched your search

+5
View File
@@ -155,6 +155,11 @@ float getPercentageByWh(float wh)
return maxWh / wh;
}
float getBatteryWattHours()
{
return (getTarget_mAh() / 1000.f) * 3.7 * configs.battery.cellsParallel.value * configs.battery.cellsSeries.value;
}
float getTarget_mAh()
{
float target_mah = 2000; //default