From e54519e85b06a8c570abbed178f94be093e0d910 Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf Date: Tue, 31 Jul 2012 14:06:21 +0200 Subject: [PATCH] improve exit logik by debouncing both: press and release of JUMPER Signed-off-by: Stephan Baerwolf --- firmware/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index 1b70c71..a029169 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -374,13 +374,13 @@ int __attribute__((noreturn)) main(void) } } #endif - if (stayinloader > 0x04) { + if (stayinloader > 0x10) { if (!bootLoaderCondition()) { - stayinloader-=0x04; + stayinloader-=0x10; } } else { if (bootLoaderCondition()) { - stayinloader &= 0x01; + if (stayinloader > 1) stayinloader-=2; } } -- 2.11.0