We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3fa0d82 + f92df0a commit bcf1d08Copy full SHA for bcf1d08
1 file changed
src/components/uart/drivers/ws_uart_drv_pm25aqi.h
@@ -81,14 +81,17 @@ class ws_uart_drv_pm25aqi : public ws_uart_drv {
81
/*******************************************************************************/
82
bool begin() override {
83
_aqi = new Adafruit_PM25AQI();
84
+ bool is_pm1006 = (strcmp(getDriverID(), "pm1006") == 0);
85
#ifdef USE_SW_UART
86
if (!_aqi->begin_UART(
- _swSerial)) { // connect to the sensor over software serial
87
+ _swSerial, // connect to the sensor over software serial
88
+ is_pm1006)) {
89
return false;
90
}
91
#else
92
- _hwSerial)) { // connect to the sensor over hardware serial
93
+ _hwSerial, // connect to the sensor over hardware serial
94
95
96
97
#endif
0 commit comments