From 20031f941e72ce9eaaed40d155f07c679395deb6 Mon Sep 17 00:00:00 2001 From: Michael Hayes Date: Fri, 6 Sep 2013 10:57:43 +1200 Subject: [PATCH] Increase delay when polling navswitch --- drivers/navswitch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/navswitch.c b/drivers/navswitch.c index 723eef0..00fca44 100644 --- a/drivers/navswitch.c +++ b/drivers/navswitch.c @@ -127,8 +127,10 @@ navswitch_update (void) /* I'm unsure why this is needed. It wasn't required for the slightly slower PIO implementation. There may be a minimum number of CPU clock cycles for the synchronising flip flops - to propagate the input state? */ - DELAY_US (1.0); + to propagate the input state? For some reason the boards + made in 2013 need a longer delay. Increasing the charge + time before switching to an input does not help.*/ + DELAY_US (2.0); navswitch_state[i].current = pio_input_get (navswitch_cfg[i].pio) == 0;