We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bc6e3f commit cfcef46Copy full SHA for cfcef46
OpenCO2_Sensor.ino
@@ -363,7 +363,8 @@ void initOnce() {
363
scd4x.stopPeriodicMeasurement();
364
// scd4x.performFactoryReset();
365
// delay(100);
366
- scd4x.performSelfTest(sensorStatus);
+ int16_t selfTest = scd4x.performSelfTest(sensorStatus);
367
+ if (selfTest != 0 /*NO_ERROR*/) sensorStatus=99;
368
}
369
370
preferences.begin("co2-sensor", true);
@@ -848,7 +849,7 @@ void loop() {
848
849
goto_light_sleep(5000 - (millis() - lastMeasurementTimeMs));
850
851
- if (!(BatteryMode && lowEnergyMode)) {
852
+ if (!(BatteryMode && lowEnergyMode) && !TEST_MODE) {
853
bool isDataReady = false;
854
uint16_t ready_error = scd4x.getDataReadyStatus(isDataReady);
855
if (ready_error || !isDataReady) {
0 commit comments