adjustment: reduce precision of charged- and discharged energy for pytes batteries (#1165)
Precision is reduced to match the CAN protocol definition.
This commit is contained in:
parent
dacf9d4be1
commit
599c5cea7d
@ -135,11 +135,11 @@ void PytesBatteryStats::getLiveViewData(JsonVariant& root) const
|
|||||||
addLiveViewValue(root, "availableCapacity", _availableCapacity, "Ah", 0);
|
addLiveViewValue(root, "availableCapacity", _availableCapacity, "Ah", 0);
|
||||||
|
|
||||||
if (_chargedEnergy != -1) {
|
if (_chargedEnergy != -1) {
|
||||||
addLiveViewValue(root, "chargedEnergy", _chargedEnergy, "kWh", 2);
|
addLiveViewValue(root, "chargedEnergy", _chargedEnergy, "kWh", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_dischargedEnergy != -1) {
|
if (_dischargedEnergy != -1) {
|
||||||
addLiveViewValue(root, "dischargedEnergy", _dischargedEnergy, "kWh", 2);
|
addLiveViewValue(root, "dischargedEnergy", _dischargedEnergy, "kWh", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
addLiveViewInSection(root, "cells", "cellMinVoltage", static_cast<float>(_cellMinMilliVolt)/1000, "V", 3);
|
addLiveViewInSection(root, "cells", "cellMinVoltage", static_cast<float>(_cellMinMilliVolt)/1000, "V", 3);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user