Skip to content

Commit d1502ed

Browse files
committed
Use outdoorAirQuality mode when enabling sensor
1 parent 1c38a72 commit d1502ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/OutdoorAirQualitySensor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void OutdoorAirQualitySensor::setEnabled(bool isEnabled) {
7979
return;
8080
}
8181
if (isEnabled) {
82-
setMode(OutdoorAirQualitySensorMode::defaultMode);
82+
setMode(OutdoorAirQualitySensorMode::outdoorAirQuality);
8383
} else {
8484
setMode(OutdoorAirQualitySensorMode::powerDown);
8585
}

src/OutdoorAirQualitySensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ enum class OutdoorAirQualitySensorMode {
1010
powerDown = 0, ///< Mode to turn off the sensor and reduce power consumption
1111
cleaning = 1, ///< Cleaning mode to perform a thermal cleaning cycle of the MOx element
1212
outdoorAirQuality = 2, ///< Mode to measure outdoor air quality
13-
defaultMode = powerDown // Can't use default as it's a reserved keyword
13+
defaultMode = powerDown // Can't use 'default' as it's a reserved keyword
1414
};
1515

1616
/**
@@ -126,7 +126,7 @@ class OutdoorAirQualitySensor : public I2CDevice {
126126
/**
127127
* @brief Sets the enabled state of the outdoor air quality sensor.
128128
* When disabled the sensor goes in power down mode.
129-
* When the sensor is enabled after being disabled, the sensor will go back to the default mode.
129+
* When the sensor is enabled after being disabled, the sensor will go back to the outdoorAirQuality mode.
130130
* Call persistSettings() on NiclaSenseEnv instance after changing the enabled state to make the change persistent.
131131
* @param isEnabled True to enable the sensor, false to disable it.
132132
*/

0 commit comments

Comments
 (0)