Browse Source

do a full display refresh every hour

ir
Hendrik Langer 5 years ago
parent
commit
e1f25ba6b8
  1. 10
      src/main.cpp

10
src/main.cpp

@ -71,6 +71,7 @@ sensor_readings_t sensors_a4cf1211c3e4, sensors_246f28d1fa5c, sensors_246f28d1a0
SensorHistory history_pressure(30);
uint32_t lastDisplayUpdate = 0;
uint32_t lastDisplayRefresh = 0;
bool bme280_active = false;
bool bme680_active = false;
bool uv_active = false;
@ -574,10 +575,17 @@ void setup()
*/
void loop()
{
/* Do an e-paper display refresh every 2 minutes */
/* Do an e-paper display refresh every 1 minutes */
if (millis() - lastDisplayUpdate >= 1*60*1000) {
lastDisplayUpdate = millis();
/* Do a full refresh every hour */
if (millis() - lastDisplayRefresh >= 60*60*1000) {
lastDisplayRefresh = millis();
display.clearScreen();
display.refresh();
}
getSensorMeasurements();
displayValues();
printValues();

Loading…
Cancel
Save