InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.68k stars 916 forks source link

Add "Futuristic" Watch Face #1548

Open Leon-Plickat opened 1 year ago

Leon-Plickat commented 1 year ago

"Futuristic" Watch Face

out

This PR adds the "Futuristic" watch face, which is a simple (both in style and code) watchface, that is basically an analog clock but with circular gauges instead of watch-hands.

By default, no indicators are shown. If the heart-rate monitor is active, the rate is displayed in the lower left corner. If the watch is charging, the charging indicator as well as the current battery percentage is helpfully displayed in the top left corner. If the battery goes below 15%, a warning is displayed in the lower right corner.

The colours are based on the tango terminal colour scheme.


Old / initial comment below:

Basically an analog clock, but with gauges instead of watch-hands.

image

This is implemented using the arc object. Unfortunately, switching to the clock screen from any other screen is tremendously slow when this face is active. I wonder if the arc object is inherently intensive to render? Not quite sure what to do about this. Unfortunately this only happens on the physical device, not the simulator.

Leon-Plickat commented 1 year ago

Seems like the screen switching can be sped up to reasonable times by reducing the amount of pixels drawn by the arc object.

Leon-Plickat commented 1 year ago

Turns out the amount of pixels is not really relevant, the issue is the background of the arc. Without the background, switching to the clock behaves as expected.

image

Even a background with line size of 1 caused this. Not quite sure why that is, I have no experience with embedded graphics, only desktop graphics.

While removing the background doesn't look quite as good, it has the added benefit of increasing the contrast of the gauges, probably making them easier to read for someone who has colourblindness or other vision problems.

minacode commented 1 year ago

I think it looks very cool without the background! 😎

Leon-Plickat commented 1 year ago

Now with switchable themes.

image image image image image image

Leon-Plickat commented 1 year ago

Considering the requirement too keep it small as well as the size of a theme (5 * 3 * 8 = 120 bits), I think it makes sense to limit the amount of themes to maybe three or four. I have come to prefer the multi-colour ones over the single-colour ones, so I'll probably go with a few common terminal colour themes.

minacode commented 1 year ago

What do you think about using the PineTimeStyle settings that already exist for the theming? Could that be useful?

Leon-Plickat commented 1 year ago

Unfortunately not, I think. This watchface needs five colours that work together. At most PTSColourTime could be used for the inner text, but that might clash with the arc colours.

Now, I am not actually all that attached to the theming feature; I just thought it would be neat. If size constraints demand it, a hardcoded theme would be fine with me. I personally think the tango colours work best anyway (I tested a bunch more locally, gruvbox is also neat, but not quite to my taste).


Another idea would be to determine the shades of the multi-coloured styles programmatically based on a single base colour. That's pretty simple to implement, although I don't think there is a generic colour chooser widget / setting yet, so I don't think this idea is actionable right now.

minacode commented 1 year ago

You could make it depend on the time 😁

Leon-Plickat commented 1 year ago

I played around with making it depend on time, but wasn't satisfied with the results.

So I am leaving the colours as is for now, meaning that other than finding a better name, I am pretty much done here.

Thinking about "futuristic" for the name or something like that.

Leon-Plickat commented 1 year ago

Yeah, I think this is done.

Leon-Plickat commented 1 year ago

All done.

Just wondering, why's the time displayed both with the gauges and digitally?

The digital display is for getting the accurate time, but I personally find that analog watches - and by extension things that emulate them like these gauges - allow for a better feel / intuition for small(-ish) timespans (probably because it maps time to something spatial, which humans are quite good at developing an intuition for).

github-actions[bot] commented 1 year ago
Build size and comparison to develop: Section Size Difference
text 416404B 1520B
data 940B 0B
bss 53568B 0B