Subversion Repositories freemyipod

Rev

Rev 198 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 198 Rev 393
Line 71... Line 71...
71
                    else button_send_event(BUTTON_PRESS, i, 0);
71
                    else button_send_event(BUTTON_PRESS, i, 0);
72
                }
72
                }
73
 
73
 
74
            if (newtouched)
74
            if (newtouched)
75
            {
75
            {
-
 
76
                int distance = 0;
76
                if (!oldtouched) button_send_event(WHEEL_TOUCH, 0, newpos);
77
                if (!oldtouched) button_send_event(WHEEL_TOUCH, 0, newpos);
-
 
78
                else distance = newpos - oldpos;
77
                button_send_event(WHEEL_POSITION, 0, newpos);
79
                button_send_event(WHEEL_POSITION, 0, newpos);
78
                int distance = newpos - oldpos;
-
 
79
                DEBUGF("Time since last packet: %d microseconds", USEC_TIMER - lastpacket);
80
                DEBUGF("Time since last packet: %d microseconds", USEC_TIMER - lastpacket);
80
                if (TIMEOUT_EXPIRED(lastpacket, 200000))
81
                if (TIMEOUT_EXPIRED(lastpacket, 200000))
81
                {
82
                {
82
                    DEBUGF("Resetting accel due to timeout");
83
                    DEBUGF("Resetting accel due to timeout");
83
                    packets = 10;
84
                    packets = 10;