From b50e066dee46fef4c7e334e88a36aabc62caf059 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Wed, 27 Oct 2021 17:49:35 +0200 Subject: [PATCH] Reintroduction of STATUSLED --- wled00/wled.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 5079a7fb4..2cb1d39f2 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -158,6 +158,7 @@ void WLED::loop() yield(); handleWs(); + handleStatusLED(); // DEBUG serial logging (every 30s) #ifdef WLED_DEBUG @@ -260,6 +261,14 @@ void WLED::setup() DEBUG_PRINTLN(F("Reading config")); deserializeConfigFromFS(); +#if STATUSLED + if (!pinManager.isPinAllocated(STATUSLED)) { + // NOTE: Special case: The status LED should *NOT* be allocated. + // See comments in handleStatusLed(). + pinMode(STATUSLED, OUTPUT); + } +#endif + DEBUG_PRINTLN(F("Initializing strip")); beginStrip();