Fixed format string
This commit is contained in:
@ -447,7 +447,7 @@ void send_information()
|
|||||||
// battery
|
// battery
|
||||||
if (const auto avgVoltage = controllers.getAvgVoltage(); avgVoltage)
|
if (const auto avgVoltage = controllers.getAvgVoltage(); avgVoltage)
|
||||||
{
|
{
|
||||||
infoObject["percentage"] = fmt::format("{:.1f}%", getBatteryPercentage(*avgVoltage, BatteryCellType(configs.battery.cellType.value())));
|
infoObject["percentage"] = fmt::format("{:.1f}", getBatteryPercentage(*avgVoltage, BatteryCellType(configs.battery.cellType.value())));
|
||||||
infoObject["voltage"] = *avgVoltage;
|
infoObject["voltage"] = *avgVoltage;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user