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

2024.1.0: Advanced clock - draw date #197

Conversation

andrewjswan
Copy link

In advanced clock mode, the date separator will be displayed with the color of the clock separator.

@andrewjswan andrewjswan marked this pull request as draft January 8, 2024 14:29
@lubeda
Copy link
Owner

lubeda commented Jan 8, 2024

While testing this PR, I found a bug. With advanced_clock: true the set_infotext_color isn't working anymore.

There is also the question: Why we need advanced_clock. This feature could be standard.

@andrewjswan
Copy link
Author

There is also the question: Why we need advanced_clock. This feature could be standard.

I'm not against making it standard, but maybe it's not necessary for everyone, well, and adds a load, though not a big one.

With advanced_clock: true the set_infotext_color isn't working anymore.

I probably forgot to write this, but in advanced clock mode, set_infotext_color works for the date screen, set_clock_infotext_color works for the clock screen.

So adds the ability to have different colors on the date screen and the clock screen.

If making this extended clock feature the default (standard), then maybe that needs to be revised.

@andrewjswan
Copy link
Author

Also I think whether it is necessary to add a separate color for the number and month in the date, or one color for the date and the color for the separator from the clock will be enough.

@andrewjswan
Copy link
Author

I checked with myself, the change works.
You can inject into the main branch, and then reformat to make this functionality the default working one.

@andrewjswan
Copy link
Author

I wanted to add that the numbers change by vertical scrolling as in flip flop clock, but I have not yet figured out how to catch the time of the beginning of the digit change, and how to do it nicely. :)

@andrewjswan andrewjswan marked this pull request as ready for review January 8, 2024 17:45
Added `set_date_infotext_color` and `time_format_big`
`set_infotext_color` when called overrides `set_clock_infotext_color` and `set_date_infotext_color`
@andrewjswan
Copy link
Author

andrewjswan commented Jan 10, 2024

This is my current work config:

ehmtxv2:
  id: rgb8x32
  icons2html: true
  iconscache: true
  matrix_component: ehmtx_display
  time_component: ehmtx_time
  time_format: "%H:%M"
  time_format_big: "%H:%M:%S"
  date_format: "%d•%m"
  date_format_big: "%a•%d•%b"
  weekdays: "일월화수목금토"
  replace_time_date_from: "Sun Mon Tue Wed Thu Fri Sat Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec"
  replace_time_date_to:   "ВС ПН ВТ СР ЧТ ПТ СБ Січ Лют Бер Кві Тра Чер Лип Сер Вер Жов Лис Гру"
  default_font_id: default_font
  default_font_yoffset: 7
  special_font_id: special_font
  special_font_yoffset: 8
  blend_steps: 32
  show_seconds: false
  advanced_clock: true
  advanced_bitmap: true
  boot_logo: "[0,...,0]"
  boot_logo_mode: 7

...

  on_start_running:
    then:
      lambda: |-
        id(rgb8x32)->expand_icon_to_9(3);

        id(rgb8x32)->set_clock_infotext_color(200,200,200, 200,200,200, true, 0);
        id(rgb8x32)->set_adv_clock_color(0,0,0, 0,0,0, 150,150,150);
        id(rgb8x32)->icon_clock("blank|day#2", 1440, 10, true);

        id(rgb8x32)->set_date_infotext_color(0,150,240, 0,150,240, false, 1);
        id(rgb8x32)->icon_date("blank|weekday", 1440, 5, true);

        id(rgb8x32)->show_icon_indicator(240,240,240, 7, 7, 1);
        id(rgb8x32)->set_weekday_accent_on();

@lubeda lubeda merged commit b47bec1 into lubeda:2024.1.0-prerelease Jan 11, 2024
1 check passed
@andrewjswan andrewjswan deleted the 2024.1.0-Advanced_clock_draw_date branch January 29, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants