From e4b166655bb7c93388a6b01083f0f332578f11b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=87=AF?= Date: Wed, 11 Aug 2021 10:02:37 +0000 Subject: [PATCH] Signed-off-by: YOUR_NAME --- model/input/driver/touchscreen/touch_gt911.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/input/driver/touchscreen/touch_gt911.c b/model/input/driver/touchscreen/touch_gt911.c index 7ed36242e..fb3f5e96f 100644 --- a/model/input/driver/touchscreen/touch_gt911.c +++ b/model/input/driver/touchscreen/touch_gt911.c @@ -95,12 +95,12 @@ static void ParsePointData(ChipDevice *device, FrameData *frame, uint8_t *buf, u if (chipVer == 0) { // chipversion A:gt911_zsj5p5 frame->fingers[i].trackId = buf[GT_POINT_SIZE * i + GT_TRACK_ID]; #if defined(CONFIG_ARCH_SPRD) - frame->fingers[i].y = (resY - 1 - ((buf[GT_POINT_SIZE * i + GT_X_LOW] & ONE_BYTE_MASK) | + frame->fingers[i].y = (resX - 1 - ((buf[GT_POINT_SIZE * i + GT_X_LOW] & ONE_BYTE_MASK) | ((buf[GT_POINT_SIZE * i + GT_X_HIGH] & ONE_BYTE_MASK) << - ONE_BYTE_OFFSET))) * resX / resY; + ONE_BYTE_OFFSET))) * resY / resX; frame->fingers[i].x = ((buf[GT_POINT_SIZE * i + GT_Y_LOW] & ONE_BYTE_MASK) | ((buf[GT_POINT_SIZE * i + GT_Y_HIGH] & ONE_BYTE_MASK) << - ONE_BYTE_OFFSET)) * resY / resX; + ONE_BYTE_OFFSET)) * resX / resY; #else frame->fingers[i].y = (buf[GT_POINT_SIZE * i + GT_X_LOW] & ONE_BYTE_MASK) | ((buf[GT_POINT_SIZE * i + GT_X_HIGH] & ONE_BYTE_MASK) << ONE_BYTE_OFFSET); -- Gitee