diff --git a/CST816S.cpp b/CST816S.cpp index 3fd52f2..6b1d780 100644 --- a/CST816S.cpp +++ b/CST816S.cpp @@ -58,8 +58,8 @@ void CST816S::read_touch() { data.gestureID = data_raw[0]; data.points = data_raw[1]; data.event = data_raw[2] >> 6; - data.x = data_raw[3]; - data.y = data_raw[5]; + data.x = ((data_raw[2] & 0xF) << 8) + data_raw[3]; + data.y = ((data_raw[4] & 0xF) << 8) + data_raw[5]; } /*! diff --git a/library.json b/library.json index aa9da93..3ef3b1f 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "CST816S", - "version": "1.1.0", + "version": "1.1.1", "keywords": "Arduino, ESP32, Touch, Hynitron, CST816S, I2C", "description": "An Arduino library for the CST816S capacitive touch screen IC", "repository": diff --git a/library.properties b/library.properties index 7384039..cf90651 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=CST816S -version=1.1.0 +version=1.1.1 author=fbiego maintainer=fbiego sentence=Capacitive touch screen library