Skip to content

Commit b982cfe

Browse files
Copilotdorkmo
andcommitted
Leave level blank for tanks without level measurements (digital float switches)
Co-authored-by: dorkmo <[email protected]>
1 parent 92231ac commit b982cfe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TankAlarm-112025-Server-BluesOpta/TankAlarm-112025-Server-BluesOpta.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,8 +1149,8 @@ static const char DASHBOARD_HTML[] PROGMEM = R"HTML(
11491149
}
11501150
11511151
function formatLevel(inches) {
1152-
if (typeof inches !== 'number' || !isFinite(inches)) {
1153-
return '--';
1152+
if (typeof inches !== 'number' || !isFinite(inches) || inches <= 0) {
1153+
return '';
11541154
}
11551155
const feet = Math.floor(inches / 12);
11561156
const remainingInches = inches % 12;

0 commit comments

Comments
 (0)