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

Changes to date/time setting on color LCD radios. #2884

Merged
merged 2 commits into from
Dec 18, 2022

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Dec 16, 2022

Summary of changes:

  • Limits the max value for the day field to the actual number of days in the selected month and year
  • If the month or year is updated, and the day value is out of range, reset day value to max value for month & year
  • Only update UI values on screen if the RTC value is different to the displayed value (assumes screen update is expensive compared to value comparison)
  • Limit the range for the hour value to 0..23 (was 0..24)

…in the selected month.

If month or year is updated check that day value is still in range, if not update day to max value for selected year and month.
Only update UI values that have actually changed.
Copy link
Member

@gagarinlg gagarinlg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice, thx work you work. I will test this today

radio/src/gui/colorlcd/radio_setup.cpp Outdated Show resolved Hide resolved
radio/src/gui/colorlcd/radio_setup.cpp Show resolved Hide resolved
@pfeerick pfeerick added color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour labels Dec 18, 2022
@pfeerick pfeerick added this to the 2.9 milestone Dec 18, 2022
@pfeerick pfeerick merged commit 0be85bb into EdgeTX:main Dec 18, 2022
mha1 pushed a commit to mha1/edgetx that referenced this pull request Dec 22, 2022
…ues before updating screen (EdgeTX#2884)

* Fix RTC date editing to limit day max value to actual number of days in the selected month.
If month or year is updated check that day value is still in range, if not update day to max value for selected year and month.
Only update UI values that have actually changed.

* Use struct assignment instead of memcpy to initialise property.
@philmoz philmoz deleted the date-time-edit branch September 20, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants