@@ -221,7 +221,7 @@ void parseNotifyPacket(uint8_t *udpIn) {
221
221
if (!(receiveGroups & 0x01 )) return ;
222
222
} else if (!(receiveGroups & udpIn[36 ])) return ;
223
223
224
- bool someSel = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects);
224
+ bool someSel = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects || receiveNotificationPalette );
225
225
226
226
// set transition time before making any segment changes
227
227
if (version > 3 ) {
@@ -311,6 +311,9 @@ void parseNotifyPacket(uint8_t *udpIn) {
311
311
selseg.setMode (udpIn[11 +ofs]);
312
312
selseg.speed = udpIn[12 +ofs];
313
313
selseg.intensity = udpIn[13 +ofs];
314
+ }
315
+ if (receiveNotificationPalette || !someSel) {
316
+ DEBUG_PRINTF_P (PSTR (" Apply palette: %u\n " ), id);
314
317
selseg.palette = udpIn[14 +ofs];
315
318
}
316
319
if (receiveNotificationColor || !someSel) {
@@ -352,14 +355,16 @@ void parseNotifyPacket(uint8_t *udpIn) {
352
355
}
353
356
354
357
// simple effect sync, applies to all selected segments
355
- if (applyEffects && (version < 11 || !receiveSegmentOptions)) {
358
+ if (( applyEffects || receiveNotificationPalette) && (version < 11 || !receiveSegmentOptions)) {
356
359
for (size_t i = 0 ; i < strip.getSegmentsNum (); i++) {
357
360
Segment& seg = strip.getSegment (i);
358
361
if (!seg.isActive () || !seg.isSelected ()) continue ;
359
- seg.setMode (udpIn[8 ]);
360
- seg.speed = udpIn[9 ];
361
- if (version > 2 ) seg.intensity = udpIn[16 ];
362
- if (version > 4 ) seg.setPalette (udpIn[19 ]);
362
+ if (applyEffects) {
363
+ seg.setMode (udpIn[8 ]);
364
+ seg.speed = udpIn[9 ];
365
+ if (version > 2 ) seg.intensity = udpIn[16 ];
366
+ }
367
+ if (version > 4 && receiveNotificationPalette) seg.setPalette (udpIn[19 ]);
363
368
}
364
369
stateChanged = true ;
365
370
}
0 commit comments