From 14f3427a9dcd5e421cddba894e30018b3b0b00f0 Mon Sep 17 00:00:00 2001 From: Niek van der Maas Date: Mon, 7 Jan 2019 22:05:51 +0100 Subject: [PATCH 1/4] Fix compile error when RF_SUPPORT is enabled (#1475) --- code/espurna/rfbridge.ino | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index 818280dc..aa702c58 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -152,9 +152,6 @@ void _rfbLearn() { } - -#if not RF_SUPPORT - /* From an hexa char array ("A220EE...") to a byte array (half the size) */ @@ -170,6 +167,8 @@ static int _rfbToArray(const char * in, byte * out, int length = RF_MESSAGE_SIZE return n; } +#if not RF_SUPPORT + void _rfbSendRaw(const byte *message, const unsigned char n = RF_MESSAGE_SIZE) { for (unsigned char j=0; j Date: Mon, 7 Jan 2019 22:06:47 +0100 Subject: [PATCH 2/4] Fix compile error when TERMINAL_SUPPORT is disabled (#1426) --- code/espurna/ota.ino | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/espurna/ota.ino b/code/espurna/ota.ino index a6dcaeb5..7bef2829 100644 --- a/code/espurna/ota.ino +++ b/code/espurna/ota.ino @@ -28,7 +28,7 @@ void _otaLoop() { // Terminal OTA // ----------------------------------------------------------------------------- -#if TERMINAL_SUPPORT +#if TERMINAL_SUPPORT || OTA_MQTT_SUPPORT #include AsyncClient * _ota_client; @@ -186,6 +186,11 @@ void _otaFrom(String url) { } +#endif // TERMINAL_SUPPORT || OTA_MQTT_SUPPORT + + +#if TERMINAL_SUPPORT + void _otaInitCommands() { settingsRegisterCommand(F("OTA"), [](Embedis* e) { From 97ee520907e77b3ef804d9e2542f5217dffd5e08 Mon Sep 17 00:00:00 2001 From: Niek van der Maas Date: Tue, 8 Jan 2019 12:14:55 +0100 Subject: [PATCH 3/4] Fix compile error when both RF_SUPPORT are API_SUPPORT are enabled --- code/espurna/rfbridge.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index aa702c58..0734e861 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -555,6 +555,7 @@ void _rfbMqttCallback(unsigned int type, const char * topic, const char * payloa void _rfbAPISetup() { + #if not RF_SUPPORT apiRegister(MQTT_TOPIC_RFOUT, [](char * buffer, size_t len) { snprintf_P(buffer, len, PSTR("OK")); @@ -563,6 +564,7 @@ void _rfbAPISetup() { _rfbParseCode((char *) payload); } ); + #endif // RF_SUPPORT apiRegister(MQTT_TOPIC_RFLEARN, [](char * buffer, size_t len) { From 951155a1ee4409c9724af26690f666255bc3b0c7 Mon Sep 17 00:00:00 2001 From: Niek van der Maas Date: Tue, 8 Jan 2019 12:14:55 +0100 Subject: [PATCH 4/4] Fix compile error when both RF_SUPPORT and API_SUPPORT are enabled --- code/espurna/rfbridge.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index aa702c58..0734e861 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -555,6 +555,7 @@ void _rfbMqttCallback(unsigned int type, const char * topic, const char * payloa void _rfbAPISetup() { + #if not RF_SUPPORT apiRegister(MQTT_TOPIC_RFOUT, [](char * buffer, size_t len) { snprintf_P(buffer, len, PSTR("OK")); @@ -563,6 +564,7 @@ void _rfbAPISetup() { _rfbParseCode((char *) payload); } ); + #endif // RF_SUPPORT apiRegister(MQTT_TOPIC_RFLEARN, [](char * buffer, size_t len) {