mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-16 02:02:11 +02:00
Revert "Explicitly set active mode for PM sensor upon initialization"
This reverts commit 0d39643e76
.
This commit is contained in:
@ -697,7 +697,7 @@ static void oneIndoorInit(void) {
|
||||
ledBarEnabledUpdate();
|
||||
|
||||
/** Show message init sensor */
|
||||
oledDisplay.setText("Monitor", "initializing...", "");
|
||||
oledDisplay.setText("Sensor", "initializing...", "");
|
||||
|
||||
/** Init sensor SGP41 */
|
||||
if (sgp41Init() == false) {
|
||||
@ -778,27 +778,27 @@ static void openAirInit(void) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Attempt to detect PM sensors */
|
||||
/** Try to find the PMS on other difference port with S8 */
|
||||
if (fwMode == FW_MODE_O_1PST) {
|
||||
bool pmInitSuccess = false;
|
||||
if (serial0Available) {
|
||||
if (ag->pms5003t_1.begin(Serial0) == false) {
|
||||
configuration.hasSensorPMS1 = false;
|
||||
Serial.println("No PM sensor detected on Serial0");
|
||||
Serial.println("PMS1 sensor not found");
|
||||
} else {
|
||||
serial0Available = false;
|
||||
pmInitSuccess = true;
|
||||
Serial.println("Detected PM 1 on Serial0");
|
||||
Serial.println("Found PMS 1 on Serial0");
|
||||
}
|
||||
}
|
||||
if (pmInitSuccess == false) {
|
||||
if (serial1Available) {
|
||||
if (ag->pms5003t_1.begin(Serial1) == false) {
|
||||
configuration.hasSensorPMS1 = false;
|
||||
Serial.println("No PM sensor detected on Serial1");
|
||||
Serial.println("PMS1 sensor not found");
|
||||
} else {
|
||||
serial1Available = false;
|
||||
Serial.println("Detected PM 1 on Serial1");
|
||||
Serial.println("Found PMS 1 on Serial1");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -806,15 +806,15 @@ static void openAirInit(void) {
|
||||
} else {
|
||||
if (ag->pms5003t_1.begin(Serial0) == false) {
|
||||
configuration.hasSensorPMS1 = false;
|
||||
Serial.println("No PM sensor detected on Serial0");
|
||||
Serial.println("PMS1 sensor not found");
|
||||
} else {
|
||||
Serial.println("Detected PM 1 on Serial0");
|
||||
Serial.println("Found PMS 1 on Serial0");
|
||||
}
|
||||
if (ag->pms5003t_2.begin(Serial1) == false) {
|
||||
configuration.hasSensorPMS2 = false;
|
||||
Serial.println("No PM sensor detected on Serial1");
|
||||
Serial.println("PMS2 sensor not found");
|
||||
} else {
|
||||
Serial.println("Detected PM 2 on Serial1");
|
||||
Serial.println("Found PMS 2 on Serial1");
|
||||
}
|
||||
|
||||
if (fwMode == FW_MODE_O_1PP) {
|
||||
|
Reference in New Issue
Block a user