diff --git a/ampel-firmware/co2_sensor.cpp b/ampel-firmware/co2_sensor.cpp index a4caca6e3c16827f67950a1992d6c22bff8be8a5..204d61538dedd8fb87b505ee6ed0f4fdad0e11ef 100644 --- a/ampel-firmware/co2_sensor.cpp +++ b/ampel-firmware/co2_sensor.cpp @@ -133,7 +133,7 @@ namespace sensor { last_co2 = co2; // We assume the sensor has acclimated to the environment if measurements // change less than a specified percentage of the current value. - return (co2 > 0 && delta < ((uint32_t)co2 * config::max_deviation_during_bootup / 100)); + return (co2 > 0 && delta < ((uint32_t) co2 * config::max_deviation_during_bootup / 100)); } bool countStableMeasurements() { @@ -199,7 +199,9 @@ namespace sensor { void switchStateForCurrentPPM() { if (current_state == BOOTUP) { - if (!hasSensorSettled()) return; + if (!hasSensorSettled()) { + return; + } switchState(READY); Serial.println(F("Sensor acclimatization finished.")); Serial.print(F("Setting SCD30 timestep to "));