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:
sommermorgentraum
2024-10-17 00:39:59 +08:00
committed by GitHub
parent 7d28e495c2
commit 8e945024c5
8 changed files with 197 additions and 9 deletions

View File

@@ -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;