summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/button.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c
index 16a5494e63..20503fd708 100644
--- a/firmware/drivers/button.c
+++ b/firmware/drivers/button.c
@@ -28,9 +28,9 @@
28 28
29static struct event_queue button_queue; 29static struct event_queue button_queue;
30 30
31#define POLL_FREQUENCY HZ/10 31#define POLL_FREQUENCY HZ/20
32#define REPEAT_START 3 32#define REPEAT_START 6
33#define REPEAT_INTERVAL 2 33#define REPEAT_INTERVAL 4
34 34
35static int button_read(void); 35static int button_read(void);
36 36
@@ -42,7 +42,7 @@ static void button_tick(void)
42 static bool repeat=false; 42 static bool repeat=false;
43 43
44 /* only poll every X ticks */ 44 /* only poll every X ticks */
45 if ( tick++ > POLL_FREQUENCY ) { 45 if ( ++tick >= POLL_FREQUENCY ) {
46 bool post = false; 46 bool post = false;
47 int btn = button_read(); 47 int btn = button_read();
48 48