aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-misc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-10-15 02:34:47 -0600
committerSelene ToyKeeper2019-10-15 02:34:47 -0600
commitc2e7b42b14271acbae1b28ae2289005dcb92e420 (patch)
tree23a3aa19171fc461b25acad76afc94599c362cc7 /spaghetti-monster/fsm-misc.c
parentslowed down rainbow RGB mode, added a ramp-down on stuck-button for safety pu... (diff)
parentmerged Emisar D4S V2 support branch (diff)
downloadanduril-c2e7b42b14271acbae1b28ae2289005dcb92e420.tar.gz
anduril-c2e7b42b14271acbae1b28ae2289005dcb92e420.tar.bz2
anduril-c2e7b42b14271acbae1b28ae2289005dcb92e420.zip
merged changes from fsm branch, including version check and stuck-button safety
Diffstat (limited to 'spaghetti-monster/fsm-misc.c')
-rw-r--r--spaghetti-monster/fsm-misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c
index 18dc7c5..8da7b5b 100644
--- a/spaghetti-monster/fsm-misc.c
+++ b/spaghetti-monster/fsm-misc.c
@@ -41,20 +41,21 @@ void auto_clock_speed() {
#endif
#if defined(USE_BLINK_NUM) || defined(USE_BLINK_DIGIT)
+#define BLINK_SPEED 1000
uint8_t blink_digit(uint8_t num) {
//StatePtr old_state = current_state;
// "zero" digit gets a single short blink
- uint8_t ontime = 200;
+ uint8_t ontime = BLINK_SPEED * 2 / 10;
if (!num) { ontime = 8; num ++; }
for (; num>0; num--) {
set_level(BLINK_BRIGHTNESS);
nice_delay_ms(ontime);
set_level(0);
- nice_delay_ms(400);
+ nice_delay_ms(BLINK_SPEED * 3 / 10);
}
- return nice_delay_ms(600);
+ return nice_delay_ms(BLINK_SPEED * 5 / 10);
}
#endif