Commit 19efaca1 authored by Käppler's avatar Käppler
Browse files

co2_sensor: Disable state logging by default

parent a5e847e9
Pipeline #3219 passed with stage
in 1 minute and 47 seconds
......@@ -15,6 +15,7 @@ namespace config {
const float temperature_offset = -3.0; // [K] Temperature measured by sensor is usually at least 3K too high.
#endif
bool auto_calibrate_sensor = AUTO_CALIBRATE_SENSOR; // [true / false]
const bool debug_sensor_states = false; // If true, log state transitions over serial console
}
namespace sensor {
......@@ -172,10 +173,12 @@ namespace sensor {
void switchState(state new_state) {
if (new_state == current_state) return;
Serial.print(F("Changing sensor state: "));
Serial.print(state_names[current_state]);
Serial.print(" -> ");
Serial.println(state_names[new_state]);
if (config::debug_sensor_states) {
Serial.print(F("Changing sensor state: "));
Serial.print(state_names[current_state]);
Serial.print(" -> ");
Serial.println(state_names[new_state]);
}
current_state = new_state;
}
......
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