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

Garmin: Remove File Name from File Data. #72

Merged

Conversation

mikeller
Copy link
Member

@mikeller mikeller commented Jan 1, 2025

Remove the file name from the beginning of the file data buffer. This is
in preparation to a move to shift the .FIT file importer to 'Import log
files'.
The file name in the buffer does not seem to be used for anything, and
it seems to be wrong to have this added only for the parser to then have
to remove this non-file-content again first thing.
Fingerprinting has been confirmed as working after this change.

@torvalds, @dirkhh: As the original creators of the Garmin importer, do you know if there are any hidden reasons to have the file name included in the file content buffer?

Signed-off-by: Michael Keller [email protected]

Remove the file name from the beginning of the file data buffer. This is
in preparation to a move to shift the .FIT file importer to 'Import log
files'.
The file name in the buffer does not seem to be used for anything, and
it seems to be wrong to have this added only for the parser to then have
to remove this non-file-content again first thing.
Fingerprinting has been confirmed as working after this change.

Signed-off-by: Michael Keller <[email protected]>
@mikeller mikeller force-pushed the garmin_remove_filename branch from 6d03f62 to f9a4d59 Compare January 1, 2025 03:48
@mikeller mikeller requested review from dirkhh and torvalds January 1, 2025 03:48
mikeller added a commit to subsurface/subsurface that referenced this pull request Jan 1, 2025
Move the import of .FIT files into the 'Import log files' menu item,
where most people will be looking for it. This also naturally opens a
file selection dialog, which is more intuitive than having to select
this in the dive computer import dialog.
Also fix a bug affecting file imports if the log files contain
coordinates - the dive log needs to be set in the import data structure.
And refactor the file dialog file filters to make it more natural to add
more entries.

Requires subsurface/libdc#72 to work.

Signed-off-by: Michael Keller <[email protected]>
@mikeller mikeller merged commit c57fcac into subsurface:Subsurface-DS9 Jan 1, 2025
8 checks passed
@mikeller mikeller deleted the garmin_remove_filename branch January 1, 2025 04:04
@mikeller
Copy link
Member Author

mikeller commented Jan 1, 2025

Apologies @torvalds and @dirkhh for merging this before you could review it, but due to a broken git hook I accidentally pushed 5889c1a3f82d21d56cf33b62e72e73af6c5a2835 into https://github.com/subsurface/subsurface, and this needed to go in to make the .FIT log file import work.

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.

1 participant