Commit d354b2c0 authored by Eric Duminil's avatar Eric Duminil
Browse files

Compiles again. Not working yet

parent a4e0fed5
......@@ -226,9 +226,11 @@ namespace sensor {
* Returns true if fresh data is available, for further processing (e.g. MQTT, CSV or LoRa)
*/
bool processData() {
bool freshData = scd30.dataAvailable();
static unsigned long last_measurement = 0;
unsigned long now = seconds();
bool freshData = now - last_measurement > config::measurement_timestep;
if (freshData) {
last_measurement = now;
ntp::getLocalTime(timestamp);
co2 = sensor_S8->get_co2();
temperature = 0.0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment