mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 08:46:34 +00:00
wled.cpp: Wrap Serial calls in #ifdef WLED_ENABLE_ADALIGHT
. (#2630)
handleImprovPacket() unconditionally gobbles serial data which a problem if we want another feature to consume it. This patch uses the same guard as the existing call in `handleSerial()`. Co-authored-by: Thomas Fubar <FUB4R@users.noreply.github.com>
This commit is contained in:
parent
d1f76042e1
commit
1a513c7bbf
@ -389,7 +389,9 @@ void WLED::setup()
|
|||||||
sprintf(mqttClientID + 5, "%*s", 6, escapedMac.c_str() + 6);
|
sprintf(mqttClientID + 5, "%*s", 6, escapedMac.c_str() + 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLED_ENABLE_ADALIGHT
|
||||||
if (Serial.available() > 0 && Serial.peek() == 'I') handleImprovPacket();
|
if (Serial.available() > 0 && Serial.peek() == 'I') handleImprovPacket();
|
||||||
|
#endif
|
||||||
|
|
||||||
strip.service();
|
strip.service();
|
||||||
|
|
||||||
@ -409,7 +411,10 @@ void WLED::setup()
|
|||||||
initDMX();
|
initDMX();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLED_ENABLE_ADALIGHT
|
||||||
if (Serial.available() > 0 && Serial.peek() == 'I') handleImprovPacket();
|
if (Serial.available() > 0 && Serial.peek() == 'I') handleImprovPacket();
|
||||||
|
#endif
|
||||||
|
|
||||||
// HTTP server page init
|
// HTTP server page init
|
||||||
initServer();
|
initServer();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user