From 553f00a1694bfb068bfd67a66761c0dbade5f088 Mon Sep 17 00:00:00 2001 From: Dmitry Tunin Date: Fri, 17 Apr 2015 14:54:00 +0300 Subject: [PATCH] Fixed error in parsing relative packet --- init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.c b/init.c index ec58cbf..6443823 100644 --- a/init.c +++ b/init.c @@ -162,8 +162,8 @@ void parse_packet(unsigned char *data) fingers[finger1].y += (int8_t)data[2]; int finger2 = ((data[3] >> 4) & 0x7) - 1; if (finger2 != -1) { - fingers[finger2].x += (int8_t)data[1]; - fingers[finger2].y += (int8_t)data[2]; + fingers[finger2].x += (int8_t)data[4]; + fingers[finger2].y += (int8_t)data[5]; } clicked = data[0] >> 7; } else {