Skip to content

Commit

Permalink
improved some delays on auto detection and some init methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hpsaturn committed Jun 2, 2021
1 parent 4a8890b commit 1dccb91
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ bool Sensors::sps30Read() {
DEBUG("-->[E][SPS30] Error during reading values: ", String(ret).c_str());
return false;
}
delay(1000);
delay(500);
} else if (ret != ERR_OK) {
sps30ErrToMess((char *)"-->[W][SPS30] Error during reading values: ", ret);
return false;
Expand Down Expand Up @@ -745,7 +745,6 @@ bool Sensors::sps30I2CInit() {

// start measurement
if (sps30.start()) {
delay(100);
sps30Read();
DEBUG("-->[SPS30] Measurement OK");
device_selected = "SENSIRION";
Expand Down Expand Up @@ -956,7 +955,7 @@ bool Sensors::serialInit(int pms_type, long speed_baud, int pms_rx, int pms_tx)
break;
}

delay(100);
delay(10);
return true;
}

Expand Down

0 comments on commit 1dccb91

Please sign in to comment.