The only examples I have seen so far are small incomplete files that
don't contain the dive profile, so I'm unsure if this is sufficient (and
why there are big endian files in the first place).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge Jef's upstream updates:
- Add support for Seac Screen and Action
- Add support for Cressi Michelangelo
- misc small fixes
* https://github.com/libdivecomputer/libdivecomputer:
Add support for the Seac Screen and Action
Add an address parameter to the memory dump helper function
Ignore invalid gas mixes
Add support for the Cressi Michelangelo
Move the C_ARRAY_SIZE macro to a common place
Fix the timezone offset in the xml output
Emit a devinfo event when downloading a memory dump
Read the info and more info data during startup
Use helper functions to decode multibyte values
Fix changing the OSTC settings
This should always be tested for - the only other user of the generic
helper currently didn't test for it, either.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The generic function already handles all the cases (treating gasmix and
tank count as being the same and responding UNSUPPORTED to the same set
of types). The only thing missing is the check of the value parameter
and the extraction of the cache pointer from the context.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The code used sub_sport to figure out if this was a dive in the first
place, but then never reported back the specific dive mode, leading to
all dives being interpreted as open circuit.
Reported-By: Anton van Rosmalen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The gas mixes are numbered from 0 and up and the gas change event uses
this number directly, so no need to subtract one.
Signed-off-by: Michael Andreen <michael@andreen.dev>
Very early trial at parsing the pressure data from the Garmin tank pods.
It seems to work for the test-cases I have.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This adds the field definitions, but doesn't actually report the data
yet. But just having the definitions makes the debug output a lot
easier to read through.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This actually got broken long ago (and before the new "Subsurface-DS9"
branch: when I converted the Garmin parser to use the generic field
cache, I missed the fact that the parser now cleared _only_ that generic
part of the per-dive cache in between different dives.
The GPS information, and the general dive information would be left
alone in between dives, and could leak from one dive to the next.
Most of the time you don't notice, because dives tend to all have the
same information, so the stale data would get overwritten when parsing
the next dive. But that isn't _always_ true - particularly for the GPS
information, not all the data necessarily always exists.
So clear all the per-dive data when starting to parse a new dive.
This puts the non-gps data all in one sub-structure, so that it's easy
to clear that too in one go - even though that part of the data probably
always does get opverwritten by the new dive data.
Reported-by: @brysconsulting
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This uses pretty much all of our new infrastructure: the USB storage
iostream for the actual IO, the field-cache for the divecomputer fields,
and the string interface for the events.
It's also a very fast downloader.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>