Skip to content

Commit 8fce4ab

Browse files
committed
feat(matter): solves not used variables
1 parent 4e4477d commit 8fce4ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Matter/examples/MatterWindowCovering/MatterWindowCovering.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ const uint8_t ledPin = 2; // Set your pin here if your board has not defined RG
7171
#endif
7272

7373
void visualizeWindowBlinds(uint8_t liftPercent, uint8_t tiltPercent) {
74+
#ifdef RGB_BUILTIN
7475
// Use RGB LED to visualize lift position (brightness) and tilt (color shift)
7576
float brightness = (float)liftPercent / 100.0; // 0.0 to 1.0
76-
#ifdef RGB_BUILTIN
7777
// Tilt affects color: 0% = red, 100% = blue
7878
uint8_t red = (uint8_t)(map(tiltPercent, 0, 100, 255, 0) * brightness);
7979
uint8_t blue = (uint8_t)(map(tiltPercent, 0, 100, 0, 255) * brightness);

0 commit comments

Comments
 (0)