NeoPool fix possible IntegerDivideByZero (#24578)

Co-authored-by: Norbert Richter <nr@prsolution.eu>
This commit is contained in:
Norbert Richter
2026-03-23 15:48:23 +01:00
committed by GitHub
co-authored by Norbert Richter
parent e3c9271e21
commit d1a1bf15c1
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Athom esp32 2-3-4 gang change led behaviour after firmware update (#24509)
- ESP8266 heap drain and exception 29 when DHCP provides NTP server (#24515)
- NeoPool fix possible IntegerDivideByZero
### Removed
@@ -2173,8 +2173,8 @@ void NeoPoolShow(bool json)
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_MAX "\":" NEOPOOL_FMT_HIDRO), decimals, &fvalue);
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_PERCENT "\":{"));
ResponseAppend_P(PSTR( "\"" D_JSON_DATA "\":%d"), data * 100 / max);
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_SETPOINT "\":%d"), setpoint * 100 / max);
ResponseAppend_P(PSTR( "\"" D_JSON_DATA "\":%d"), max ? (data * 100 / max) : 0);
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_SETPOINT "\":%d"), max ? (setpoint * 100 / max) : 0);
ResponseJsonEnd();
ResponseAppend_P(PSTR(",\"" D_NEOPOOL_JSON_CELL_RUNTIME "\":{"));