Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion boards/seeedstudio-wio-tracker-l2/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,27 @@ void InputHandler(void) {
wakeWasDown = wakeDown;
}

// One applied touch when the finger lands; a hold repeats only after
// 500 ms, then every 250 ms (hold-to-scroll on the +/- rows). The input
// task clears touchPoint every cycle and the menus act on each applied
// press without waiting for a release, so re-applying a held finger at
// the 250 ms cadence alone tapped the next menu while the finger was
// still down from selecting the previous one. While LongPress is set the
// finger is re-applied every pass: launcherSelectHeld() reads
// touchPoint.pressed to tell whether the select input is still engaged.
static bool touchWasDown = false;
static uint32_t touchDownAt = 0;
static uint32_t touchAppliedAt = 0;
LTouchPoint t;
if (hal_touch_read(touchCfg(), t)) {
const bool touchDown = hal_touch_read(touchCfg(), t);
const bool touchEdge = touchDown && !touchWasDown;
touchWasDown = touchDown;
if (!touchDown) return;
const uint32_t now = launcherMillis();
if (touchEdge) touchDownAt = now;
const bool repeat = now - touchDownAt > 500 && now - touchAppliedAt > 250;
if (touchEdge || repeat || LongPress) {
touchAppliedAt = now;
if (!hal_touch_apply(t)) return;
}
}
Expand Down
11 changes: 10 additions & 1 deletion boards/seeedstudio-wio-tracker-l2/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ build_flags =
-D OTA_EXTRA='"esp=S3"'
-D LAUNCHER_DEFAULT_SPIFFS_THRESHOLD=0x500000

-D ROTATION=0
# Panel is native 240x320 portrait; rotation 1 (Panel_NV3031B MADCTL MY|MV)
# is the landscape the case is built for -- the same MADCTL Meshtastic and
# meshpunk reach with offset_rotation=1 and rotation 0.
# TFT_ROTATION must stay 0 here: include/DisplayDrivers_User_Setup.h
# otherwise defines it as ROTATION, lovyan.cpp passes it to LovyanGFX's
# cfg.offset_rotation, and Panel_LCD::setRotation() adds that offset to the
# setRotation(ROTATION) main.cpp issues -- the glass would end up at
# rotation 2.
-D ROTATION=1
-D TFT_ROTATION=0
-D DIMMER_SETUP=20

# BOOT (GPIO0) on the HAL's 1-button layout; the side WAKE button sits on
Expand Down