diff --git a/src/main.cpp b/src/main.cpp index 6b2155f..9ebb34a 100644 --- a/src/main.cpp +++ b/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();