InfiniTimeOrg / InfiniTime

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

Please add zephyrlabs Digistyle Watchface by deafult. #1059

Open explit7 opened 2 years ago

explit7 commented 2 years ago

Verification

Pitch us your idea!

@ZephyrLabs Digistyle Watchface

Description

I would be very happy to have this Watchface added by default: https://zephyrlabs.github.io/Watchfaces/Digistyle/ Digistyle

The Problem is the Name of the Watchface. Its name is also DigiStyle , which interfere with default Digistyle Watchface. Is it possible to add it under another Name ?

Thanks

explit7 commented 2 years ago

@ZephyrLabs Maybe you have some idea, how to implement it in the main Firmware. I modified the Watchface to run on 1.8.0 Firmware, after 1.8.0 came out, but i cant integrate it in the actual build. After every update i have issues to implement it.

ZephyrLabs commented 2 years ago

regd the watchface name; It could be renamed to casiostyle or oldstyle, its purely what the general consensus is to name it :)

regd the build issues; it needs to be implements just like any other watchface, currently busy at the moment, maybe @kieranc can provide some guidance

ITCactus commented 2 years ago

It could be renamed to casiostyle or oldstyle

maybe casiostyle classis?...

i would like to see also the casio style like that from this thread with week number, day number and days until the end of the year... maybe after 1.9 release will UI emulator i'll find some time to implement it...

image

explit7 commented 2 years ago

yes, CasioStyle would be good...

explit7 commented 2 years ago

I am not a developer, maybe someone can point me to the right direction here:

/media/sdc1/Projects/InfiniTime-Builder/InfiniTime/src/displayapp/screens/WatchFaceDigital.cpp:181:25: error: 'displayedChar' was not declared in this scope; did you mean 'displayedHour'? 181 | if (hoursChar[0] != displayedChar[0] || hoursChar[1] != displayedChar[1] || minutesChar[0] != displayedChar[2] || | ^~~~~~~~~~~~~ | displayedHour make[2]: *** [src/CMakeFiles/pinetime-app.dir/build.make:790: src/CMakeFiles/pinetime-app.dir/displayapp/screens/WatchFaceDigital.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:252: src/CMakeFiles/pinetime-app.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

image

I tried already replace displayedChar with displayedHour but it doesnt helped. The code need to be changed somehow....

ZephyrLabs commented 2 years ago

send a link to the source if it is on github, it will help to debug it :slightly_smiling_face:

explit7 commented 2 years ago

send a link to the source if it is on github, it will help to debug it slightly_smiling_face

The source of the file is not on Github, its on your Github Pages. https://zephyrlabs.github.io/Watchfaces/Digistyle/

ZephyrLabs commented 2 years ago

the code written for that watchface is quite outdated, considering how much stuff has changed in the WatchFaceDigital.cpp file, it obviously wouldn't compile as DisplayedChar is not even declared in the header or the source file, to move the old watch face to the new file it will take a couple steps to modify and adapt to the new setup

explit7 commented 2 years ago

Thanks for the info, @ZephyrLabs Maybe you or someone else will find time to rebuild it...

Danimations commented 2 years ago

I am just writing to support the bid to have this watchface included with the next Infinitime version. I like the nod it gives to the history of digital watches.

explit7 commented 2 years ago

I am just writing to support the bid to have this watchface included with the next Infinitime version. I like the nod it gives to the history of digital watches.

Thanks, very cool! I wait for it!

ITCactus commented 2 years ago

well, just for fun, i tried to play with this watchface update (let's call it "Casio Digital"), before attempt to make the "Casio G7710" style, and i was able to convert it to the 1.9 code... it could look like this image however, not sure why on photo it looks like black/blueish colors, but it supposed to be a black/gray one. and that's a good part.

besides, there is "Support more than four watch faces #1055" issue, so the 5th watchface option can't fit in settings. but it's not the worst part. "it could be" - for a reason... the reason, why it's probably will not be accepted and will not be included into official InfiniTime build... and the reason is the extra added size to the build.... it works on InfiniSim, but attempt to make a build for PineTime ends up with error:

[build] [100%] Linking CXX executable pinetime-app-1.9.0.out [build] Memory region Used Size Region Size %age Used [build] FLASH: 504352 B 480 KB 102.61% [build] RAM: 54528 B 64 KB 83.20% [build] /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: pinetime-app-1.9.0.out section .text' will not fit in regionFLASH' [build] /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: region FLASH overflowed with .data and user data [build] /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 12832 bytes [build] collect2: error: ld returned 1 exit status [build] make[3]: [src/CMakeFiles/pinetime-app.dir/build.make:1874: src/pinetime-app-1.9.0.out] Error 1 [build] make[2]: [CMakeFiles/Makefile2:120: src/CMakeFiles/pinetime-app.dir/all] Error 2 [build] make[1]: [CMakeFiles/Makefile2:127: src/CMakeFiles/pinetime-app.dir/rule] Error 2 [build] make: [Makefile:118: pinetime-app] Error 2 [build] Build finished with exit code 2

sorry for a bittersweet news...

explit7 commented 2 years ago

Wow, it looks really great! Yes i know the problem with the size. I think it was the case, why @ZephyrLabs has published it instead the origininal Digistyle Watchface. Maybe you could fork it and build it instead the original Digistyle ? Thank you very much, @ITCactus !

kieranc commented 2 years ago

image

This looks super cool, shame it's a bit too big. I'm guessing you're using an image for the background and top/bottom text, could it be split into smaller images or replaced with lvgl code? It wouldn't looks quite as good but it would maybe fit on the watch.

explit7 commented 2 years ago

Well, i have not designed the watchface, but maybe @ZephyrLabs has, and he can answer the question... My all time favorite watchface. One love.

ZephyrLabs commented 2 years ago

Hey guys, sorry regarding the image not being able to fit on the internal flash rom, there is a fix to this which is to use indexed image with less bpp (bits per pixel) this will reduce the usage and allow it to fit with in the rom space,

the current one provided in the src is 16 colors indexed or 4 bpp, I have taken the pleasure to convert it to a 1bpp indexed version it linked to this comment, this image should be able to fit in the flash without any issue, cheers :) bitmaps.zip

p.s you must replace this C file instead of the existing one, and recompile

explit7 commented 2 years ago

@kieranc Could you try to build it with @ZephyrLabs bitmaps? That would be awesome. To fork your build somewhere here would be also great, until the watchface will its way to the master branch.... Thanks guys!

JF002 commented 2 years ago

This watchface looks really awesome, indeed! Thanks for porting it to the 1.9 codebase.

Memory usage is the main difficulty right now, and we have to think very carefully before merging features that use a significant amount of memory to avoid filling RAM and/or ROM too much. One of the next priorities for the project will be to enable the external flash memory and the filesystem so we can store big bitmaps and fonts on it. This should allow us to merge new watchfaces and apps ;)

ITCactus commented 2 years ago

I have taken the pleasure to convert it to a 1bpp indexed version

now it fits even in DEBUG build:

[build] Memory region Used Size Region Size %age Used [build] FLASH: 482688 B 480 KB 98.20% [build] RAM: 54528 B 64 KB 83.20%

and regarding #1055, i see this comment, so i'll try to add it as a 5th watchface ("Casio Digital"), so it will not conflict with existed "Digital face".

i understand, that this will not be accepted into the mainline, but i'll try to make PR with attached build for OTA update based on InfiniTime 1.9 release.

explit7 commented 2 years ago

@ITCactus Could you please share updated files from this watchface, so we can build own firmware with Infinitimebuilder, until it takes time to find its way to the build?

I am on dl's Infineat PR build, so the PR build with Casio digital would be bomb!

this would be cool.

Thank you for your work!

ITCactus commented 2 years ago

i prepared the updated version of digistyle-Modpack for InfiniTime 1.9 not sure, if it will work with InfiniTime-Builder, but it contains updated code and 1bpp image (compatible with InfiniTime 1.9 "master" branch):

font files are unchanged.

[build] [100%] Linking CXX executable pinetime-mcuboot-app-1.9.0.out [build] Memory region Used Size Region Size %age Used [build] FLASH: 410212 B 480 KB 83.46% [build] RAM: 54512 B 64 KB 83.18% [build] post build steps for pinetime-mcuboot-app-1.9.0 [build] text data bss dec hex filename [build] 410212 948 53556 464716 7174c pinetime-mcuboot-app-1.9.0.out

ok, i had to verify the changes and the build on PineTime (since there are changes in develop branch for WatchFaceDigital since the latest 1.9 release...) and, as a result, i prepared a draft pullrequest (that i will not merge. it's just for files) https://github.com/InfiniTimeOrg/InfiniTime/pull/1116

there are "modpack" and "OTA update" attached, so you may have fun to try the watchface.

explit7 commented 2 years ago

Awesome!