Browse Source

we can update the web insterface as often as need be since it doesn't consume resources

fastled
Mitchell A. Cox 7 years ago
parent
commit
b6ece41105
1 changed files with 8 additions and 7 deletions
  1. +8
    -7
      code/espurna/ds18b20.ino

+ 8
- 7
code/espurna/ds18b20.ino View File

@ -117,14 +117,15 @@ void dsLoop() {
#if INFLUXDB_SUPPORT
influxDBSend(getSetting("dsTmpTopic", DS18B20_TEMPERATURE_TOPIC).c_str(), _dsTemperatureStr);
#endif
// Update websocket clients
#if WEB_SUPPORT
char buffer[100];
snprintf_P(buffer, sizeof(buffer), PSTR("{\"dsVisible\": 1, \"dsTmp\": %s, \"tmpUnits\": %d}"), getDSTemperatureStr(), tmpUnits);
wsSend(buffer);
#endif
}
// Update websocket clients
#if WEB_SUPPORT
char buffer[100];
snprintf_P(buffer, sizeof(buffer), PSTR("{\"dsVisible\": 1, \"dsTmp\": %s, \"tmpUnits\": %d}"), getDSTemperatureStr(), tmpUnits);
wsSend(buffer);
#endif
}
}


Loading…
Cancel
Save