diff --git a/code/espurna/config/dependencies.h b/code/espurna/config/dependencies.h index 9a17f15f..989a65b3 100644 --- a/code/espurna/config/dependencies.h +++ b/code/espurna/config/dependencies.h @@ -47,6 +47,10 @@ #define MQTT_SUPPORT 1 #endif +#if LED_SUPPORT +#undef BROKER_SUPPORT +#define BROKER_SUPPORT 1 // If LED is enabled enable BROKER to supply status changes +#endif #if INFLUXDB_SUPPORT #undef BROKER_SUPPORT diff --git a/code/espurna/gpio.ino b/code/espurna/gpio.ino index e66e02d6..ba0f63bb 100644 --- a/code/espurna/gpio.ino +++ b/code/espurna/gpio.ino @@ -8,7 +8,7 @@ Copyright (C) 2017-2019 by Xose PĂ©rez #include -constexpr const size_t GPIO_PINS = 16; +constexpr const size_t GPIO_PINS = 17; std::bitset _gpio_locked; std::bitset _gpio_available; @@ -59,10 +59,11 @@ void gpioSetup() { || (efuse_blocks[2] & (1 << 16)) ); + // TODO: GPIO16 is only for basic I/O, gpioGetLock before attachInterrupt should check for that for (unsigned char pin=0; pin < GPIO_PINS; ++pin) { if (pin <= 5) _gpio_available.set(pin); if (((pin == 9) || (pin == 10)) && (esp8285)) _gpio_available.set(pin); - if (12 <= pin && pin <= 15) _gpio_available.set(pin); + if (12 <= pin && pin <= 16) _gpio_available.set(pin); } } diff --git a/code/espurna/relay.ino b/code/espurna/relay.ino index ee4b6582..de37e7fd 100644 --- a/code/espurna/relay.ino +++ b/code/espurna/relay.ino @@ -383,7 +383,6 @@ void _relayProcess(bool mode) { if (_relay_sync_locked && needs_unlock && changed) { _relaySyncUnlock(); } - } #if defined(ITEAD_SONOFF_IFAN02)