mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 22:37:18 +00:00
Second attempt at #3541
This commit is contained in:
parent
9e135cc81d
commit
b88344a6c0
@ -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();
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user