mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-09-12 01:24:04 +00:00
[P056] Fixed bug when SDS sensor is not reporting
Fixed bug that makes the sensor not reporting values even when everything is well connected. The problem is that the Sensor is in "Query reporting" mode, and therefore it is not actively sending values. The fix consist of setting the Sensor in "Active reporting" (command 2,1,0), when setting the working during configuration.
This commit is contained in:
@@ -94,6 +94,9 @@ void CjkSDS011::SetWorkingPeriod(int minutes) {
|
||||
const int currentWorkingPeriod = GetWorkingPeriod();
|
||||
if (minutes != currentWorkingPeriod)
|
||||
SendCommand(8, 1, minutes);
|
||||
// In some cases the Sensor is set to "report query"-mode, this makes sure to set active reporting of values, otherwise the sensor won't work.
|
||||
Process();
|
||||
SendCommand(2, 1, 0);
|
||||
}
|
||||
|
||||
int CjkSDS011::GetWorkingPeriod() {
|
||||
|
||||
Reference in New Issue
Block a user