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

[new watchface] watchface inspired by G7710, with day of year and week number info (+ battery level %) #1122

Merged
merged 7 commits into from
Oct 1, 2022

Conversation

ITCactus
Copy link

@ITCactus ITCactus commented May 9, 2022

watchface inspired by G7710, with day of year and week number info.
features:

  • week number in format WKXX
  • day of the year
  • days till the end of the year
  • support for 12/24h format, that corresponds to date and week number formats:
  1. for 12h format, the date displayed in "mm - dd" format (like for "Digital face"), and assumes the first day of week is Sunday, and "The first Sunday of January is the first day of week 1; days in the new year before this are in week 0.";
  2. for 24h format, the date displayed in "dd- mm" format (like for "Digital face"), and assumes the first day of week is Monday,
    and "If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. Both January 4th and the first Thursday of January are always in week 1."
  • battery level in percentage (in v2)

"Casio G7710" watchface added as a new one, the 5th one, thanks to this comment

on InfiniSim v2 looks like this (for 24h and 12h formats)

24h v2 12h v2

and on the PineTime
v1
G7710 photo


and just for the reference, the inspiration:
image


for those, who would like to play with it on the PineTime,
have fun:
V2 pinetime-mcuboot-app-dfu-1.10.0 + G7710 + UA-PL.zip


BTW, there was also a request for watchface like this.


and, of course, the memory...

[build] [100%] Linking CXX executable pinetime-mcuboot-app-1.9.0.out
[build] Memory region Used Size Region Size %age Used
[build] FLASH: 417968 B 480 KB 85.04%
[build] RAM: 55088 B 64 KB 84.06%
[build] post build steps for pinetime-mcuboot-app-1.9.0
[build] text data bss dec hex filename
[build] 417968 1520 53564 473052 737dc pinetime-mcuboot-app-1.9.0.out

@Riksu9000 Riksu9000 added the new watchface This thread is about a new watchface label May 9, 2022
@Riksu9000
Copy link
Contributor

Thanks for this PR. Unfortunately we are tight on memory and may not be able to merge new watchfaces for now.

@SteveAmor
Copy link
Contributor

Been running this watch face for a few days now and love it.

@ITCactus
Copy link
Author

Been running this watch face for a few days now and love it.

then i'm sorry, but i'm planning a small redesign... :)

@SteveAmor
Copy link
Contributor

Unfortunately it crashes after about 36 hours. And eventually, the wdt reboots it :-(
20220513_151619

@ITCactus
Copy link
Author

not sure what could have happened...
it works for me for about a week on 2 PineTimes.
1 is a daily-driver, and "About" shows uptime as about 4 days (3d 22 h).
no crashes so far.

@VENTDEV
Copy link

VENTDEV commented May 13, 2022

My only request is to allow us to pick MM-DD when using 24HR clock. ISO is preferred.

@ITCactus
Copy link
Author

ITCactus commented May 13, 2022

My only request is to allow us to pick MM-DD when using 24HR clock. ISO is preferred.

@VENTDEV, that's a good point.
i would ask you to log a feature request ("New issue"), because IMHO that should be done like 12/24 format - system wide setting, and not only for the watch-face. (requested in #1166 )
i would try to implement that and also add a support for "Digital face" to make it use that user format.

and as for this watch-face - i would extend that formatting settings with additional

  • first day of week
  • first week of year

... cause it maybe really useful also for Calendar app PR #923

@SteveAmor
Copy link
Contributor

not sure what could have happened... it works for me for about a week on 2 PineTimes. 1 is a daily-driver, and "About" shows uptime as about 4 days (3d 22 h). no crashes so far.

It has happened twice now. I get a lot of notifications which is how I noticed this. Once, just the time was in the corrupt state and it came back but after a few minutes, it went totally bad :-(

@ITCactus
Copy link
Author

It has happened twice now. I get a lot of notifications which is how I noticed this. Once, just the time was in the corrupt state and it came back but after a few minutes, it went totally bad :-(

sorry about that... i assume, it's a lack of resources (e.g. low on free RAM)...
but have no idea how to improve that...

maybe @Riksu9000 can clarify what it could be

@ITCactus
Copy link
Author

ITCactus commented May 16, 2022

@ITCactus ITCactus marked this pull request as draft May 16, 2022 10:09
@ITCactus ITCactus changed the title [new watchface] watchface inspired by G7710, with day of year and week number info [new watchface] watchface inspired by G7710, with day of year and week number info (+ battery level %) May 16, 2022
@SteveAmor
Copy link
Contributor

I'm still on your first version you shared as I wanted to get to the bottom of the crashes. lvgl memory just keeps on going up and up until it crashes. Here's a pic of the memory usage just before it crashed. I knew a crash was coming as the display became corrupt so I captured the mem usage. After a reflash, lvgl memory usage dropped to 17%. So there's some garbage collection or some such which isn't happening. As I said, I get lots of notifications so the watch face is activated many times a day.
20220516_185322

@ITCactus
Copy link
Author

ITCactus commented May 17, 2022

I'm still on your first version you shared as I wanted to get to the bottom of the crashes. lvgl memory just keeps on going up and up until it crashes. Here's a pic of the memory usage just before it crashed. I knew a crash was coming as the display became corrupt so I captured the mem usage. After a reflash, lvgl memory usage dropped to 17%. So there's some garbage collection or some such which isn't happening. As I said, I get lots of notifications so the watch face is activated many times a day.

i see... could you check if you will have the same issue on that build with another watchface (e.g. PineTimeStyle)?
i do not know what kind and size/length of notification you have usually, but i tried to send from Gadgetbridge a couple dozens of test notification in a row (in less than a minute), and i do not see such a huge memory consumption by LVGL on "about" screen. for me it's about 25-40% max.

update:
ok, looks like the key is not the number of notifications, but the UX sequence:
when i send notification, dismiss it to see the watchface, send another one and dismiss it, and repeat this dozens of times i see lvgl eating memory...
@SteveAmor you are right, it's the watchface related issue. i'll try to find a solution...

@SteveAmor
Copy link
Contributor

Is it because you are using static lv_style_t?

@ITCactus
Copy link
Author

maybe... can't check since i'm stuck on rebase... on windows setup with docker i have some build issues, and on linux w/o docker the InfiniSim just crashes on attempt to display this watchface.

@ITCactus
Copy link
Author

good news, everyone!
the memory leak has been defeated.
feel free to have a fun with this fixed version
pinetime-mcuboot-app-dfu-1-9+G7710-v2-fix.zip

@dvidebaek
Copy link

Thanks! Finally a Watch face that shows week Numbers. A must When you are a teacher! You are GOAT!!!

@dvidebaek
Copy link

Is it possible to change the start of a week to monday? In Denmark every week starts on a monday not sundays. Maybe make a setting so you could choose what you prefer?

@ITCactus
Copy link
Author

Is it possible to change the start of a week to monday? In Denmark every week starts on a monday not sundays. Maybe make a setting so you could choose what you prefer?

no settings so far, but i'll try to add some global (like "Time format").

according to Sunday/Monday, there is description in the PR:

for 24h format, the date displayed in "dd- mm" format (like for "Digital face"), and assumes the first day of week is Monday,
and "If the week containing 1 January has four or more days in the new year, then it is considered week 1. Otherwise, it is the last week of the previous year, and the next week is week 1. Both January 4th and the first Thursday of January are always in week 1."
so, just use 24h format for now.

but if you referring to the week numbers, than it's not so easy...
well, i tried to make it easy, and just using the build-in conversion from date to week number... and there are 3 options available:

  1. %V - Week of the year (Monday as the first day of the week) as a decimal number [01-53]. If the week containing January 1 has four or more days in the new year, then it is considered week 1; otherwise, it is the last week of the previous year, and the next week is week 1.
  2. %U - Week of the year (Sunday as the first day of the week) as a decimal number [00-53]. All days in a new year preceding the first Sunday are considered to be in week 0.
  3. %W - Week of the year (Monday as the first day of the week) as a decimal number [00-53]. All days in a new year preceding the first Monday are considered to be in week 0.

so, in this current state, the 1st option is for 24h time format, the 2nd option is for 12h Time format.
the 3rd option is not used, as there is no settings for watchface (or globally), and option 1 is appears an ISO standard, so it's preferred.

@dvidebaek
Copy link

I meant week numbers. Saw that the week number switch to week 21 on sunday. In Denmark it would not have switched on sunday but today on a monday. Not that Big of a deal. Just have to get use to it

@ITCactus
Copy link
Author

I meant week numbers. Saw that the week number switch to week 21 on sunday.

it's a bug! :)
thanks for reporting. i overlooked this =)

@ITCactus
Copy link
Author

@dvidebaek and here is the fix :)
pinetime-mcuboot-app-dfu-1.9.0 + G7710 + UA-PL-v2-fix02.zip

@ITCactus
Copy link
Author

just for fun...
that's how the attempt to port info from G7710 (day of year and week number info) looked on another smart device :)

MS Band2 archives

@dvidebaek
Copy link

dvidebaek commented May 31, 2022

just for fun... that's how the attempt to port info from G7710 (day of year and week number info) looked on another smart device :)

MS Band2 archives

Windows phone and Microsoft Band 2? :-) have a Band 2 somewhere. Look at this repository. This man made the Band work on Windows 10 and 11. Could be Nice if we could get his work ported to Gadgetbridge so we could use the band again. https://github.com/OverallLine5/MobileBandSync

@ITCactus
Copy link
Author

ITCactus commented Jun 1, 2022

exactly!... and i really loved the attention to details in it... an option to set the accent color system-wide, and the animation for turning on "sleep" with wishes... i really miss it...
and while regretting one more time that i factory reset it in 2020 because it was no more repairable (glued the band dozens of times, reworked the strap from the scratch, soldered semi-ripped flex strip/connector to the battery, and even reworked the battery to charge it externally with 2 pins because of that. but eventually the flex strip/connector has ripped-off completely in another place... oh, damn 2-layred flex cables) and can be used only under usb-charger, just found the info about "Band Unlocker"!..
so it looks like my can be used again, at least like a desktop (working desk) gadget =)

regarding the Gadgetbridge i see the old request 857. just for the reference.

@JF002 JF002 mentioned this pull request Jun 26, 2022
6 tasks
@ITCactus ITCactus force-pushed the watchface-casio-digital-G7710 branch from 60536db to 50b9879 Compare June 30, 2022 14:23
@ITCactus
Copy link
Author

Yellow Mango-based release:
pinetime-mcuboot-app-dfu-1.10.0 + G7710 + UA-PL.zip

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
@JF002 JF002 merged commit fbe964f into InfiniTimeOrg:develop Oct 1, 2022
@antoinem01
Copy link

Is there a version for infinitime 1.14.0 / 1.14.1 available somewhere?

@FintasticMan
Copy link
Member

This watch face is already included in 1.14... If it shows up as greyed out in the watch face settings, you've got to update the resources.

@antoinem01
Copy link

Thank you.
But not through gadgetbridge as I understand.
I'll find another way.

@Nitrowing
Copy link

I used Gadgetbridhe to update the watch, verified it and then the watch allows you to set the Casio face.

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.

9 participants