@@ -83,6 +83,7 @@ void EncoderClass::PushButtonHandler() { //
8383 if (millis ()-lastPushed>150 ) { // if time > 250ms then allow set //
8484 _ButtonPresses++; // Increment the counter //
8585 _LEDChanged = true ; // We are changing target values //
86+ changed = true ; // Something has changed //
8687 lastPushed = millis (); // Store new push button time //
8788 _RedTarget = _ColorPushButtonR; // Set target color //
8889 _GreenTarget = _ColorPushButtonG; // Set target color //
@@ -107,12 +108,14 @@ void EncoderClass::PushButtonHandler() { //
107108 uint8_t sum = (lastEncoded << 2 ) | encoded; // add to previously encoded value //
108109 if (sum==0b1101 ||sum==0b0100 ||sum==0b0010 ||sum==0b1011 ) { // if clockwise turn direction //
109110 _EncoderValue++; // add value and brighten the //
111+ changed = true ; // Something has changed //
110112 _LEDChanged = true ; // We are changing target values //
111113 _RedTarget = _ColorCWR; // Set target color //
112114 _GreenTarget = _ColorCWG; // Set target color //
113115 _BlueTarget = _ColorCWB; // Set target color //
114116 } else if (sum==0b1110 ||sum==0b0111 ||sum==0b0001 ||sum==0b1000 ) { // if a counterclockwise turn //
115117 _EncoderValue--; // subtract the value and brighten //
118+ changed = true ; // Something has changed //
116119 _LEDChanged = true ; // We are changing target values //
117120 _RedTarget = _ColorCCWR; // Set target color //
118121 _GreenTarget = _ColorCCWG; // Set target color //
0 commit comments