Skip to content

Commit

Permalink
WLEDMM: we need the same delay when initially switching the relay on
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Jan 9, 2025
1 parent f4061e6 commit c0d8e25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ void WLED::beginStrip()
strip.finalizeInit(); // busses created during deserializeConfig()
strip.makeAutoSegments();
strip.setBrightness(0);
strip.fill(BLACK); // WLEDMM avoids random colors at power-on
strip.setShowCallback(handleOverlayDraw);

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

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

void WLED::initAP(bool resetAP)
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2501070
#define VERSION 2501090

// 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.
#define _MoonModules_WLED_
Expand Down

0 comments on commit c0d8e25

Please sign in to comment.