Limited support for Suunto DM4

Amit Chaudhuri amit.k.chaudhuri at gmail.com
Tue Mar 5 11:13:27 PST 2013


Ah.  I didn't spot the callback mechanism.  That explains why you implied
it worked and I was thinking "how?" In the few seconds I spent on it I was
looking for the sqlite3_step() calls to work your way through the result
set.

I might start by looking at my DM4 outputs and seeing if there are alarms
etc. that are not currently handled.

A

On Tue, Mar 5, 2013 at 5:27 PM, Miika Turkia <miika.turkia at gmail.com> wrote:

> On Tue, Mar 5, 2013 at 7:02 PM, Amit Chaudhuri
> <amit.k.chaudhuri at gmail.com> wrote:
> > Hi Miika,
> >
> > I've just noticed your interesting work on DM4. Thanks for the
> user-manual
> > additions; they allowed me to locate the file on my Mac and to query the
> > database schema.
> >
> > I've not had a proper play but it looks to me like the code to query the
> > database is skeleton only at this stage.  I don't see any calls to step
> > through the results of the selections.  Have I got the wrong end of the
> > stick here?
>
> The sqlite3_exec registeres a callback (function: dm4_events) that is
> called for every row returned by the sql query. So the results are
> processed already. For the events there is another callback that
> processes them.
>
> As far as I have tested the import, it works for all the basic stuff.
> So it is quite usable already.
>
> > Any idea why they are using BLOBs like TemperatureBLOB?
>
> No idea whatsoever.
>
> > I can see some todo:s ... is this something you would like any help with
> or
> > are you set fair? I'm working with sqlite myself a bit these days.
>
> There are two todo items. One is calculating SHA1 for the deviceid.
> That would require refactoring the code to call the already existing
> sha1 function with proper parameters.
>
> The other one is for multiple cylinder support. This would require
> sample DB that has dives with multiple cylinders in it. I do not have
> currently such sample so I cannot work on it.
>
> One more thing that should be done is to get more event/alarm IDs
> supported. I was actually thinking about generating event IDs to the
> Mark table and opening the "fixed" DB with DM4 to see what they are
> called. And just add them to the switch clause.
>
> Feel free to do any of these. I am currently fixing a bug in our XSLT
> import. Seems that Windows does not handle floating numbers properly
> (truncates the decimal part)...
>
> miika
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130305/4aa7559e/attachment-0001.html>


More information about the subsurface mailing list