Re: Subsurface interface with libdivecomputer

2015-05-22 Thread Jef Driesen

On 2015-05-21 15:11, Dirk Hohndel wrote:
On May 21, 2015, at 2:49 AM, Jef Driesen j...@libdivecomputer.org 
wrote:
That's another thing. Internally Uwatec stores the id of the gasmix, 
but currently the libdivecomputer api delivers only the o2/he 
percentages, so you can distinguish between two identical mixes.


This mistake will be fixed in the near future. The implementation is 
already done, but I haven't applied it yet, because it breaks 
backwards compatibility.


An intermediate solution might be to introduce the new 
DC_SAMPLE_GASMIX api right now, but maintain the old gaschange events 
in parallel. The old gaschange events will become deprecated, but 
applications using them will continue to work as before. And once v0.5 
is out, we can finally remove the old events.


I thought that had been the plan all along…


Well, originally I planned to release v0.5 several months ago. And then 
breaking backwards compatibility wouldn't be an issue. But that's not 
where we are now, so I'll go for the intermediate solution outlined 
above.


But that will have to wait one more week, because I'm leaving tonight 
for a diving trip.



And once 0.5 is out we should also talk about the things that are
currently in the Subsurface-testing branch and haven’t made it into
master. I’d love to not need that branch (or at least keep it as small
as reasonably possible).


Indeed.

Jef
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface interface with libdivecomputer

2015-05-21 Thread Dirk Hohndel

 On May 21, 2015, at 2:49 AM, Jef Driesen j...@libdivecomputer.org wrote:
 
 On 2015-05-19 20:57, Salvador Cuñat wrote:
 Back in march Jef introduced some changes in uwatec_smart_parser.c,
 specifically, he turned off gasmix support for galileo devices with trimix
 firmware, so, if your DCs are trimix you won't have gasmix events althoug
 recorded by the galileo.
 
 That may indeed be the problem. The good news is that I already do know where 
 the gas mixes are stored for the trimix. They are no longer in the header, 
 but in one of the unknown sample types. This is still work in progress.
 
 There is another posibility, as far as had understood libdc code.  I think
 you have to set more than one mix in the galileo, (even although they were
 the same mix) for libdc to detect them.  So, if you were doing, e.g., a
 sidemount dive with the same mix in both tanks and you have set only one
 mix you won't have gaschange events too.
 
 That's another thing. Internally Uwatec stores the id of the gasmix, but 
 currently the libdivecomputer api delivers only the o2/he percentages, so you 
 can distinguish between two identical mixes.
 
 This mistake will be fixed in the near future. The implementation is already 
 done, but I haven't applied it yet, because it breaks backwards compatibility.
 
 An intermediate solution might be to introduce the new DC_SAMPLE_GASMIX api 
 right now, but maintain the old gaschange events in parallel. The old 
 gaschange events will become deprecated, but applications using them will 
 continue to work as before. And once v0.5 is out, we can finally remove the 
 old events.

I thought that had been the plan all along…

And once 0.5 is out we should also talk about the things that are currently in 
the Subsurface-testing branch and haven’t made it into master. I’d love to not 
need that branch (or at least keep it as small as reasonably possible).

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface interface with libdivecomputer

2015-05-21 Thread Jef Driesen

On 2015-05-19 20:57, Salvador Cuñat wrote:
2015-05-19 10:50 GMT+02:00 Willem Ferguson 
willemfergu...@zoology.up.ac.za

Dirk you are absolutely correct. I ran universal after your last mail,
above, and the events are not shown in the xml, even though I see them
clearly in the binary dump. So the problem is on the libdivecomputer 
side.
At least I have eliminated Subsurface as the cause of the problem. I 
should

have run universal earlier.


Back in march Jef introduced some changes in uwatec_smart_parser.c,
specifically, he turned off gasmix support for galileo devices with 
trimix
firmware, so, if your DCs are trimix you won't have gasmix events 
althoug

recorded by the galileo.


That may indeed be the problem. The good news is that I already do know 
where the gas mixes are stored for the trimix. They are no longer in the 
header, but in one of the unknown sample types. This is still work in 
progress.


There is another posibility, as far as had understood libdc code.  I 
think
you have to set more than one mix in the galileo, (even although they 
were

the same mix) for libdc to detect them.  So, if you were doing, e.g., a
sidemount dive with the same mix in both tanks and you have set only 
one

mix you won't have gaschange events too.


That's another thing. Internally Uwatec stores the id of the gasmix, but 
currently the libdivecomputer api delivers only the o2/he percentages, 
so you can distinguish between two identical mixes.


This mistake will be fixed in the near future. The implementation is 
already done, but I haven't applied it yet, because it breaks backwards 
compatibility.


An intermediate solution might be to introduce the new DC_SAMPLE_GASMIX 
api right now, but maintain the old gaschange events in parallel. The 
old gaschange events will become deprecated, but applications using them 
will continue to work as before. And once v0.5 is out, we can finally 
remove the old events.


Jef
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface interface with libdivecomputer

2015-05-19 Thread Willem Ferguson

On 18/05/2015 15:31, Dirk Hohndel wrote:

On Mon, May 18, 2015 at 01:35:01PM +0200, Willem Ferguson wrote:

The gas changes from my galileo dive computer are not automatically read
into Subsurface. As far as I can see, gas changes are logged and
interpreted by libdivecomputer. For instance, there is a
parser_sample_event_t type of SAMPLE_EVENT_GASCHANGE in libdivecomputer. In
fact there is a general lack of dive events being transfered from dc to
Subsurface. Would Subsurface notice these events if they were within the
libdivecomputer memory structures or is this something that still needs
implementation on the Subsurface side?

We automatically read and interpret all events that libdivecomputer
decodes - so I'm not sure how what you are reporting would be possible.

Do you have access to that Galileo dive computer? Can you run the
universal tool from libdivecomputer to dump a libdivecomputer dive.xml
file? I'd be very surprised if that included a gas change event that
wasn't present in Subsurface after you imported the same dive directly
from Subsurface

/D

Dirk you are absolutely correct. I ran universal after your last mail, 
above, and the events are not shown in the xml, even though I see them 
clearly in the binary dump. So the problem is on the libdivecomputer 
side. At least I have eliminated Subsurface as the cause of the problem. 
I should have run universal earlier.

Kind regards,
willem

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface interface with libdivecomputer

2015-05-19 Thread Salvador Cuñat
Hi Willem.

2015-05-19 10:50 GMT+02:00 Willem Ferguson willemfergu...@zoology.up.ac.za
:


  Dirk you are absolutely correct. I ran universal after your last mail,
 above, and the events are not shown in the xml, even though I see them
 clearly in the binary dump. So the problem is on the libdivecomputer side.
 At least I have eliminated Subsurface as the cause of the problem. I should
 have run universal earlier.
 Kind regards,
 willem


Back in march Jef introduced some changes in uwatec_smart_parser.c,
specifically, he turned off gasmix support for galileo devices with trimix
firmware, so, if your DCs are trimix you won't have gasmix events althoug
recorded by the galileo.

There is another posibility, as far as had understood libdc code.  I think
you have to set more than one mix in the galileo, (even although they were
the same mix) for libdc to detect them.  So, if you were doing, e.g., a
sidemount dive with the same mix in both tanks and you have set only one
mix you won't have gaschange events too.

All this pending on Jef considerations, off course.

BTW,  Would you be so kind to send me some brief smarttrak log with galileo
dives?  I do not lose hope on a
FarFarFutureToolToTranslateSmarttrakLogsIntoSubsurface.   ;-)

Regards.

Salva.
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Subsurface interface with libdivecomputer

2015-05-18 Thread Dirk Hohndel
On Mon, May 18, 2015 at 01:35:01PM +0200, Willem Ferguson wrote:
 The gas changes from my galileo dive computer are not automatically read
 into Subsurface. As far as I can see, gas changes are logged and
 interpreted by libdivecomputer. For instance, there is a
 parser_sample_event_t type of SAMPLE_EVENT_GASCHANGE in libdivecomputer. In
 fact there is a general lack of dive events being transfered from dc to
 Subsurface. Would Subsurface notice these events if they were within the
 libdivecomputer memory structures or is this something that still needs
 implementation on the Subsurface side?

We automatically read and interpret all events that libdivecomputer
decodes - so I'm not sure how what you are reporting would be possible.

Do you have access to that Galileo dive computer? Can you run the
universal tool from libdivecomputer to dump a libdivecomputer dive.xml
file? I'd be very surprised if that included a gas change event that
wasn't present in Subsurface after you imported the same dive directly
from Subsurface

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface