Fixed Button, IR, Relay pin not assigned by default (resolves #1891)

Fixed instance discovery not working if MQTT not compiled in
This commit is contained in:
cschwinne 2021-04-14 01:16:32 +02:00
parent 3d2336aac1
commit 5751d5c1b0
4 changed files with 12 additions and 5 deletions

View File

@ -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)

View File

@ -136,7 +136,6 @@ void publishMqtt()
bool initMqtt()
{
lastMqttReconnectAttempt = millis();
if (!mqttEnabled || mqttServer[0] == 0 || !WLED_CONNECTED) return false;
if (mqtt == nullptr) {

View File

@ -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();

View File

@ -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