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

Adding debug info

parent 3ace1b61
...@@ -84,6 +84,8 @@ namespace sensor { ...@@ -84,6 +84,8 @@ namespace sensor {
static int16_t previous_co2 = 0; static int16_t previous_co2 = 0;
if (co2 > (previous_co2 - 30) && co2 < (previous_co2 + 30)) { if (co2 > (previous_co2 - 30) && co2 < (previous_co2 + 30)) {
stable_measurements++; stable_measurements++;
Serial.print("Stable since : ");
Serial.println(stable_measurements);
waiting_color = color::green; waiting_color = color::green;
} else { } else {
stable_measurements = 0; stable_measurements = 0;
...@@ -142,7 +144,9 @@ namespace sensor { ...@@ -142,7 +144,9 @@ namespace sensor {
* Fresh data. Show it and send it if needed. * Fresh data. Show it and send it if needed.
*/ */
if (freshData) { if (freshData) {
countStableMeasurements(); if (should_calibrate) {
countStableMeasurements();
}
timestamp = ntp::getLocalTime(); timestamp = ntp::getLocalTime();
Serial.println(timestamp); Serial.println(timestamp);
......
Supports Markdown
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