@@ -516,7 +516,7 @@ void RotaryEncoderUIUsermod::setup()
516516
517517 loopTime = millis ();
518518
519- currentCCT = (approximateKelvinFromRGB (RGBW32 (col [0 ], col [1 ], col [2 ], col [3 ])) - 1900 ) >> 5 ;
519+ currentCCT = (approximateKelvinFromRGB (RGBW32 (colPri [0 ], colPri [1 ], colPri [2 ], colPri [3 ])) - 1900 ) >> 5 ;
520520
521521 if (!initDone) sortModesAndPalettes ();
522522
@@ -918,17 +918,17 @@ void RotaryEncoderUIUsermod::changeHue(bool increase){
918918 display->updateRedrawTime ();
919919#endif
920920 currentHue1 = max (min ((increase ? currentHue1+fadeAmount : currentHue1-fadeAmount), 255 ), 0 );
921- colorHStoRGB (currentHue1*256 , currentSat1, col );
921+ colorHStoRGB (currentHue1*256 , currentSat1, colPri );
922922 stateChanged = true ;
923923 if (applyToAll) {
924924 for (unsigned i=0 ; i<strip.getSegmentsNum (); i++) {
925925 Segment& seg = strip.getSegment (i);
926926 if (!seg.isActive ()) continue ;
927- seg.colors [0 ] = RGBW32 (col [0 ], col [1 ], col [2 ], col [3 ]);
927+ seg.colors [0 ] = RGBW32 (colPri [0 ], colPri [1 ], colPri [2 ], colPri [3 ]);
928928 }
929929 } else {
930930 Segment& seg = strip.getSegment (strip.getMainSegmentId ());
931- seg.colors [0 ] = RGBW32 (col [0 ], col [1 ], col [2 ], col [3 ]);
931+ seg.colors [0 ] = RGBW32 (colPri [0 ], colPri [1 ], colPri [2 ], colPri [3 ]);
932932 }
933933 lampUdated ();
934934#ifdef USERMOD_FOUR_LINE_DISPLAY
@@ -948,16 +948,16 @@ void RotaryEncoderUIUsermod::changeSat(bool increase){
948948 display->updateRedrawTime ();
949949#endif
950950 currentSat1 = max (min ((increase ? currentSat1+fadeAmount : currentSat1-fadeAmount), 255 ), 0 );
951- colorHStoRGB (currentHue1*256 , currentSat1, col );
951+ colorHStoRGB (currentHue1*256 , currentSat1, colPri );
952952 if (applyToAll) {
953953 for (unsigned i=0 ; i<strip.getSegmentsNum (); i++) {
954954 Segment& seg = strip.getSegment (i);
955955 if (!seg.isActive ()) continue ;
956- seg.colors [0 ] = RGBW32 (col [0 ], col [1 ], col [2 ], col [3 ]);
956+ seg.colors [0 ] = RGBW32 (colPri [0 ], colPri [1 ], colPri [2 ], colPri [3 ]);
957957 }
958958 } else {
959959 Segment& seg = strip.getSegment (strip.getMainSegmentId ());
960- seg.colors [0 ] = RGBW32 (col [0 ], col [1 ], col [2 ], col [3 ]);
960+ seg.colors [0 ] = RGBW32 (colPri [0 ], colPri [1 ], colPri [2 ], colPri [3 ]);
961961 }
962962 lampUdated ();
963963#ifdef USERMOD_FOUR_LINE_DISPLAY
0 commit comments