Age | Commit message (Collapse) | Author |
|
This is the exact same case as the previous commit, just for the writing
side.
Once again, it's the subsurface rfcomm iostream code that can return
DC_STATUS_SUCCESS with a byte count of zero when something goes wrong
with the write.
And once again, our libdivecomputer iostream code didn't try to be
robust and protect itself from that case.
The fix is equivalent, although slightly simpler, since the write side
doesn't have the whole timeout issue.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
We had two independent bugs here, both of which needed to fire for this
to cause a problem. This fixes both of them.
The first bug was that our rfcomm code would return DC_STATUS_SUCCESS
with a zero-sized read when a timeout happened, or when the rfcomm
socket had disconnected. That makes absolutely no sense. We should
return DC_STATUS_TIMEOUT on timeout, and DC_STATUS_IO if the socket has
disconnected without any data.
The fix to this is to make the whole rfcomm iostream read logic much
simpler: there's no need to loop at all for partial results, because the
libdivecomputer iostream side will do the loop for us (and handle
partial results much better: it knows if the target backend can handle
those partial results or not).
The second bug was in our libdivecomputer iostream read() function,
which reacted very badly to this bad return value. This updates our
libdivecomputer branch to one that is more careful about things.
Reported-by: linuxcrash <albin@mrty.ch>
Debugged-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Pull upstream libdivecomputer updates from Jef Driesen:
- fix lack of "end of deco" on DiveSystem iDive computers by reporting
long NDL values
- clean up handling of Oceanic empty logbugger
- fix BLE download for Oceanic Pro Plus X that doesn't like the serial
number handshake.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
.. and update the libdivecomputer submodule to have them marked as BLE
capable.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
- fix Oceanic VT Pro date parsing
- add Sherwood Wisdom 4 and Scubapro Aladin A1 IDs from Janice McLaughlin
- fix Cressi gasmix index and depth parsing (the gasmix index bit had been
misparsed as very deep depth)
- Implement the gas mix sample
- Limit the depth value to 11 bits
- Add support for the Scubapro A1
- Add support for the Sherwood Wisdom 4
- Fix the vtpro datetime parsing
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Jef has changed the libdivecomputer iostream layer and extended it in
two different ways:
- iostram's now have a 'poll()' method, which does what the name
implies: waits for data to be available with a timeout.
- iostreams now have a 'ioctl()' method, which can be used to implement
miscellaneous operations. Right now the two ones that you can do are
"set latency" (this replaces the old 'set_latency()' method) and "get
BLE name" (this replaces our 'get_name()' method that was never part
of the upstream libdivecomputer interfaces)
Neither of these is all that complicated, and the transition is fairly
obvious.
HOWEVER.
I have absolutely no idea how to do 'poll()' on Windows sockets, and I
have no intention of figuring it out. We use a direct socket interface
to implement the (non-BLE) RFCOMM bluetooth serial protocol, and I'm not
sure why Windows is so special here. I suspect - but cannot test - that
we should just switch the Windows RFCOMM implementation over to the use
the same QtBluetooth code that we use on other platforms.
I assume that the Windows Bluetooth support was originally not
sufficiently good for that, but these days we depend on Qt doing BLE for
us even on Windows, so presumably FRCOMM works too.
That would be a nice cleanup, and would make 'poll()' work on RFCOMM
under Windows too. However, since I can't test it, I've not done that,
but instead just made the Windows RFCOMM 'poll()' method always return
success. That may or may not get the thing limping along.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
- Several fixes for Mares divecomputer BLE communication
- Fix the Aeris Manta memory layout
- Add support for the Oceanic Pro Plus 4
- Strip the source directory from file names
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add initial support for the Oceanic Pro Plus 4
Fix the Oceanic Geo 4.0 memory layout
Ignore all empty logbook entries
Add a workaround for the hwOS ppO2 firmware bug
Use macros to encode the firmware version
Use symbolic constants for the sample types
Remove the obsolete hwos parameter
Limit the tank pressure workaround to hwOS devices
Fix the OSTC tank pressure decoding
Fix the Scubapro G2 HUD udev rule
Add the Mares Genius to the bluetooth filter
Add firmware upgrade support for the Ratio computers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
- Add support for the Oceanic Geo 4.0
- clean up Shearwater tank pressure handling
- minor fixlets
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This just merges with Jef's branch, which should hopefully fix the Mares
BLUELINK Pro connection issues. Knock wood - I can no longer test it
due to lack of hardware.
It also improves on the Ratio iDive cylinder pressure transmitter support.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Nothing huge, but this fixes the Deepblu Cosmiq+ gasmix parsing, and
properly stops downloading when we've hit a dive we already have.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
I got confirmation from Tiago Thedim Dias that my libdivecomputer patch
makes BLE downloading work from the i200c, and already pushed out the
libdivecomputer changes earlier. This updates the subproject in
subsurface to have those changes.
This also adds the bluetooth name patterns for the i300c and a few other
Aqualung dive computers we hadn't added yet. That should make them show
up in the bleutooth device list even without having to check the "Show
all bluetooth devices" check-box.
Tiago claims he didn't need that, and I wonder if we have some overly
permissive match somewhere, but it's the right thing to do regardless.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Add support for Deepblu Cosmiq+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
- Add support for the Aqualung i550C
- Update Ratio iX3M GPS naming and note that they support rfcomm
- misc cleanups
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add some Garmin Descent logging for common error cases, and update with
Jef's upstream (fixing tank pressure information for several dive
computers and adding support for the new Mares Genius).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Note that we don't really have libdivecomputer support for it yet, only
newly added model numbers etc. But the name detection should make it
easier for people to at least download a memory dump.
In addition to the libdivecomputer model number updates, this also has a
merge of Jef's upstram libdivecomputer changes.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
This is just a trivial update to recognize the BT name, and a
libdivecomputer submodule update to get the updates to libdivecomputer
to recognize the new USB IDs etc.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Suunto EON Steel/Core: make sure to properly sort the dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Garmin: be more permissive about the activity type
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This adds ID entries for the Scubapro G2 HUD (but no GPS parsing support
yet) and the Aladin H Matrix.
Also fix ndl/deco parsing for for Aqualung i450T.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Merge upstream updates from Jef:
- better Mares Bluelink Pro downloading
- Suunto DX CCR and gas mix fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
- Shearwater Teric: add support for the TAG INFO_EVENT
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
- ignore empty pressure samples from OSTC
- skip empty Oceanic logbook entries
- update Ratio parsing
- Shearwater: fix (again) per-cell ppO2 reporting
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
shearwater: properly initialize the string caches
Shearwater parser: add new harware model nr for Teric
Merge git://github.com/libdivecomputer/libdivecomputer into Subsurface-NG
Update with Jef's upstream:
- add support for Cressi Goa and Cartesio
- update the Shearwater PNF parser to Jef's version
- misc minor fixes
* git://github.com/libdivecomputer/libdivecomputer:
Use the timezone setting of the dive computer
Add support for the Cressi Goa and Cartesio
Add an extra parameter for the initial CRC value
Add support for the Ratio iDive Color series
Shearwater Petrel Native Format parsing
Shearwater: detect which logbook format is support
Shearwater: add Teric to list of supported dive computers
Shearwater: skip deleted dives
Fix a potential buffer overflow
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Catch up with Jef's upstream
Fix Oceanic pattern matching for BLE versions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
- Enable BLE support for the Oceanic Pro Plus X
- Add support for the Aqualung i300C
- Fix the Pro Plus X gas mixes
- Add a workaround for invalid ringbuffer begin pointers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
More fixes for the Aqualung i770R.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Fixes for Garmin Descent Mk1 and Aqualung i770R.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Retry packet send for BLE connections for Aqualung i770R.
(oops, Linus pushed right when I pushed the previous update)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add initial support (BLE only) for Aqualung i770R.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Mares bluetooth support tweaks
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Fix dc_iostream_{read,write} debugging implementation
Mares Icon HD family: send the command as one single write buffer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Fix bugs in Shearwater Teric support.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add support for the Aqualung i100.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This fixes the incorrect parsing of surface pressure on the Teric
Fixes #1701
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This adds Shearwater Teric support as well as TTS support for the Suunto
EON family.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Parse more Garmin Descent events.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Dirk Hohndel (4):
garmin: ignore FIT files that aren't dives
garmin: extract the devinfo from the first FIT file we parse
garmin: adjust the model to reflect the FIT product code
Garmin: don't assume that the first device index is 0
Linus Torvalds (5):
Add support for DC_SAMPLE_TTS - time to surface in seconds
Garmin: add DC_SAMPLE_CNS reporting
garmin: don't suppress the time sample at zero time
garmin: start decoding notifications and gas change events
garmin: improve on debug log output for unknown fields
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This adds support for the Garmin Descent, among other changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is a first step to interpret bailout events.
1) The event structures have a new attribute: divemode.
Currently interpreted dive modes are OC, CCR, PSCR.
2) When doing fill_pressures(), the calculation is aware
of divemode. When divemode is OC (==bailout), then
the appropriate calculations of gas pressures are done.
3) Two new functions get_next_divemodechange() and
get_divemode_at_time() are created to find divemode
changes in the events linked list and to determine
the dive mode at any point during the dive.
4) fill_pressures gets a small amendment to facilitate
the correct calculations, depending on divemode.
The cases where fill_pressures() is used *outside the planner*
are changed. The result is that, for dives with bailout, the
correct gas pressures are shown on the dive profile. The
deco for bailout dives is not yet correct. This is the
next step.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is the flag-day update that goes along with the last three patches.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|