Skip to content

Commit

Permalink
Make Force Touch inputs detects rejection zone (#168)
Browse files Browse the repository at this point in the history
* Make Force Touch detects zone

* Update RMITrackpadFunction.cpp

Ditched check zone code in favor of checking VALID before registering force touch
  • Loading branch information
kanghengliu committed May 2, 2023
1 parent f549865 commit 3f0dd53
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions VoodooRMI/Functions/Input/RMITrackpadFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ void RMITrackpadFunction::handleReport(RMI2DSensorReport *report)

// Force touch emulation only works with clickpads (button underneath trackpad)
// Lock finger in place and in force touch until lifted
if (isForceTouch(obj.z)) {
// Checks for VALID input before registering as force touch
if (isForceTouch(obj.z) && fingerState[i] == RMI_FINGER_VALID) {
fingerState[i] = RMI_FINGER_FORCE_TOUCH;
}

Expand All @@ -234,7 +235,7 @@ void RMITrackpadFunction::handleReport(RMI2DSensorReport *report)
transducer.currentCoordinates.pressure = 0;
break;
}

transducer.isPhysicalButtonDown = false;
transducer.currentCoordinates = transducer.previousCoordinates;
transducer.currentCoordinates.pressure = RMI_MT2_MAX_PRESSURE;
Expand Down

0 comments on commit 3f0dd53

Please sign in to comment.