From effdfa49064136a59cbd9d4f59a461e96688ce1e Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 12 Aug 2021 03:01:10 -0600 Subject: made blink_once() brightness configurable per build --- spaghetti-monster/anduril/misc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spaghetti-monster/anduril/misc.c b/spaghetti-monster/anduril/misc.c index 523bbf0..9c7f0dd 100644 --- a/spaghetti-monster/anduril/misc.c +++ b/spaghetti-monster/anduril/misc.c @@ -25,7 +25,7 @@ /* no longer used void blink_confirm(uint8_t num) { uint8_t brightness = actual_level; - uint8_t bump = actual_level + (MAX_LEVEL/6); + uint8_t bump = actual_level + BLINK_BRIGHTNESS; if (bump > MAX_LEVEL) bump = 0; for (; num>0; num--) { set_level(bump); @@ -41,9 +41,12 @@ void blink_confirm(uint8_t num) { #ifndef BLINK_ONCE_TIME #define BLINK_ONCE_TIME 10 #endif +#ifndef BLINK_BRIGHTNESS +#define BLINK_BRIGHTNESS (MAX_LEVEL/6) +#endif void blink_once() { uint8_t brightness = actual_level; - uint8_t bump = brightness + (MAX_LEVEL/6); + uint8_t bump = brightness + BLINK_BRIGHTNESS; if (bump > MAX_LEVEL) bump = 0; set_level(bump); -- cgit v1.2.3