Skip to content

Commit

Permalink
TouchDrv fix FT6xxx invalid coordinates returned in green mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Mar 20, 2024
1 parent 3c51983 commit 07f7252
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/TouchDrvFT6X36.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ class TouchDrvFT6X36 :
// uint8_t gesture = buffer[1];
//REG 0x02
uint8_t point = buffer[2] & 0x0F;
if (point == 0 || point == 0x0F) {
return 0;
}

//REG 0x03 ~ 0x04
// uint8_t eventFlag = (buffer[3] & 0xC0) >> 6;
Expand All @@ -236,10 +239,6 @@ class TouchDrvFT6X36 :
uint16_t posY = ((buffer[5] & 0x0F) << 8) | buffer[6] ;


if (point == 0) {
return 0;
}

x_array[0] = posX;
y_array[0] = posY;

Expand Down

0 comments on commit 07f7252

Please sign in to comment.