[PATCH] Added support for parsing temperature in the dive header

Nick Shore macdive at thedoorisajar.org
Wed Sep 3 22:34:29 PDT 2014


On 04/09/2014, at 17:14, Jef Driesen <jef at libdivecomputer.org> wrote:

> Almost right. The original reason is a bit different. Macdive is a few years older than subsurface, and started around the same time as libdivecomputer itself. At that time the libdivecomputer parser was pretty much non-existing or at least even more basic than it is now (e.g. sample data only). So writing a custom parser was basically the only option. Nowadays the libdivecomputer has much improved (although their is certainly room for improvement!) and while Nick and I discussed switching to the libdivecomputer parsers more than once, that just didn't happen yet. It works, and there have been always some more urgent things on the todo list :-)

Jef is right there, it's primarily that there are other more urgent things to do. There aren't too many special cases left these days. Off the top of my head, one is the surface interval - but this is an interesting one. In the cases it's in the data, I read it. But in the cases it's not, I generate it afterwards. Which is fine since I know the previous dives. libdc might have a hard time generating it if you're only downloading the latest couple of dives and had no further context to tell if a dive was part of a series.

Another one was the name of the diver that is available on some devices. I believe Jef and I have argued over that one in the past :)

While we're talking about accessing values, dare I ask for the serial number to be a char* again..

> We're mostly in sync, but sometimes we have minor differences (or different bugs if you prefer :-)) here or there.
> 
>> - MacDive, just like Subsurface, would prefer to get such data from
>>   libdivecomputer, as long as it is easy to tell if the data is available
>>   or not - so no made up, interpolated or otherwise fabricated data.
>>   Either an indication "the data aren't available", or actual data from
>>   the dive computer.
> 
> It's hard to disagree with that!

Yep.

-nick



More information about the devel mailing list