1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
index f454867..f6838da 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
@@ -78,11 +78,12 @@ static void scrollwheel(unsigned int wheel_value)
     };

     int  repeat = 1; /* assume repeat */
-    long time = TIMER2_VALUE + current_tick*TIMER_TICK; /* to timer unit */
+    long time = (TIMER_TICK - TIMER2_VALUE) + current_tick*TIMER_TICK; /* to timer unit */
     long v = (time - last_wheel_post);
+#if 0
     if (v < WHEEL_LOOP_INTERVAL) /* avoid too frequent updates */
         return ;
-
+#endif
    /* interpolate velocity in timer_freq/timer_unit == 1/s */
     if (v) v = TIMER_FREQ / v;