Skip to content

Commit

Permalink
fix: add debug for esp, fix sample in server
Browse files Browse the repository at this point in the history
  • Loading branch information
Grigorii Merkushev committed Sep 29, 2021
1 parent ae0028d commit 6a1c12a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions esp32/src/climate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ time in UTC
// Serial.println("4: cold side");
ClimateData coldSide = readTempHumid(dhtColdSide);

// debug
coldSide = readTempHumid(dhtHotSide);
if (DEBUG){
// debug
coldSide = readTempHumid(dhtHotSide);
}


if ((hotSide.t > 0 || hotCenter.t > 0) && (coldCenter.t > 0 || coldSide.t > 0))
{
Expand Down
6 changes: 3 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ type Data struct {
Heater bool `json:"heater"`
Config ClimateConfig `json:"climate_config"`
HeaterPhase string `json:"heater_phase"`
System System `json:"system"`
}

var errResponse struct {
Message string `json:"error"`
}

type Storage struct {
Data Data `json:"data"`
Timestamp int64 `json:"timestamp"`
System System `json:"system"`
Data Data `json:"data"`
Timestamp int64 `json:"timestamp"`
}

var storage map[int]Storage
Expand Down

0 comments on commit 6a1c12a

Please sign in to comment.