mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 14:12:31 -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
|
@ -252,6 +252,8 @@ struct data_t {
|
|||
// Menu Color Scheme
|
||||
Color menu_color;
|
||||
|
||||
uint16_t touchscreen_threshold;
|
||||
|
||||
uint16_t UNUSED_16;
|
||||
|
||||
constexpr data_t()
|
||||
|
@ -310,6 +312,7 @@ struct data_t {
|
|||
config_mode_storage(CONFIG_MODE_NORMAL_VALUE),
|
||||
dst_config(),
|
||||
menu_color(Color::grey()),
|
||||
touchscreen_threshold(32),
|
||||
UNUSED_16() {
|
||||
}
|
||||
};
|
||||
|
@ -1140,6 +1143,13 @@ void set_menu_color(Color v) {
|
|||
data->menu_color = v;
|
||||
}
|
||||
|
||||
uint16_t touchscreen_threshold() {
|
||||
return data->touchscreen_threshold;
|
||||
}
|
||||
void set_touchscreen_threshold(uint16_t v) {
|
||||
data->touchscreen_threshold = v;
|
||||
}
|
||||
|
||||
// PMem to sdcard settings
|
||||
|
||||
bool should_use_sdcard_for_pmem() {
|
||||
|
@ -1244,6 +1254,7 @@ bool debug_dump() {
|
|||
pmem_dump_file.write_line("dst_config: 0x" + to_string_hex((uint32_t)data->dst_config.v, 8));
|
||||
pmem_dump_file.write_line("fake_brightness_level: " + to_string_dec_uint(data->fake_brightness_level));
|
||||
pmem_dump_file.write_line("menu_color: 0x" + to_string_hex(data->menu_color.v, 4));
|
||||
pmem_dump_file.write_line("touchscreen_threshold: " + to_string_dec_uint(data->touchscreen_threshold));
|
||||
|
||||
// ui_config bits
|
||||
const auto backlight_timer = portapack::persistent_memory::config_backlight_timer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue