mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-12-09 21:16:25 -05:00
touchscreen threshold (sensitivity) auto detect (#2306)
* gui * worked but slow * not do the auto detect * worked * remove debug thing * format * remove uneeded thing * fix hackrf submodule bump * clean up * format * format * format * remve batt * add hint text and eta * code clean up by @HTotoo * work around to resolve not clear enough * correct comments
This commit is contained in:
parent
7d28e495c2
commit
8e945024c5
8 changed files with 197 additions and 9 deletions
|
|
@ -36,14 +36,6 @@ namespace touch {
|
|||
|
||||
using sample_t = uint16_t;
|
||||
|
||||
constexpr sample_t sample_max = 1023;
|
||||
|
||||
// If you have a dead bottom-left corner try to increase the sensitivity,
|
||||
// but look for flickering touch indicator in the Buttons test screen
|
||||
// in which case decrease sensitivity to avoid killing backlight timeout
|
||||
constexpr sample_t touch_sensitivity = 32;
|
||||
constexpr sample_t touch_threshold = sample_max / touch_sensitivity;
|
||||
|
||||
struct Samples {
|
||||
sample_t xp;
|
||||
sample_t xn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue