touch sensor correction issue#18
This commit is contained in:
@@ -31,6 +31,6 @@
|
||||
/*
|
||||
* firmeware version string
|
||||
*/
|
||||
#define __FIRMWARE__ "2020080312"
|
||||
#define __FIRMWARE__ "2020080313"
|
||||
|
||||
#endif // _CONFIG_H
|
||||
|
||||
@@ -76,6 +76,13 @@ static bool touch_getXY( int16_t &x, int16_t &y ) {
|
||||
x = p.x;
|
||||
y = p.y;
|
||||
}
|
||||
|
||||
// issue https://github.com/sharandac/My-TTGO-Watch/issues/18 fix
|
||||
float temp_x = ( x - ( LV_HOR_RES_MAX / 2 ) ) * 1.15;
|
||||
float temp_y = ( y - ( LV_VER_RES_MAX / 2 ) ) * 1.0;
|
||||
x = temp_x + ( LV_HOR_RES_MAX / 2 );
|
||||
y = temp_y + ( LV_VER_RES_MAX / 2 );
|
||||
|
||||
return( true );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user