Skip to content

Commit

Permalink
Brightness Scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
chillfactor032 committed May 29, 2024
1 parent 6fa4f25 commit 7d112db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion usermods/FlashEffect/flash_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ struct FlashEffect : Usermod {
}

if (SEGMENT.call < SEGMENT.aux0) {
uint32_t color = SEGCOLOR(0);
uint32_t amount = (SEGMENT.aux0 - SEGMENT.call) * 20;
if (amount > 255) {
amount = 255;
}
uint32_t color = color_fade(SEGCOLOR(0), amount, false);
SEGMENT.fill(color);
} else if (SEGMENT.call == SEGMENT.aux0) {
uint32_t color = SEGCOLOR(1);
Expand Down

0 comments on commit 7d112db

Please sign in to comment.