summaryrefslogtreecommitdiff
path: root/src/drivers/Cst816s.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-06-06 18:27:54 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-06-06 23:09:58 (GMT)
commit7c45f185a32c7bcff47c8fda1acdec82d3213717 (patch)
tree53b0419fe2a19e6ec5c89d0be0a11dcd8d4ceb00 /src/drivers/Cst816s.cpp
parent94b1b330fc1f6e941a797fedabade4e790e28bc2 (diff)
parent35dcf8c8607483c104711c9398d47d57147f4389 (diff)
Merge remote-tracking branch 'origin/develop' into analog24
Diffstat (limited to 'src/drivers/Cst816s.cpp')
-rw-r--r--src/drivers/Cst816s.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/drivers/Cst816s.cpp b/src/drivers/Cst816s.cpp
index e9573df..cf10c89 100644
--- a/src/drivers/Cst816s.cpp
+++ b/src/drivers/Cst816s.cpp
@@ -80,14 +80,9 @@ Cst816S::TouchInfos Cst816S::GetTouchInfo() {
Gestures gesture = static_cast<Gestures>(touchData[gestureIndex]);
// Validity check
- if(x >= maxX || y >= maxY ||
- (gesture != Gestures::None &&
- gesture != Gestures::SlideDown &&
- gesture != Gestures::SlideUp &&
- gesture != Gestures::SlideLeft &&
- gesture != Gestures::SlideRight &&
- gesture != Gestures::SingleTap &&
- gesture != Gestures::DoubleTap &&
+ if (x >= maxX || y >= maxY ||
+ (gesture != Gestures::None && gesture != Gestures::SlideDown && gesture != Gestures::SlideUp && gesture != Gestures::SlideLeft &&
+ gesture != Gestures::SlideRight && gesture != Gestures::SingleTap && gesture != Gestures::DoubleTap &&
gesture != Gestures::LongPress)) {
info.isValid = false;
return info;