-
Notifications
You must be signed in to change notification settings - Fork 273
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
Driver/LX: Show flights with invalid date #1254
base: master
Are you sure you want to change the base?
Conversation
Did you consult with the vendor about this? Passing around illegal date values can result in all sorts of follow-up bugs (like assertion failures), so I'd rather not do this, or only do this after changing the definition of a field to allow illegal values, and then ensuring all code paths allow it. |
I understand the concern with the invalid date. I did consult with lxnav: Would a check that would specifically check for 1980-00-00 be acceptable? |
Unfortunately, LXNAV's explanation doesn't make them sound competent. How can you start recording a flight if you don't have a GPS fix yet? (a GPS fix always comes with a date.)
And then what? |
The recording happens when a GPS TIme is established. The (empty) File is created at startup. LOGBOOK returns the igc's file timestamp, not the flight date that is contained in the IGC record.
Right now if date.isPlausible is false XCSoar simply times out when enumerating the flight log list. You can't download any flight regardless whether it has an invalid file date or not, as the list never appears when one record has the invalid date. We can either remove the isPlausible check, hence not checking the date for validity at all, or accept the 1980 value in addition to all valid date values. Or we could add error handling to the isPlausible check and replace the string with "Invalid date" and display it to the user. |
Timeout shouldn't happen. But fixing a timeout by accepting bogus values sounds suspicious. What is the real reason for the timeout? |
In short: The operation expects a true from the ReadDate function here: XCSoar/src/Device/Driver/LX/NanoLogger.cpp Lines 142 to 154 in 68919b8
There is no error handling for the function ParseLogbookContent: XCSoar/src/Device/Driver/LX/NanoLogger.cpp Lines 157 to 168 in 68919b8
So bascially ReadLogBookLine is reading the line, discards the lines that are not LOGBOOK related, but ParseLogbookContent returns only valid lines. If the line does not pass the check, this function isn't returning true, and we stay in the whlie loop until timeout.
In the meantime, I have received a beta firmware from Uros @ lxnav. This should resolve the original problem, and the file should only be created once a GPS TIME is valid. He however states that this only fixes the problem for future flights. So the original Problem is still there. |
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 21.7% (416 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/hr/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/zh_Hans/
Currently translated at 99.9% (1913 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/fr/
Currently translated at 97.2% (1862 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/de/
Currently translated at 96.8% (1853 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/sv/
Currently translated at 21.0% (402 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/ca/
Currently translated at 98.3% (1883 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/ko/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 95.5% (1828 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/bg/
Currently translated at 73.3% (1404 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/pt/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 97.3% (1864 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/sv/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 100.0% (1914 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/cs/
Currently translated at 86.9% (1664 of 1914 strings) Translation: XCSoar/Translations Translate-URL: https://hosted.weblate.org/projects/xcsoar/translations/hu/
This has been unmaintained for many years and probably nobody has been using it for a looong time. To avoid bit-rot, let's remove it (until somebody complains).
S8x/S10x Varios (pre 9.17 firmware) record the flight date with 1980-00-00 when there is no GPS fix at start. This date is then returned with PLXVC,LOGBOOK
a6fcaa4
to
03372a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can understand the wish to access also the igc files with "missing" date, especially when it is an lxnav issue (at least a past one). Bypassing the date check might be risky, yes. I would brute force change the known broken date 0.0.1980 with a known broken one, that passes the date check (e.g. 1.1.1980). Also not nice, but gets the user to where it wants.
Any other solution that handles the exception, avoids the time-out, and exposes the bad luck to the user is fine, but will remain him w/o the desired file. One that is expected to be still useful.
No description provided.