mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-30 01:27:24 -04:00
Improved sensitivity for non pointy touches
This commit is contained in:
parent
77260bc68a
commit
078da8ca16
2 changed files with 5 additions and 3 deletions
|
@ -89,8 +89,11 @@ void Manager::feed(const Frame& frame) {
|
|||
if( touch_raw ) {
|
||||
const auto metrics = calculate_metrics(frame);
|
||||
|
||||
touch_down_pressure = (metrics.r < r_touch_threshold);
|
||||
touch_up_pressure = (metrics.r < r_touch_threshold*2);
|
||||
constexpr float r_touch_down_threshold = 3200.0f;
|
||||
constexpr float r_touch_up_threshold = r_touch_down_threshold * 2.0f;
|
||||
|
||||
touch_down_pressure = (metrics.r < r_touch_down_threshold);
|
||||
touch_up_pressure = (metrics.r < r_touch_up_threshold);
|
||||
|
||||
if( touch_down_pressure ) {
|
||||
filter_x.feed(metrics.x * 1024);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue