feat(import layer): improve parsing of Cressi Leonardo download#342
Open
essengee wants to merge 1 commit into
Open
feat(import layer): improve parsing of Cressi Leonardo download#342essengee wants to merge 1 commit into
essengee wants to merge 1 commit into
Conversation
…ersion) log download
Contributor
Author
|
Hi @ericgriffin ! I've been wanting to work on this for some time and finally decided to day to give it a go. It (unfortunately) involves a change to libdivecomputer code and I'm not sure how (or even if!) you want to handle that; I don't have a fork of the submersion_patches but I can certainly figure that out if necessary. Just wasn't sure if it was better to do it ham-fisted or let you handle it since I think you by far know what you are doing more than I do in this area. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves dive data parsing for the original Cressi Leonardo dive computer. Previously, all ascent rate indicators from
the Leonardo were misclassified as "Deco Violation" alerts due to two bugs: an off-by-one error in the event type
mapper (all platforms), and the parser emitting events for non-alarm ascent levels. Additionally, the Leonardo's deco
obligation flag (stored as bit 11 in the sample data) was never extracted, meaning neither deco status nor deco
start/end events were reported. Water temperature from the dive header was also not being saved to the dive record.
Changes
libdivecomputer parser (cressi_leonardo_parser.c)
Leonardo hardware)
Event type mapper fix (all platforms)
to map to the wrong string
(DiveComputerHostApiImpl.swift)
Dart import layer
Leonardo temperature not appearing)
Tests
handling, and ceiling violation mapping
Test Plan
flutter testpassesflutter analyzepassesScreenshots
Note: NDL and ceiling in the Submersion screenshots below are calculated at 50/75 Buhlmann gradient - as close as I could get to the RGBM calculation of the computer for this dive. The computer itself does not include this level of detail in its 16 bits of sample data at 20 second intervals. Working with old tech here...
Result of original import:

Result of import after changes:

Screenshot of (ancient) Cressi PC Interface display of same dive:
