From ae0028da4cf84d61c87d0797eea35eacf6be7798 Mon Sep 17 00:00:00 2001 From: Grigorii Merkushev Date: Wed, 29 Sep 2021 12:20:42 +0200 Subject: [PATCH] fix: bug with system sample --- esp32/src/climate.cpp | 3 +++ server/server.go | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/esp32/src/climate.cpp b/esp32/src/climate.cpp index 5592c73..9ebf8d5 100644 --- a/esp32/src/climate.cpp +++ b/esp32/src/climate.cpp @@ -125,6 +125,9 @@ time in UTC // Serial.println("4: cold side"); ClimateData coldSide = readTempHumid(dhtColdSide); + // debug + coldSide = readTempHumid(dhtHotSide); + if ((hotSide.t > 0 || hotCenter.t > 0) && (coldCenter.t > 0 || coldSide.t > 0)) { lastNotNullReadings = now; diff --git a/server/server.go b/server/server.go index 7ef6d53..42e7e2d 100644 --- a/server/server.go +++ b/server/server.go @@ -27,11 +27,11 @@ type ClimateConfig struct { } type System struct { - Version float64 `json:"version"` - Uptime float64 `json:"uptime"` - Hour float64 `json:"hour"` - Minute float64 `json:"minute"` - Second float64 `json:"second"` + Version string `json:"version"` + Uptime int `json:"uptime"` + Hour int `json:"hour"` + Minute int `json:"minute"` + Second int `json:"second"` } type Data struct {