Skip to content

Add touch gesture support for emery/flint/gabbro#2

Draft
brooks2564 wants to merge 2 commits into
erlog135:mainfrom
brooks2564:main
Draft

Add touch gesture support for emery/flint/gabbro#2
brooks2564 wants to merge 2 commits into
erlog135:mainfrom
brooks2564:main

Conversation

@brooks2564

Copy link
Copy Markdown

Summary

  • Swipe up/down scrolls through forecast hours
  • Tap anywhere cycles to the next data page (conditions → airflow → experiential)
  • Buttons still work exactly as before — touch is purely additive
  • Guarded by PBL_TOUCHSCREEN so non-touch platforms (aplite, basalt, chalk, diorite) are completely unaffected

Implementation

Navigation logic was extracted into prv_navigate_up(), prv_navigate_down(), and prv_navigate_page() helpers shared by both the button click handlers and the new touch handler. touch_service_subscribe is called in prv_window_load and unsubscribed in prv_window_unload.

Test plan

  • Built clean for all 7 platforms
  • Installed and tested on Pebble Time 2 (emery)
  • Tap cycles pages correctly
  • Swipe up/down scrolls hours correctly
  • Buttons continue to work as expected

🤖 Generated with Claude Code

brooks2564 and others added 2 commits May 8, 2026 22:34
Swipe up/down scrolls through forecast hours; tap cycles to the next
data page. Guarded by PBL_TOUCHSCREEN so non-touch platforms are unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous implementation called click handlers with NULL recognizer,
causing a crash on click_recognizer_is_repeating(). Navigation logic is
now in prv_navigate_up/down/page helpers called by both click and touch handlers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@erlog135 erlog135 marked this pull request as draft May 19, 2026 14:05
@erlog135

Copy link
Copy Markdown
Owner

Thanks for taking the time to make a pull request! There are some issues as is, which will need to be fixed before I would merge this:

  1. There shouldn't be any .pbw files in the source. Those are usually generated in a build directory which is excluded from this project.
  2. The flint platform doesn't have a touchscreen, according to the Hardware Information table.
  3. Checking the platform isn't necessary for creating a custom definition of whether or not there is a touchscreen, since SDK 4.9.169 introduced a PBL_TOUCH definition. You can just query that directly.

Also, if you want to test the app locally, but don't want to bother with setting up a WeatherKit key, you can go to app/src/c/utils/demo.h and change DEMO_MODE to 1 in order to load demo data. Just remember to change it back before committing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants