mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 15:18:08 +00: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:

committed by
GitHub

parent
7d28e495c2
commit
8e945024c5
@@ -85,7 +85,7 @@ static bool touch_update() {
|
||||
case IO::TouchPinsConfig::SensePressure: {
|
||||
const auto z1 = samples.xp - samples.xn;
|
||||
const auto z2 = samples.yp - samples.yn;
|
||||
const auto touch_raw = (z1 > touch::touch_threshold) || (z2 > touch::touch_threshold);
|
||||
const auto touch_raw = (z1 > portapack::touch_threshold) || (z2 > portapack::touch_threshold);
|
||||
touch_debounce = (touch_debounce << 1) | (touch_raw ? 1U : 0U);
|
||||
touch_detected = ((touch_debounce & touch_debounce_mask) == touch_debounce_mask);
|
||||
if (!touch_detected && !touch_cycle) {
|
||||
|
Reference in New Issue
Block a user