From 9cbe8dcdf5586c86a52aca2641f9be2be9495c09 Mon Sep 17 00:00:00 2001 From: Yonsm Date: Mon, 10 Sep 2018 14:41:50 +0800 Subject: [PATCH] Call wakeUp PMS on first reading cycle to avoid not data in a long period (e.g. PMS entered sleeping and then espurna reboot, we should wake up PMS right now) --- code/espurna/sensors/PMSX003Sensor.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/espurna/sensors/PMSX003Sensor.h b/code/espurna/sensors/PMSX003Sensor.h index 9f6ddd4b..7407c699 100644 --- a/code/espurna/sensors/PMSX003Sensor.h +++ b/code/espurna/sensors/PMSX003Sensor.h @@ -269,6 +269,9 @@ class PMSX003Sensor : public BaseSensor, PMSX003 { } } else { readCycle = -1; + if (_readCount == 1) { + wakeUp(); + } } #endif