File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
libraries/Matter/examples/MatterWindowCovering Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -331,18 +331,18 @@ void loop() {
331331 if (digitalRead (buttonPin) == HIGH && button_state && time_diff > debounceTime) {
332332 // Button is released - cycle lift percentage by 20%
333333 button_state = false ; // released
334- uint8_t myTargetLiftPercent = currentLiftPercent;
334+ uint8_t targetLiftPercent = currentLiftPercent;
335335 // go to the closest next 20% or move 20% more
336- if ((myTargetLiftPercent % 20 ) != 0 ) {
337- myTargetLiftPercent = ((myTargetLiftPercent / 20 ) + 1 ) * 20 ;
336+ if ((targetLiftPercent % 20 ) != 0 ) {
337+ targetLiftPercent = ((targetLiftPercent / 20 ) + 1 ) * 20 ;
338338 } else {
339- myTargetLiftPercent += 20 ;
339+ targetLiftPercent += 20 ;
340340 }
341- if (myTargetLiftPercent > 100 ) {
342- myTargetLiftPercent = 0 ;
341+ if (targetLiftPercent > 100 ) {
342+ targetLiftPercent = 0 ;
343343 }
344- Serial.printf (" User button released. Setting lift to %d%%\r\n " , myTargetLiftPercent );
345- WindowBlinds.setTargetLiftPercent100ths (myTargetLiftPercent * 100 );
344+ Serial.printf (" User button released. Setting lift to %d%%\r\n " , targetLiftPercent );
345+ WindowBlinds.setTargetLiftPercent100ths (targetLiftPercent * 100 );
346346 }
347347
348348 // Onboard User Button is kept pressed for longer than 5 seconds in order to decommission matter node
You can’t perform that action at this time.
0 commit comments