Files
trail-mate/tests/map_gesture
Trail Mate Dev 7fdc3c8108 Merge main into Geocaching development
Integrate origin/main at 6941943ddd.
Preserve Geocaching target overlays alongside Agenda map selection and target
requests; include target sessions in coordinate conversion and route loading
guards. Retain main's SD transport, map lifecycle and Settings changes.

Track the fixed Geocaching protocol fixtures previously excluded by *.bin.
Update map gesture regression expectations for the Geocaching tap event while
preserving drag/release coverage.

Validation: Geocaching core/UI, Agenda, waypoint, map gesture/Settings/tile
image, SD transport/filesystem (Ubuntu GCC), SD record I/O, Python contracts,
ESP stack hygiene, and tlora_pager_lr1121 firmware build passed.
Geocaching remains WIP; no indexed-storage cutover or device acceptance is claimed.
2026-09-24 09:10:28 +08:00
..

Map gesture release regression

This test compiles the production gesture callback and its helpers extracted from map_viewport.cpp, then sends pointer samples through real LVGL 9.4. It does not simulate release by directly calling the map callback. The fixture only substitutes the surrounding runtime fields; no SD or board is involved.

cmake -S tests/map_gesture -B .codex-build/map-gesture \
  -DLVGL_DIR=/path/to/lvgl-9.4 -DCMAKE_BUILD_TYPE=Debug
cmake --build .codex-build/map-gesture --parallel
ctest --test-dir .codex-build/map-gesture --output-on-failure

It checks a tap and 100 consecutive drags, including dragging outside the surface. Each drag must emit exactly one DragEnd or Cancel and clear both pressed and dragging state. Assertions are enabled even in release builds.

Before the fix the pinned dependency reproduces on the first drag: release lost: cycle=0 pressed=1 dragging=1 ended=0. Calling lv_indev_stop_processing from the map's object PRESSING handler leaves a flag which suppresses delivery of a subsequent RELEASED to that object. Limiting consumption to the current event with lv_event_stop_bubbling passes the same test. Physical touch-driver and complete viewport/loader integration are separately verified on the board with the MAPD diagnostics.