-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for #3955: added a delay after switching relay #4474
Conversation
- helps to stabilize power on the LEDs before sending data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me.
@DedeHai did you check that the delay is only happening once when the relay actually gets switched?
The relay handling code is very old (=hard to read) - a repeated digitalWrite
of the same value would not be noticeable, however a repeated delay might hurt ...
the code is only executed once when exiting |
👍 |
@DedeHai on a second look - do you think that the same delay should also be added at startup when initially controlling the relay? If yes, then maybe this location should also be changed: Lines 590 to 593 in bb0c0af
WLED::beginStrip() runs once at startup, long before handleIO() gets called for the first time. Just a random after-merge thought. Could be I'm just not involved at discord so I missed something important 🤷♂️ ... |
- helps to stabilize power on the LEDs before sending data
I thought about that too, but I have noticed recently, that there may be a bug in that part of the code and I wanted to take a closer look at: I did notice in a test, that the relay did not always switch to on depending on config settings and preset settings. |
helps to stabilize power on the LEDs before sending data