From 403314ed83c9398cbb7fc8c8e99b32a593811958 Mon Sep 17 00:00:00 2001 From: Thammi Date: Thu, 11 Oct 2012 19:25:58 +0200 Subject: [PATCH] Deactivate modeswitch_poll() if power down in progress --- firmware/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/main.c b/firmware/main.c index bf74a3e..402618d 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -137,7 +137,10 @@ void __attribute__ ((noreturn)) main(void) for ever { //main polling loop; button_poll(); - modeswitch_poll(); + + if(OpMode < mode_num) { + modeswitch_poll(); + } if (OpMode != NextMode){ mode_last_tick = true;