Skip to content

Conversation

@DedeHai
Copy link
Collaborator

@DedeHai DedeHai commented Jan 9, 2025

helps to stabilize power on the LEDs before sending data

- helps to stabilize power on the LEDs before sending data
@DedeHai DedeHai added this to the 0.15.1 candidate milestone Jan 9, 2025
Copy link
Member

@softhack007 softhack007 left a 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 ...

@DedeHai
Copy link
Collaborator Author

DedeHai commented Jan 9, 2025

the code is only executed once when exiting offmode: at the end of the function, offmode is disabled.

@DedeHai DedeHai merged commit bb0c0af into wled:main Jan 9, 2025
19 checks passed
@softhack007
Copy link
Member

👍

@softhack007
Copy link
Member

@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:

https://github.com/Aircoookie/WLED/blob/bb0c0af1893e774f8401515083097caf0429c381/wled00/wled.cpp#L590-L593

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 🤷‍♂️ ...

softhack007 pushed a commit to MoonModules/WLED-MM that referenced this pull request Jan 9, 2025
- helps to stabilize power on the LEDs before sending data
@DedeHai
Copy link
Collaborator Author

DedeHai commented Jan 10, 2025

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.
in addition (unrelated): I would like to change the "orange color" behavior at bootup: if there are more than 1 segments, it is impossible to get anything else than orange on the higher numbered segments, which actually puzzles me that there was never a request to change that. or it may just be me: I always shut down my lights with a hard switch rather than putting them in standby, so this behaviour of orange at bootup is annoying.
I have a branch with a fix ready for PR with only one downside: if a new segment is created, it will be black instead of orange, to keep that, the web UI would need to set it so as WLED cannot know if a segment is new or if it changed from a preset.

DedeHai added a commit that referenced this pull request Jan 12, 2025
- helps to stabilize power on the LEDs before sending data
@DedeHai DedeHai deleted the relay_delay branch February 10, 2025 19:27
@netmindz netmindz mentioned this pull request May 26, 2025
25 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants