Skip to content

Commit c0d8e25

Browse files
committed
WLEDMM: we need the same delay when initially switching the relay on
1 parent f4061e6 commit c0d8e25

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

wled00/wled.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ void WLED::beginStrip()
896896
strip.finalizeInit(); // busses created during deserializeConfig()
897897
strip.makeAutoSegments();
898898
strip.setBrightness(0);
899+
strip.fill(BLACK); // WLEDMM avoids random colors at power-on
899900
strip.setShowCallback(handleOverlayDraw);
900901

901902
if (turnOnAtBoot) {
@@ -913,8 +914,11 @@ void WLED::beginStrip()
913914
colorUpdated(CALL_MODE_INIT);
914915

915916
// init relay pin
916-
if (rlyPin>=0)
917+
if (rlyPin>=0) {
918+
delay(FRAMETIME_FIXED); // WLEDMM wait a bit, to ensure that no background led communication is happening while powering on the strip
917919
digitalWrite(rlyPin, (rlyMde ? bri : !bri));
920+
delay(50); // wait for relay to switch and power to stabilize
921+
}
918922
}
919923

920924
void WLED::initAP(bool resetAP)

wled00/wled.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
// version code in format yymmddb (b = daily build)
10-
#define VERSION 2501070
10+
#define VERSION 2501090
1111

1212
// WLEDMM - you can check for this define in usermods, to only enabled WLEDMM specific code in the "right" fork. Its not defined in AC WLED.
1313
#define _MoonModules_WLED_

0 commit comments

Comments
 (0)