Skip to content

Small change on Touch Threshold, Buttons Debounce and Swipe Threshold#793

Merged
odudex merged 1 commit into
selfcustody:developfrom
tadeubas:ui_settings_btn_touch
Dec 2, 2025
Merged

Small change on Touch Threshold, Buttons Debounce and Swipe Threshold#793
odudex merged 1 commit into
selfcustody:developfrom
tadeubas:ui_settings_btn_touch

Conversation

@tadeubas
Copy link
Copy Markdown
Member

@tadeubas tadeubas commented Dec 1, 2025

What is this PR for?

Settings / Constants

  • Increased range for Touch Threshold and Buttons Debounce
  • Reduced Buttons Debounce default value a little (customized default for M5StickV)
  • Slightly reduced the Swipe Threshold constant

Changes made to:

  • Code
  • Tests
  • Docs
  • CHANGELOG

Did you build the code and tested on device?

  • Yes, build and tested on m5stickv

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Docs update
  • Other

@tadeubas
Copy link
Copy Markdown
Member Author

tadeubas commented Dec 1, 2025

First PR from #771

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.38%. Comparing base (34f03e5) to head (81db28a).
⚠️ Report is 11 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #793   +/-   ##
========================================
  Coverage    97.38%   97.38%           
========================================
  Files           83       83           
  Lines        10543    10544    +1     
========================================
+ Hits         10267    10268    +1     
  Misses         276      276           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/krux/krux_settings.py
namespace = "settings.touchscreen"
default_th = 40 if kboard.is_wonder_k else 22
threshold = NumberSetting(int, "threshold", default_th, [10, 200])
threshold = NumberSetting(int, "threshold", default_th, [2, 200])
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any real situation where sensitivity had to be set so aggressively (value=2) ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test against all possible device lots, so I'd rather leave this flexible. In some cases, like when the user is wearing gloves, higher sensitivity can be helpful

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it didn't brick any device (like being always pressed), it's fine.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the user changes this value, the device immediately applies it before exiting the settings menu, so they will notice right away and can simply reset the device to revert to the previous value. I tested with a setting of 2 and didn't manage to brick any of my touch devices (couldn't test on the Amigo due to its existing touch issues): TZT, Yahboom, WonderMV, Embed Fire, WonderK Pro.

On the WonderK Pro, a little below 10 already feels good, and the Embed Fire was performing so well that it was already set to 2. Other devices had poorer results, but that's exactly why the setting exists: anyone can adjust it according to the behavior of their specific device, rather than us enforcing or constraining the value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you for testing.

@odudex odudex merged commit 0f0bb13 into selfcustody:develop Dec 2, 2025
7 checks passed
@odudex
Copy link
Copy Markdown
Member

odudex commented Dec 2, 2025

Thank you!

@tadeubas tadeubas deleted the ui_settings_btn_touch branch December 11, 2025 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants