MCPcopy Create free account
hub / github.com/SmingHub/Sming / process

Function process

samples/MeteoControl/app/application.cpp:52–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void 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
72void connectOk(const String& SSID, MacAddress bssid, uint8_t channel)
73{

Callers 1

initFunction · 0.70

Calls 5

isStartedMethod · 0.80
digitalWriteFunction · 0.50
StringClass · 0.50
getTemperatureMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected