Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent blocking when Infineat watchface is charging #2248

Closed
wants to merge 1 commit into from

Conversation

SteveAmor
Copy link
Contributor

@SteveAmor SteveAmor commented Feb 15, 2025

Fixes #2245
Blocking removed for the edge case where it reverts to the clock on wakeup if no app is loaded and the watchface is Infineat and the watch is charging. In this particular case, there is a small UX watchface transition glitch on wakeup. The alternative is blocking code which often results in the watch rebooting.

Copy link

Build size and comparison to main:

Section Size Difference
text 373040B 16B
data 948B 0B
bss 22536B 0B

Run in InfiniEmu

@mark9064
Copy link
Member

mark9064 commented Feb 16, 2025

Thanks for the patch! If we don't find a better solution before 1.16, I think this is a good temporary measure
It sounds like there are two core issues though:

  • The Infineat charging animation is capable of using 100% drawing bandwidth (CPU/IO), and therefore causes LVGL to never finish. This sounds suspicious and should be reworked. Drawing a battery indicator should not be so resource demanding
  • The watchface load loop is overoptimistic and locks up DisplayApp when faced with 100% load

Both issues should be fixed. I've just looked on InfiniEmu and indeed the CPU is in the Running state the entire time when charging on Infineat (though my laptop CPU runs it very slowly, so this may be a factor), so this issue is pretty much confirmed. The watchface load loop should be fixed in LVGL. I have some testing code for this but it's super ugly. More broadly I need to really understand the LVGL render pipeline so I can point to the exact parts we need to change (i.e guaranteeing the watchface Refresh() runs exactly once, and then also that drawing this one refresh is fully finished)

@mark9064
Copy link
Member

Closing as #2256 is merged now :)

@mark9064 mark9064 closed this Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return to Infineat watch face crashes when charging
2 participants