fix: correct /stats descending meter ranges

This commit is contained in:
Jared Dohrman
2026-04-15 18:28:49 +10:00
parent a0c8f80504
commit 43b8f5879c
+1 -1
View File
@@ -1070,7 +1070,7 @@ const char kWebPanelAppHtml[] PROGMEM = R"HTML(
return Math.min(max, Math.max(min, value));
}
function pctRange(value, min, max) {
if (!Number.isFinite(value) || max <= min) return 0;
if (!Number.isFinite(value) || max === min) return 0;
return clamp(((value - min) * 100) / (max - min), 0, 100);
}
function pctRatio(value, total) {