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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 197 additions and 9 deletions

View file

@ -95,6 +95,7 @@ TemperatureLogger temperature_logger;
bool antenna_bias{false};
uint32_t bl_tick_counter{0};
uint16_t touch_threshold{32};
void set_antenna_bias(const bool v) {
antenna_bias = v;
@ -538,6 +539,11 @@ init_status_t init() {
set_cpu_clock_speed();
if (persistent_memory::config_lcd_inverted_mode()) display.set_inverted(true);
/* sample max: 1023 sample_t AKA uint16_t
* touch_sensitivity: range: 1 to 128
* threshold range: 1023/1 to 1023/128 = 1023 to 8
*/
touch_threshold = portapack::persistent_memory::touchscreen_threshold();
if (lcd_fast_setup)
draw_splash_screen_icon(0, ui::bitmap_icon_memory);