mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
NeoPool fix possible IntegerDivideByZero (#24578)
Co-authored-by: Norbert Richter <nr@prsolution.eu>
This commit is contained in:
co-authored by
Norbert Richter
parent
e3c9271e21
commit
d1a1bf15c1
@@ -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 "\":{"));
|
||||
|
||||
Reference in New Issue
Block a user