Fix for missing off-only MQTT messages.

Automatic WS reconnect.
This commit is contained in:
Blaz Kristan 2021-07-28 22:45:11 +02:00
parent 392df6ba72
commit 6e9a69be5c
4 changed files with 3027 additions and 3024 deletions

View File

@ -122,6 +122,7 @@ private:
*/
void switchStrip(bool switchOn)
{
if (m_offOnly && bri && (switchOn || (!PIRtriggered && !switchOn))) return;
PIRtriggered = switchOn;
if (switchOn && m_onPreset) {
applyPreset(m_onPreset);
@ -227,7 +228,7 @@ public:
void loop()
{
// only check sensors 4x/s
if (!enabled || millis() - lastLoop < 250 || strip.isUpdating() || (m_offOnly && bri && !PIRtriggered)) return;
if (!enabled || millis() - lastLoop < 250 || strip.isUpdating()) return;
lastLoop = millis();
if (!updatePIRsensorState()) {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2107251
#define VERSION 2107281
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG