From 70a5d8b843c4c56aa4a8afc88d0e2171f1e42e51 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 4 May 2024 01:16:45 +0200 Subject: [PATCH] a few more compile-time infos about enabled/disabled features helps to understand what you'll get --- wled00/alexa.cpp | 1 + wled00/dmx_output.cpp | 1 + wled00/hue.cpp | 1 + wled00/ir.cpp | 1 + wled00/json.cpp | 2 ++ wled00/lx_parser.cpp | 2 ++ wled00/mqtt.cpp | 2 ++ wled00/net_debug.cpp | 2 ++ wled00/wled_serial.cpp | 2 ++ wled00/ws.cpp | 1 + 10 files changed, 15 insertions(+) diff --git a/wled00/alexa.cpp b/wled00/alexa.cpp index 179a522c..b02c10e5 100644 --- a/wled00/alexa.cpp +++ b/wled00/alexa.cpp @@ -139,4 +139,5 @@ void onAlexaChange(EspalexaDevice* dev) #else void alexaInit(){} void handleAlexa(){} + #pragma message "Alexa interface disabled" #endif diff --git a/wled00/dmx_output.cpp b/wled00/dmx_output.cpp index aa01c8a3..b3f2eadd 100644 --- a/wled00/dmx_output.cpp +++ b/wled00/dmx_output.cpp @@ -11,6 +11,7 @@ */ #ifdef WLED_ENABLE_DMX +#pragma message "DMX network output enabled" // WLEDMM: seems that DMX output triggers watchdog resets when compiling for IDF 4.4.x #ifdef ARDUINO_ARCH_ESP32 diff --git a/wled00/hue.cpp b/wled00/hue.cpp index 950c5489..54cddd33 100644 --- a/wled00/hue.cpp +++ b/wled00/hue.cpp @@ -205,4 +205,5 @@ void onHueData(void* arg, AsyncClient* client, void *data, size_t len) #else void handleHue(){} void reconnectHue(){} +#pragma message "Philips HUE bridge interface disabled" #endif diff --git a/wled00/ir.cpp b/wled00/ir.cpp index c3e12544..bfb79264 100644 --- a/wled00/ir.cpp +++ b/wled00/ir.cpp @@ -7,6 +7,7 @@ */ #if defined(WLED_DISABLE_INFRARED) +#pragma message "IR remote support disabled" void handleIR(){} #else diff --git a/wled00/json.cpp b/wled00/json.cpp index dbb51f91..35d19198 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -1529,6 +1529,8 @@ void serveJson(AsyncWebServerRequest* request) #ifdef WLED_ENABLE_JSONLIVE #define MAX_LIVE_LEDS 180 +#warning "JSON Live enabled" + bool serveLiveLeds(AsyncWebServerRequest* request, uint32_t wsClient) { #ifdef WLED_ENABLE_WEBSOCKETS diff --git a/wled00/lx_parser.cpp b/wled00/lx_parser.cpp index e717f941..5fe7c18c 100644 --- a/wled00/lx_parser.cpp +++ b/wled00/lx_parser.cpp @@ -68,4 +68,6 @@ void parseLxJson(int lxValue, byte segId, bool secondary) } } +#else +#pragma message "Loxone support disabled" #endif diff --git a/wled00/mqtt.cpp b/wled00/mqtt.cpp index a5caaf47..31162148 100644 --- a/wled00/mqtt.cpp +++ b/wled00/mqtt.cpp @@ -195,4 +195,6 @@ bool initMqtt() mqtt->connect(); return true; } +#else +#pragma message "MQTT disabled" #endif diff --git a/wled00/net_debug.cpp b/wled00/net_debug.cpp index a345dd30..43c47ac1 100644 --- a/wled00/net_debug.cpp +++ b/wled00/net_debug.cpp @@ -26,4 +26,6 @@ size_t NetworkDebugPrinter::write(const uint8_t *buf, size_t size) { NetworkDebugPrinter NetDebug; +#else +#pragma message "Net debug disabled" #endif diff --git a/wled00/wled_serial.cpp b/wled00/wled_serial.cpp index 596b5791..dd03d8be 100644 --- a/wled00/wled_serial.cpp +++ b/wled00/wled_serial.cpp @@ -229,6 +229,8 @@ void handleSerial() //#ifdef WLED_DEBUG if ((millis() - startTime) > SERIAL_MAXTIME_MILLIS) { USER_PRINTLN(F("handleSerial(): need a break after >100ms of activity.")); } //#endif + #else + #pragma message "Serial protocols (AdaLight, Serial JSON, Serial LED driver) disabled" #endif // If Continuous Serial Streaming is enabled, send new LED data as bytes diff --git a/wled00/ws.cpp b/wled00/ws.cpp index 351caad4..08624b1e 100644 --- a/wled00/ws.cpp +++ b/wled00/ws.cpp @@ -313,4 +313,5 @@ void handleWs() #else void handleWs() {} void sendDataWs(AsyncWebSocketClient * client) {} +#pragma message "WebSockets disabled - no live preview." #endif