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

fix(color): Refreshing of GPS and DATE_TIME telemetry when using Value Widget #4250

Merged
merged 5 commits into from
Nov 4, 2023

Conversation

frankiearzu
Copy link
Contributor

@frankiearzu frankiearzu commented Oct 26, 2023

Fixes #4170

Summary of changes:
With data-types who are not plain 32bit numbers, like GPS, Text, DATE_TIME, we have to populate the telemetry "value" with something that changes so that the "value" widget detects the change. The trick is to populate the "value" with a hash of the GPS or DATE_TIME complex value. The actual value for GPS and DateTime are stored in different variables.

The "value" widget was not displaying correctly DATE_TIME, fixed it (don't know why was moving the x coordinate -42 pixels!).
Change dateTime format to ISO 8601 date for color radios (YYYY-MM-DD HH:MM:SS).

NOTE: B&W was already this format (with 4 digits for year), and sensor log writing too... good for consistency.

NOT COMPILED FOR PRODUCTION: Updated Spektrun GPS testing code to change the values for GPS coordinates and Date without having the physical sensor (used previously captured data).

NOTE: Same PR worked for 2.9.1 as well as Main.

Fixes refresh of GPS and DATETIME values on Value Widget (color)
@frankiearzu
Copy link
Contributor Author

GPS DATETIME not displaying correctly:
screen-DATETIME_BAD

GPS Date displaying correctly: (FYI: my testing GPS time don't match the radio time).. Posible improvement: Show the month in text instead of number to avoid confusing in different country formats... challenge: localization
screen-datetime-OK

@frankiearzu frankiearzu reopened this Oct 26, 2023
@frankiearzu frankiearzu changed the title fix (color) Fix refrehing of GPS and DATE_TIME values on Value-Widget. fix (color) Fix refrehing of GPS and DATE_TIME telemetry values when using Value-Widget. Oct 26, 2023
@frankiearzu
Copy link
Contributor Author

frankiearzu commented Oct 27, 2023

Change dateTime format to ISO 8601 date for color radios (YYYY-MM-DD HH:MM:SS).

NOTE: B&W was already this format (with 4 digits for year), and sensor log writing too... good for consistency.

All dates consistent in screens and logs.

screen-widget
screen-tel
image

@pfeerick
Copy link
Member

Fantastic! :) Yes, YYYY-MM-DD makes more sense to me, as you can straight away work out the year, and hopefully then figure out it's MM-DD after that.

@pfeerick pfeerick added this to the 2.9.2 milestone Oct 27, 2023
@pfeerick pfeerick added bug 🪲 Something isn't working color Related generally to color LCD radios widget telemetry 📶 labels Oct 27, 2023
@pfeerick pfeerick changed the title fix (color) Fix refrehing of GPS and DATE_TIME telemetry values when using Value-Widget. fix (color): Refreshing of GPS and DATE_TIME telemetry when using Value Widget Oct 27, 2023
@pfeerick pfeerick changed the title fix (color): Refreshing of GPS and DATE_TIME telemetry when using Value Widget fix(color): Refreshing of GPS and DATE_TIME telemetry when using Value Widget Oct 27, 2023
@pfeerick pfeerick self-requested a review October 29, 2023 01:34
@pfeerick pfeerick merged commit cd89e06 into EdgeTX:main Nov 4, 2023
37 checks passed
MRC3742 pushed a commit to MRC3742/edgetx that referenced this pull request Dec 22, 2023
@frankiearzu frankiearzu deleted the value_widget_gps_tel_fix branch January 28, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working color Related generally to color LCD radios telemetry 📶 widget
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GPS value widget does not update
2 participants