mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-28 01:05:58 -04: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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue