Skip to content

Commit

Permalink
Second attempt at #3541
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Nov 27, 2023
1 parent 9e135cc commit b88344a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions wled00/led.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,8 @@ void stateUpdated(byte callMode) {
usermods.onStateChange(callMode);

if (fadeTransition) {
// restore (global) transition time if not called from UDP notifier or single/temporary transition from JSON (also playlist)
if (!(callMode == CALL_MODE_NOTIFICATION || jsonTransitionOnce)) strip.setTransition(transitionDelay);
jsonTransitionOnce = false;
if (strip.getTransition() == 0) {
jsonTransitionOnce = false;
transitionActive = false;
applyFinalBri();
strip.trigger();
Expand Down Expand Up @@ -190,7 +188,10 @@ void handleTransitions()
float tper = (millis() - transitionStartTime)/(float)strip.getTransition();
if (tper >= 1.0f) {
strip.setTransitionMode(false); // stop all transitions
// restore (global) transition time if not called from UDP notifier or single/temporary transition from JSON (also playlist)
if (jsonTransitionOnce) strip.setTransition(transitionDelay);
transitionActive = false;
jsonTransitionOnce = false;
tperLast = 0;
applyFinalBri();
return;
Expand Down
5 changes: 4 additions & 1 deletion wled00/udp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ void parseNotifyPacket(uint8_t *udpIn) {

// set transition time before making any segment changes
if (version > 3) {
if (fadeTransition) strip.setTransition(((udpIn[17] << 0) & 0xFF) + ((udpIn[18] << 8) & 0xFF00));
if (fadeTransition) {
jsonTransitionOnce = true;
strip.setTransition(((udpIn[17] << 0) & 0xFF) + ((udpIn[18] << 8) & 0xFF00));
}
}

//apply colors from notification to main segment, only if not syncing full segments
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2311150
#define VERSION 2311270

//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
Expand Down

0 comments on commit b88344a

Please sign in to comment.