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