Skip to content

Watchface click on weather and steps - #2481

Open
SteveAmor wants to merge 4 commits into
InfiniTimeOrg:mainfrom
SteveAmor:watchfaceWeatherButton
Open

Watchface click on weather and steps#2481
SteveAmor wants to merge 4 commits into
InfiniTimeOrg:mainfrom
SteveAmor:watchfaceWeatherButton

Conversation

@SteveAmor

@SteveAmor SteveAmor commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Another proof of concept.
Shortcut from the digital watch face to jump to the weather app and steps app when you tap the watch face icons and then jump back to the watch face when you leave weather or steps.
It doesn't work so well on the digital watch face as the weather icon is in the middle of the screen. So swiping up and down can trigger a trip to the weather app.

I've implemented this on the Legend watch face (which is where I really wanted this feature), along with tapping the battery percent in the top right to take you to BatteryInfo. It works really well with the battery percent, steps and weather in the corners of the Legend watch face.

My intention is to update this PR for the Legend watch face when it's merged into main. And after I've implemented any feedback 😀

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Force push to fix formatting

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

Build size and comparison to main:

Section Size Difference
text 380212B 208B
data 936B 0B
bss 22936B 0B

Run in InfiniEmu

@SteveAmor SteveAmor changed the title Digital Watchface click on weather and steps Watchface click on weather and steps Aug 31, 2026
@tituscmd

Copy link
Copy Markdown
Contributor

This is a great idea! I think I'll implement this as well for my watchface (#2307) and I'll make sure to @ you for this idea.

@tituscmd

Copy link
Copy Markdown
Contributor

After playing around with it for a while, you should use LV_EVENT_CLICKED instead of pressed, so that it doesnt fire when scrolling around

@SteveAmor

Copy link
Copy Markdown
Contributor Author

After playing around with it for a while, you should use LV_EVENT_CLICKED instead of pressed, so that it doesnt fire when scrolling around

Cool. Thanks for the feedback. I was going to investigate that as the settings menu is quite happy with scrolling and not triggering a setting menu 😀 I'll update the PR.

@tituscmd

Copy link
Copy Markdown
Contributor

I noticed it because on my watch face, weather is in the top middle, which made scrolling down for notifications a pain in the ass 😅

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Oh, wow, LV_EVENT_CLICKED is much, much, much better. The Digital watch face also has the weather in the middle of the screen but swiping now works as expected.

@SteveAmor

Copy link
Copy Markdown
Contributor Author

@tituscmd there is one bug that I'm failing to get to the bottom of. I'm pretty sure that when you flash it, clicking on the icons won't work unless you go to another screen first. I can also recreate it by being on the watch face, long holding the button to take you to about and then short press of the button to take you back to the watch face. Then you can't click an icon until you move off and back to the watch face.

I had the same issue before I passed the DisplayApp to the screen the icon takes you to. Before that, when you returned to the watch face, you couldn't click on an icon until you left the watch face and returned. So it's something to do with that.

@tituscmd

Copy link
Copy Markdown
Contributor

Oh, wow, LV_EVENT_CLICKED is much, much, much better. The Digital watch face also has the weather in the middle of the screen but swiping now works as expected.

Yes, I was surprised how big of an impact it had as well!

@tituscmd

Copy link
Copy Markdown
Contributor

@tituscmd there is one bug that I'm failing to get to the bottom of. I'm pretty sure that when you flash it, clicking on the icons won't work unless you go to another screen first. I can also recreate it by being on the watch face, long holding the button to take you to about and then short press of the button to take you back to the watch face. Then you can't click an icon until you move off and back to the watch face.

Funnily enough, I just encountered this bug a few minutes ago too. I also don't know what's causing it yet...

I had the same issue before I passed the DisplayApp to the screen the icon takes you to. Before that, when you returned to the watch face, you couldn't click on an icon until you left the watch face and returned. So it's something to do with that.

This seems to be a great lead tho. I'll try to look into it, but maybe someone with more knowledge about the deeper workings of the PT could chime in here :D

@tituscmd

Copy link
Copy Markdown
Contributor

What I find interesting, it seems to work on first press after waiting a few seconds just sitting on the watch face after wake

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Also prevents clicking the icons if you long press the button to jump back to the watch face. I think it may have something to do with

appStackDirections.Reset();
which is probably the same state after a full reboot (caused by the watch dog timer or firmware update)

@SteveAmor

SteveAmor commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

What I find interesting, it seems to work on first press after waiting a few seconds just sitting on the watch face after wake

It's the same behaviour with swiping too. It's present on the current main branch, even compiled with GCC 10.3.
Good news, not introduced with this PR. Not so good news, does need investigating / fixing.

Having said that, it could just be a delay in the touch screen software/hardware initialisation.

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Refactor fixes the edge cases we have seen.
Delay when screen wakes up is assumed to be initialisation of the touch screen.

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Running on PT hardware but also checked in InfiniSim to ensure the lvgl memory usage is stable.

@tituscmd

tituscmd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What I find interesting, it seems to work on first press after waiting a few seconds just sitting on the watch face after wake

It's the same behaviour with swiping too. It's present on the current main branch, even compiled with GCC 10.3.

Good news, not introduced with this PR. Not so good news, does need investigating / fixing.

Having said that, it could just be a delay in the touch screen software/hardware initialisation.

Very interesting. I had noticed this before with swiping and had thought there was something wrong with my custom firmware. Good to know it's a different issue!

@SteveAmor

SteveAmor commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@tituscmd if you want instant gestures on the display when it wakes up, enable double tap to wake up as that doesn't put the touch controller to sleep.

// Double Tap needs the touch screen to be in normal mode

// Double Tap needs the touch screen to be in normal mode

@tituscmd

tituscmd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What I find interesting, it seems to work on first press after waiting a few seconds just sitting on the watch face after wake

@tituscmd if you want instant gestures on the display when it wakes up, enable double tap to wake up as that doesn't put the touch controller to sleep.

// Double Tap needs the touch screen to be in normal mode

// Double Tap needs the touch screen to be in normal mode

Thanks for the heads-up, but I rarely use any tap-to-wake at all. I'm a raise-to-wake kinda guy 😎

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up, but I rarely use any tap-to-wake at all. I'm a raise-to-wake kinda guy

You don't need to make use of the double tap to wake. It just prevents the touch screen going to sleep (and having to wake up - slowely). You can still be a raise-to-wake guy 😉

@tituscmd

tituscmd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the heads-up, but I rarely use any tap-to-wake at all. I'm a raise-to-wake kinda guy

You don't need to make use of the double tap to wake. It just prevents the touch screen going to sleep (and having to wake up - slowely). You can still be a raise-to-wake guy 😉

Oh! That's perfect then. I will definitely be making use of that!

@SteveAmor

Copy link
Copy Markdown
Contributor Author

Oh! That's perfect then. I will definitely be making use of that!

Oof, typical current draw for leaving the touch sensor on is 2.5mA. I have noticed a rapid drop in battery level today so I'll be living with the slow initialisation in favor of significantly longer battery life.

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