aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-misc.c
diff options
context:
space:
mode:
authorSelene ToyKeeper2019-09-29 00:02:14 -0600
committerSelene ToyKeeper2019-09-29 00:02:14 -0600
commit259b8a4fd4311720733d4da352f66dcf789cfd53 (patch)
treef498c5072dd0f32424ef979dcd12bdab78827a18 /spaghetti-monster/fsm-misc.c
parentremapped D1S V2 pins to match new driver (diff)
parentafter safety ramp-down, if the button remains stuck, lock the light (diff)
downloadanduril-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.c7
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