From 5751d5c1b00fd214ecee6207f44b555be1b0f7d9 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 14 Apr 2021 01:16:32 +0200 Subject: [PATCH] Fixed Button, IR, Relay pin not assigned by default (resolves #1891) Fixed instance discovery not working if MQTT not compiled in --- CHANGELOG.md | 7 +++++++ wled00/mqtt.cpp | 1 - wled00/wled.cpp | 1 + wled00/wled.h | 8 ++++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72c41c354..8ef592858 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ ### Builds after release 0.12.0 +#### Build 2104140 + +- Added dynamic location-based Sunrise/Sunset macros (PR #1889) +- Improved seasonal background handling (PR #1890) +- Fixed instance discovery not working if MQTT not compiled in +- Fixed Button, IR, Relay pin not assigned by default (resolves #1891) + #### Build 2104120 - Added switch support (button macro is switch closing action, long press macro switch opening) diff --git a/wled00/mqtt.cpp b/wled00/mqtt.cpp index 9aa9bf966..01c62450d 100644 --- a/wled00/mqtt.cpp +++ b/wled00/mqtt.cpp @@ -136,7 +136,6 @@ void publishMqtt() bool initMqtt() { - lastMqttReconnectAttempt = millis(); if (!mqttEnabled || mqttServer[0] == 0 || !WLED_CONNECTED) return false; if (mqtt == nullptr) { diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 5d34a9143..adb33ff79 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -234,6 +234,7 @@ void WLED::loop() #endif if (millis() - lastMqttReconnectAttempt > 30000) { if (lastMqttReconnectAttempt > millis()) rolloverMillis++; //millis() rolls over every 50 days + lastMqttReconnectAttempt = millis(); initMqtt(); refreshNodeList(); if (nodeBroadcastEnabled) sendSysInfoUDP(); diff --git a/wled00/wled.h b/wled00/wled.h index 84c329f87..c59eadf99 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2104120 +#define VERSION 2104140 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG @@ -182,12 +182,12 @@ WLED_GLOBAL char otaPass[33] _INIT(DEFAULT_OTA_PASS); // Hardware CONFIG (only changeble HERE, not at runtime) // LED strip pin, button pin and IR pin changeable in NpbWrapper.h! #ifndef BTNPIN -WLED_GLOBAL int8_t btnPin _INIT(-1); +WLED_GLOBAL int8_t btnPin _INIT(0); #else WLED_GLOBAL int8_t btnPin _INIT(BTNPIN); #endif #ifndef RLYPIN -WLED_GLOBAL int8_t rlyPin _INIT(-1); +WLED_GLOBAL int8_t rlyPin _INIT(12); #else WLED_GLOBAL int8_t rlyPin _INIT(RLYPIN); #endif @@ -198,7 +198,7 @@ WLED_GLOBAL bool rlyMde _INIT(true); WLED_GLOBAL bool rlyMde _INIT(RLYMDE); #endif #ifndef IRPIN -WLED_GLOBAL int8_t irPin _INIT(-1); +WLED_GLOBAL int8_t irPin _INIT(4); #else WLED_GLOBAL int8_t irPin _INIT(IRPIN); #endif