mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
Fix IRHVAC crash v2
This commit is contained in:
parent
d4c1315248
commit
ab94b16d8d
@ -227,7 +227,7 @@ namespace {
|
|||||||
void addFloatToJson(JsonGeneratorObject& json, const char* key, float value, float noValueConstant = NAN) {
|
void addFloatToJson(JsonGeneratorObject& json, const char* key, float value, float noValueConstant = NAN) {
|
||||||
if (!isnan(noValueConstant) && value == noValueConstant) {
|
if (!isnan(noValueConstant) && value == noValueConstant) {
|
||||||
//The "no sensor value" may not be straightforward (e.g.-100.0), hence replacing with explicit n/a
|
//The "no sensor value" may not be straightforward (e.g.-100.0), hence replacing with explicit n/a
|
||||||
json.addStrRaw(key, PSTR(D_JSON_NULL));
|
json.addStrRaw(key, D_JSON_NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char s[6]; // Range: -99.9 <> 999.9 should be fine for any sensible temperature value :)
|
char s[6]; // Range: -99.9 <> 999.9 should be fine for any sensible temperature value :)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user