| 50 | } |
| 51 | |
| 52 | void process() |
| 53 | { |
| 54 | float t = dht.getTemperature() + ActiveConfig.AddT; |
| 55 | float h = dht.getHumidity() + ActiveConfig.AddRH; |
| 56 | |
| 57 | if(ActiveConfig.Trigger == eTT_Temperature) { |
| 58 | state = t < ActiveConfig.RangeMin || t > ActiveConfig.RangeMax; |
| 59 | } else if(ActiveConfig.Trigger == eTT_Humidity) { |
| 60 | state = h < ActiveConfig.RangeMin || h > ActiveConfig.RangeMax; |
| 61 | } |
| 62 | |
| 63 | digitalWrite(CONTROL_PIN, state); |
| 64 | StrT = String(t, 0); |
| 65 | StrRH = String(h, 0); |
| 66 | |
| 67 | if(!displayTimer.isStarted()) { |
| 68 | displayTimer.initializeMs<1000>(showValues).start(); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | void connectOk(const String& SSID, MacAddress bssid, uint8_t channel) |
| 73 | { |
no test coverage detected