diff options
| author | Selene ToyKeeper | 2019-09-29 00:02:14 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2019-09-29 00:02:14 -0600 |
| commit | 259b8a4fd4311720733d4da352f66dcf789cfd53 (patch) | |
| tree | f498c5072dd0f32424ef979dcd12bdab78827a18 /spaghetti-monster/fsm-misc.c | |
| parent | remapped D1S V2 pins to match new driver (diff) | |
| parent | after safety ramp-down, if the button remains stuck, lock the light (diff) | |
| download | anduril-259b8a4fd4311720733d4da352f66dcf789cfd53.tar.gz anduril-259b8a4fd4311720733d4da352f66dcf789cfd53.tar.bz2 anduril-259b8a4fd4311720733d4da352f66dcf789cfd53.zip | |
merged from fsm branch to get safety ramp-down and version check functions, among other updates
Diffstat (limited to 'spaghetti-monster/fsm-misc.c')
| -rw-r--r-- | spaghetti-monster/fsm-misc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c index 8e88cbd..0a3cdca 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 |
