[PATCH 4/6] Add support for libdivecomputer DC_FIELD_DIVEMODE
Jef Driesen
jef at libdivecomputer.org
Sun Nov 9 02:11:44 PST 2014
On 09-11-14 08:54, Dirk Hohndel wrote:
>> On Nov 8, 2014, at 8:02 PM, Matt Thompson <mathomp at gmail.com
>> <mailto:mathomp at gmail.com>> wrote:
>>
>> I have a cobalt 2 so once we have patches available I can give it a try.
>>
> OK, I ended up just implementing this… it’s pushed to master. In a broken commit
> that I pushed earlier and then a fix once I realized that this didn’t compile
> with older versions of libdivecomputer - but since it had been in the public
> tree for a while it seemed wrong to force push a fixed commit, so my stupidity
> will stay visible for the world…
>
> Please test.
I did a quick test using a Cobalt 2, and I think there are some issues. (Note
that there was a bug in libdivecomputer too, for which I just pushed a fix.)
I attached the raw data for one such dive. It has 5 tanks configured. Four
metric and one imperial (in CUFT at BAR mode). Only one of the metric tanks is
used. See the libdivecomputer xml output below. When downloading this dive into
subsurface, this looks wrong:
* None of the tanks has volume or working pressure.
* The O2 percentage for air is missing. I'm not sure if this is by design or
not, but I expected to see 21% here.
See the attached screenshot.
Note that this problem is not specific to the Cobalt. I see exactly the same
with the Mares Darwin Air (and Airlab). That might help for debugging the
problem, because with the darwin backend you can use the simulator. If you
disable the 50 ms delay in mares_darwin_device_open, it runs faster :-)
The corresponding libdivecomputer xml output:
<gasmix>
<he>0.0</he>
<o2>21.0</o2>
<n2>79.0</n2>
</gasmix>
<gasmix>
<he>0.0</he>
<o2>32.0</o2>
<n2>68.0</n2>
</gasmix>
<gasmix>
<he>0.0</he>
<o2>36.0</o2>
<n2>64.0</n2>
</gasmix>
<gasmix>
<he>0.0</he>
<o2>21.0</o2>
<n2>79.0</n2>
</gasmix>
<gasmix>
<he>0.0</he>
<o2>21.0</o2>
<n2>79.0</n2>
</gasmix>
<gasmix>
<he>0.0</he>
<o2>21.0</o2>
<n2>79.0</n2>
</gasmix>
<tank>
<gasmix>0</gasmix>
<type>metric</type>
<volume>10.0</volume>
<workpressure>0.00</workpressure>
<beginpressure>309.02</beginpressure>
<endpressure>70.60</endpressure>
</tank>
<tank>
<gasmix>1</gasmix>
<type>metric</type>
<volume>10.0</volume>
<workpressure>0.00</workpressure>
<beginpressure>0.00</beginpressure>
<endpressure>0.00</endpressure>
</tank>
<tank>
<gasmix>2</gasmix>
<type>metric</type>
<volume>10.0</volume>
<workpressure>0.00</workpressure>
<beginpressure>0.00</beginpressure>
<endpressure>0.00</endpressure>
</tank>
<tank>
<gasmix>3</gasmix>
<type>imperial</type>
<volume>2038.8</volume>
<workpressure>206.84</workpressure>
<beginpressure>0.00</beginpressure>
<endpressure>0.00</endpressure>
</tank>
<tank>
<gasmix>4</gasmix>
<type>metric</type>
<volume>10.0</volume>
<workpressure>0.00</workpressure>
<beginpressure>0.00</beginpressure>
<endpressure>0.00</endpressure>
</tank>
<tank>
<gasmix>5</gasmix>
<type>metric</type>
<volume>10.0</volume>
<workpressure>0.00</workpressure>
<beginpressure>0.00</beginpressure>
<endpressure>0.00</endpressure>
</tank>
Jef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cobalt-tanks.png
Type: image/png
Size: 16645 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141109/19d798e1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dive_01.bin
Type: application/octet-stream
Size: 12752 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20141109/19d798e1/attachment-0001.bin>
More information about the subsurface
mailing list