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

Infineat Watchface #1024

Merged
merged 38 commits into from
Sep 27, 2022
Merged

Infineat Watchface #1024

merged 38 commits into from
Sep 27, 2022

Conversation

dmlls
Copy link
Contributor

@dmlls dmlls commented Mar 7, 2022

This PR implements the new watchface Infineat.

For anyone interested in trying it, it is already available here.

Note: the linked version differs slightly from the one in this PR, since it adds extended Latin support.


demo


This PR also implements a handy CheckboxList (check the watchface list in the above demo). I kept this class as general as possible, along the lines of Tile or ApplicationList, so that it can be used for other purposes as well.

This watchface could be considered "heavy" in terms of flash storage, since it adds two new fonts and an image. However, I've tried to keep things at their absolute minimum. One of the fonts only includes numbers (Bebas Neue, the main font used for the time) and the other (Teko) includes the characters [A-Za-z0-9]. The range of the letters in the Teko font could even be reduced, since they are only used for the days of the week ("Mon", "Tue", "Wed", etc).

The image is the PINE64 logo and has a size of 23x31px. I tried to make its background transparent so that it could be used in other places, but I didn't get it to render correctly. So in the end the background is white. If someone wants to try to make it transparent, I can provide the original SVG.

For a comparison, the latest build in develop:

 Memory region         Used Size  Region Size  %age Used
           FLASH:      403028 B       480 KB     82.00%
             RAM:       54872 B        64 KB     83.73%

And the Infineat build:

Memory region         Used Size  Region Size  %age Used
           FLASH:      416464 B       480 KB     84.73%
             RAM:       54984 B        64 KB     83.90%

@thefenriswolf
Copy link

Neat

@ytsejam1138
Copy link

Everytime a pick the Inifineat watchface my PineTime reboots.

@dmlls
Copy link
Contributor Author

dmlls commented Mar 8, 2022

@ytsejam1138 mmh interesting... How did you install it exactly? Also, just to check, you got it from here right? https://github.com/dmlls/InfiniTime/releases/tag/1.8.0-infineat

Anyone else having the same issue?

@ytsejam1138
Copy link

@ytsejam1138 mmh interesting... How did you install it exactly? Also, just to check, you got it from here right? https://github.com/dmlls/InfiniTime/releases/tag/1.8.0-infineat

Anyone else having the same issue?

I installed it with the latest Gadgetbridge. And yes I downloaded it from GitHub from the link above.

@dmlls
Copy link
Contributor Author

dmlls commented Mar 8, 2022

@ytsejam1138 I just tried upgrading from InfiniTime 1.8.0 with Gadgetbridge and everything works fine. Maybe you can try with nRF Connect? And maybe also try downloading the image again, just in case.

If that doesn't work, please open an issue on my repo, we'll continue the conversation there. Let's keep this space for the PR itself :)

@NeroBurner
Copy link
Contributor

open issue for the bootloop here: dmlls#1

@joseph58tech
Copy link

joseph58tech commented Mar 10, 2022

I tried to install the image and it broke my watch
First I couldn't change brightness, so I restored and brightness still didn't work, so I downgraded to 1.7.1 and now Bluetooth stopped connecting

@joseph58tech
Copy link

I tried to install the image and it broke my watch
First I couldn't change brightness, so I restored and brightness still didn't work, so I downgraded to 1.7.1 and now Bluetooth stopped connecting

OK I restarted my watch wich restored back to 1.8.0 and now everything works again

@NeroBurner
Copy link
Contributor

@dmlls I've got a quote from @kieranc

[M] When is it required/recommended to increase the version number in the settings-class? Every time a new setting is added? Or only if a setting is changed/removed?
[T] when a new setting is added afaik
[T] when i added new settings without incrementing it, the initial values were initialised randomly
[T] so if you increment it, on boot all settings will have their values initialised from... settings.h values? but if it's not incremented they won't

So I think incrementing the version number in Settings.h may fix the freeze/reboot error

@kieranc
Copy link
Contributor

kieranc commented Mar 12, 2022

The image is the PINE64 logo and has a size of 23x31px. I tried to make its background transparent so that it could be used in other places, but I didn't get it to render correctly. So in the end the background is white. If someone wants to try to make it transparent, I can provide the original SVG.

Nice looking watchface!
As far as the image transparency you might want to look at this option from lv_conf:

/*Images pixels with this color will not be drawn (with chroma keying)*/
#define LV_COLOR_TRANSP    LV_COLOR_MAKE(0x6c, 0xFc, 0x6a)         /*LV_COLOR_LIME: pure green*/

@NeroBurner
Copy link
Contributor

Just tried 11b8115 on InfiniSim and on my dev-device and it works 🎉

@JF002
Copy link
Collaborator

JF002 commented Mar 14, 2022

@dmlls This watchface looks really good, thanks for creating this PR! 🥇

However, as you may know, we are a bit tight in memory, and I try to avoid adding new "big" resources like fonts for now (until we are able to move a few of them to the external memory). Have you already tested your Infineat with existing fonts? It probably don't look as neat as it is with new fonts, but would that be an acceptable compromise?

src/components/datetime/DateTimeController.cpp Outdated Show resolved Hide resolved
src/components/datetime/DateTimeController.h Outdated Show resolved Hide resolved
@dmlls
Copy link
Contributor Author

dmlls commented Mar 18, 2022

@dmlls This watchface looks really good, thanks for creating this PR! 🥇

However, as you may know, we are a bit tight in memory, and I try to avoid adding new "big" resources like fonts for now (until we are able to move a few of them to the external memory). Have you already tested your Infineat with existing fonts? It probably don't look as neat as it is with new fonts, but would that be an acceptable compromise?

@JF002 totally understand, I'll see what I can do with the existent fonts ;) I'd like to take as few space from other contributors as possible, great things won't stop coming to InfiniTime!

In any case, if anyone still prefers the original watchface, they can always refer to the fork.

@dmlls
Copy link
Contributor Author

dmlls commented Mar 18, 2022

@kieranc @NeroBurner thanks for the suggestions guys!

@dmlls
Copy link
Contributor Author

dmlls commented Mar 21, 2022

I added a couple of commits that respectively:

  • Make the Pine64 logo background transparent. I simply used the option "True color with alpha" when converting the image with the LVGL Image Converter. This however adds an extra 4 KiB to the C file.
  • Remove all new fonts included in the original Infineat watchface and use existing fonts. Well, I guess it's a little underwhelming but not terrible either. I personally always found the monospaced fonts in InfiniTime looking a bit old-fashioned (except for the Terminal watchface ;).

demo_existing_fonts

The new stats are:

Memory region         Used Size  Region Size  %age Used
           FLASH:      411524 B       480 KB     83.72%
             RAM:       54520 B        64 KB     83.19%

That's 1% less of flash usage with respect to the original Infineat watchface.

@NeroBurner
Copy link
Contributor

It still looks neat indeed!

Could you add a battery-symbol to the watchface? I'd like to see the battery level on my watchface without needing to look at either gadgetbridge or the pinetime-settings. Otherwise this would be the first watchface without some sort of battery indicator

@joseph58tech
Copy link

It still looks neat indeed!

Could you add a battery-symbol to the watchface? I'd like to see the battery level on my watchface without needing to look at either gadgetbridge or the pinetime-settings. Otherwise this would be the first watchface without some sort of battery indicator

Yeah I found it weird that there is no battery indicator, I just noticed this about a day ago when I was going to look down at my watch so I could check the battery, and there was no watch face indicator.

@kieranc
Copy link
Contributor

kieranc commented Mar 22, 2022

As a cleaner option than adding a battery icon you could make the bar on the left go red when battery is below a preset percentage. maybe 40% currently would be safe-ish

@dmlls
Copy link
Contributor Author

dmlls commented Mar 23, 2022

@kieranc that's also a good idea. Only thing that it may not that intuitive for users who know nothing about the watchface. I actually had thought of something similar (see dmlls#3 (comment)).

I will make a couple mockups with different approaches and post them here to gather feedback.

@dmlls
Copy link
Contributor Author

dmlls commented Mar 25, 2022

So, this is what I came up with:

Option 1: battery icon bottom-left.

icon_bottom_left


Option 2: battery icon top-left.

icon_top_left


Option 3: Pine64 logo as battery indicator.

logo_fill

The mockups have the original font, but it would obviously be the same with the system font.
The 3rd option seems to me the less "intrusive" one, although I also like the 1st one.

I'd like to do a small voting with reactions:

  • Option 1: 🚀
  • Option 2: 🎉
  • Option 3: ❤️

@ytsejam1138
Copy link

Option 3: ❤️

But use a darker color on the pinecone to give it more contrast so it will be easier to read at a glance.

@kieranc
Copy link
Contributor

kieranc commented Mar 25, 2022

I like options 1 and 3, 3 is clearly the coolest but risks not being obvious at first glance.

@lman0
Copy link

lman0 commented Mar 25, 2022

option 3 : but as well a little more darker
and in order to see , in action , can you link for each of them (or at least 1 and 3 )a dfu ?

@lman0
Copy link

lman0 commented Mar 27, 2022

it lack as well a state for when charging @dmlls , maybe maybe the pinecone blinking would help for option 3

@dmlls
Copy link
Contributor Author

dmlls commented Apr 3, 2022

So... I implemented the battery indicator (option 3) with a nice little charging animation. Here's a demo:

demo_battery

I also rebased develop.

If you guys could take it for a spin and test that everything works fine, that'd be great! 😀

@trman
Copy link

trman commented Jun 19, 2022

@devnoname120 because the neat fonts of infinineat (and picture icon and latin fonts needed) make it too big to fit in the firmware right now.
@dmlls need to wait at least until , the fonts are put in the external memory , but it don't seem the infinitime core dev priority right now

@JF002
Copy link
Collaborator

JF002 commented Jun 25, 2022

@trman

but it don't seem the infinitime core dev priority right now

Using the external flash memory to store images and fonts is definitely on the top of my TODO list :) You can see my progress here. As you can see, it's kinda working, but not as good as I would like to (transitions are slower, fonts are loaded in RAM,...). So there's still a bit of work to do.

@dmlls

Also, I wanted to mention that I don't know if it makes a lot of sense to keep this PR updated, since it is unlikely it will be merged. Right now I need to keep two different codebases (because of the different fonts), and it is quite a pain.

I understand your pain and I'm really sorry about that! I do hope however that we'll be able to merge your work as soon as possible :)

@JF002
Copy link
Collaborator

JF002 commented Jun 26, 2022

@dmlls I would like to do some test with the Infineat watchface and the external flash memory. Could you provide me with the original picture and font files so I can convert them to a binary file?

EDIT : #OffTopic, but I think this is nice:
image

Tiggilyboo pushed a commit to Tiggilyboo/InfiniTime that referenced this pull request Jun 27, 2022
- Use CheckboxList from InfiniTimeOrg#1024
  for more than 4 face selections
- Clean up styles in ~WatchFaceSimpleAnalog
@dmlls
Copy link
Contributor Author

dmlls commented Jun 27, 2022

@JF002 that's great to hear!

Hope that helps, anything else let me know.

And nice numbers indeed! 😄

@JF002 JF002 mentioned this pull request Jun 29, 2022
6 tasks
@JF002
Copy link
Collaborator

JF002 commented Jun 29, 2022

Thanks @dmlls. Have a look at the video in this comment :)

@lman0
Copy link

lman0 commented Jul 2, 2022

@dmlls could you update your fork to 1.10.0 ?
i understand that updating this pr might be a pain since it can't be merged
unless @JF002 study of external flash usage turn into a proper "merged" pr
but since it's only the fork , it shouldn't be too hard for you to update the fork

after all there is people , that may would like to use infineat with updated code base too (with latin font)!

@dmlls
Copy link
Contributor Author

dmlls commented Jul 2, 2022

@dmlls could you update your fork to 1.10.0 ?

@lman0 sure, will keep it up to date until the ongoing work on external flash usage is finished.
That having said, this one will need to wait a couple of weeks since I don't have my PineTime at the moment 😅

JF002 added a commit that referenced this pull request Jul 7, 2022
 - Digital watchface displays a background image from F/matrix.bin
 - Infineat (#1024) reads fonts from F:/teko.bin and F:/bebas.bin and an icon from F:/infineat-1.bin
 - G7710 (#1122) reads fonts from F:/lv_font_dots_40.bin, F:/lv_font_7segment_40.bin and F:/lv_font_7segment_115.bin
@dmlls
Copy link
Contributor Author

dmlls commented Jul 19, 2022

@lman0 fork updated to 1.10.0, available here.
Sorry for the delay, it's been very busy lately!

@lman0
Copy link

lman0 commented Jul 21, 2022

thanks @dmlls !

# Conflicts:
#	src/displayapp/screens/Symbols.h
#	src/displayapp/screens/settings/SettingWatchFace.cpp
#	src/displayapp/screens/settings/SettingWatchFace.h
JF002 added a commit to InfiniTimeOrg/InfiniSim that referenced this pull request Sep 27, 2022
…finiTime#1024) DisplayApp needs the FileSystem as parameter to the constructor.
@JF002
Copy link
Collaborator

JF002 commented Sep 27, 2022

Thank you very much for your contribution, @dmlls !
I can finally merge this new watchface now that InfiniTime supports loading resources in the external memory!

@JF002 JF002 merged commit 6393281 into InfiniTimeOrg:develop Sep 27, 2022
@JF002 JF002 added this to the 1.11.0 milestone Sep 27, 2022
NeroBurner added a commit to InfiniTimeOrg/InfiniSim that referenced this pull request Sep 27, 2022
Update the submodule to the version just after
InfiniTimeOrg/InfiniTime#1024 is merged.
@dyamon dyamon mentioned this pull request Sep 29, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new watchface This thread is about a new watchface
Projects
None yet
Development

Successfully merging this pull request may close these issues.