Skip to content

Commit

Permalink
Make Rainbow pattern turn completely off during dimming period when B…
Browse files Browse the repository at this point in the history
…ACKLIGHT_DIMMED_INTENSITY is 0 (#118)

Co-authored-by: bitrot-alpha <>
  • Loading branch information
bitrot-alpha authored Jan 30, 2025
1 parent a337352 commit f8123e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion EleksTubeHAX_pio/src/Backlights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ void Backlights::rainbowPattern()
}
if (dimming)
{
setBrightness(0xFF >> max_intensity - (uint8_t)BACKLIGHT_DIMMED_INTENSITY - 1);
#if BACKLIGHT_DIMMED_INTENSITY > 0
setBrightness(0xFF >> max_intensity - (uint8_t)BACKLIGHT_DIMMED_INTENSITY - 1);
#else //turn off backlight if intensity is 0
setBrightness(0);
#endif
}
else
{
Expand Down

0 comments on commit f8123e4

Please sign in to comment.