freemyipod r393 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r392‎ | r393 | r394 >
Date:03:14, 28 December 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Fix spurious wheel rotation events if the wheel was untouched in the meantime
Modified paths:
  • /embios/trunk/target/ipodnano2g/clickwheel.c (modified) (history)

Diff [purge]

Index: embios/trunk/target/ipodnano2g/clickwheel.c
@@ -73,9 +73,10 @@
7474
7575 if (newtouched)
7676 {
 77+ int distance = 0;
7778 if (!oldtouched) button_send_event(WHEEL_TOUCH, 0, newpos);
 79+ else distance = newpos - oldpos;
7880 button_send_event(WHEEL_POSITION, 0, newpos);
79 - int distance = newpos - oldpos;
8081 DEBUGF("Time since last packet: %d microseconds", USEC_TIMER - lastpacket);
8182 if (TIMEOUT_EXPIRED(lastpacket, 200000))
8283 {