mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Update text for cellvoltages not read
This commit is contained in:
parent
dd1ee5139d
commit
9a898b72e2
1 changed files with 17 additions and 2 deletions
|
@ -236,7 +236,14 @@ String cellmonitor_processor(const String& var) {
|
||||||
content += "updateVoltageValues(data);";
|
content += "updateVoltageValues(data);";
|
||||||
content += "}";
|
content += "}";
|
||||||
content += "else {";
|
content += "else {";
|
||||||
content += "document.getElementById('voltageValues').textContent = '" + String(datalayer.battery.info.number_of_cells) + " cells, voltages not yet fetched, or cell amount not available';";
|
if (datalayer.battery.info.number_of_cells > 0) {
|
||||||
|
content += "document.getElementById('voltageValues').textContent = '" +
|
||||||
|
String(datalayer.battery.info.number_of_cells) + " cells configured, but cellvoltages not yet read';";
|
||||||
|
} else {
|
||||||
|
content +=
|
||||||
|
"document.getElementById('voltageValues').textContent = 'Amount of cells unknown. Cellvoltages not yet "
|
||||||
|
"read';";
|
||||||
|
}
|
||||||
content += "}";
|
content += "}";
|
||||||
|
|
||||||
if (battery2) {
|
if (battery2) {
|
||||||
|
@ -363,7 +370,15 @@ String cellmonitor_processor(const String& var) {
|
||||||
content += "updateVoltageValues2(data2);";
|
content += "updateVoltageValues2(data2);";
|
||||||
content += "}";
|
content += "}";
|
||||||
content += "else {";
|
content += "else {";
|
||||||
content += "document.getElementById('voltageValues2').textContent = '" + String(datalayer.battery2.info.number_of_cells) + " cells, voltages not yet fetched, or cell amount not available';";
|
if (datalayer.battery2.info.number_of_cells > 0) {
|
||||||
|
content += "document.getElementById('voltageValues2').textContent = '" +
|
||||||
|
String(datalayer.battery2.info.number_of_cells) +
|
||||||
|
" cells configured, but cellvoltages not yet read';";
|
||||||
|
} else {
|
||||||
|
content +=
|
||||||
|
"document.getElementById('voltageValues2').textContent = 'Amount of cells unknown. Cellvoltages not yet "
|
||||||
|
"read';";
|
||||||
|
}
|
||||||
content += "}";
|
content += "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue