[Reefnet Sensus Ultra] help for a beginner

Anton Lundin glance at acc.umu.se
Mon Jun 22 14:44:41 PDT 2015


On 22 June, 2015 - Stan wrote:

> 
> Le 22/06/2015 20:18, Stan a écrit :
> >Le 22/06/2015 19:54, Stan a écrit :
> >>
> >>Le 17/06/2015 21:57, Anton Lundin a écrit :
> >>>On 17 June, 2015 - stan.speleo at notgmail.fr wrote:
> >>>
> >>>>Le 17.06.2015 13:42, Anton Lundin a écrit :
> >>>>>On 17 June, 2015 - stan.speleo at notgmail.fr wrote:
> >>>>>
> >>>>>>Hi,
> >>>>>>
> >>>>>>I am trying to use the libdivecomputer lib in order to GET and
> >>>>>>SET the
> >>>>>>INTERNALS (INTERVAL, THRESHOLD, ENDCOUNT, AVERAGING) of the Reefnet
> >>>>>>Sensus
> >>>>>>Ultra logger.
> >>>>>>On Linux.
> >>>>>>I have not found any software on linux which can manage this task.
> >>>>>>
> >>>>>>I have as well another less important question : how to get a
> >>>>>>csv data
> >>>>>>for
> >>>>>>the dives ? This would be great because the only software I
> >>>>>>could find,
> >>>>>>"Subsurface", gives the data in an xml format, which I have to
> >>>>>>parse in
> >>>>>>order to proceed it by myself.
> >>>>>>
> >>>>>Subsurface can export your profile into csv too. I'm currently not
> >>>>>at a
> >>>>>sane computer so i can't tell you exactly how, but the
> >>>>>functionality is
> >>>>>there.
> >>>>>
> >>>>>Othervise you could write your own tool which uses libdivecomputer
> >>>>>for
> >>>>>the download and emits the information in whatever format you like.
> >>>>>
> >>>>>
> >>>>>//Anton
> >>>>Thanks a lot !
> >>>>
> >>>>You answered to me instead of the mailing-list, is it by choice ? Or
> >>>>should
> >>>>I forward to the dev list ?
> >>>>
> >>>To: stan.speleo at notgmail.fr
> >>>Subject: Re: [Reefnet Sensus Ultra] help for a beginner
> >>>Cc: devel at libdivecomputer.org
> >>>
> >>>And it ended up in the archives to:
> >>>http://libdivecomputer.org/pipermail/devel/2015-June/000729.html
> >>>
> >>>So, it went to the list as well.
> >>>
> >>>>That answers half of my problem, and that's already great :-)
> >>>>The other part, which is (I think) not supported by Subsurface, is
> >>>>to SET
> >>>>and GET the INTERNALS. I would be very happy to get some hints in
> >>>>order to
> >>>>do it by myself with libdivecomputer.
> >>>>
> >>>I have no clue how that protocoll works, but I've added support for
> >>>configuring a bunch of other computers from subsurface, and i might
> >>>take
> >>>a look at the Reefnet stuff.
> >>>
> >>>
> >>>Othervise you might be able to add it yourself. Relevant bits in
> >>>subsurface source can be found in:
> >>>configuredivecomputer.cpp
> >>>configuredivecomputerthreads.cpp
> >>>qt-ui/configuredivecomputerdialog.cpp
> >>>qt-ui/configuredivecomputerdialog.ui
> >>>
> >>>
> >>>//Anton
> >>Thanks Anton for your help.
> >>
> >>I have "git-cloned" the libdivecomputer project, then configure, make,
> >>make install.
> >>
> >>I tried a minimum working program which opens the Reefnet Sensus Ultra,
> >>but it seems I have some problem linking my programme with the
> >>libdivecomputer "*.o" files.
> >>
> >>Do you have any advice to help me writing a makefile in order to link
> >>those files together ?
> >>
> >>Stanislas
> >Update : it compiles ! \o/
> >Well. Now, I am trying to make it read/write... to be continued...
> >
> >Stanislas
> >
> I am now trying to figure out what parameters should I give to the fuction
> "dc_status_t reefnet_sensusultra_extract_dives (dc_device_t *device, const
> unsigned char data[], unsigned int size, dc_dive_callback_t callback, void
> *userdata);" ??
> 
> "device" is obvious. I guess that data[] is the returned dives. But what
> about "size", "callback" and "userdata" ??
> 

The data block is the raw data from the device, and callback is the
callback thats gets called for each dive, with the optional userdata as
argument.

I'd suggest you use the higher level api, dc_device_open,
dc_device_foreach, dc_device_close to download the dives from the
logger.

//Anton


-- 
Anton Lundin	+46702-161604


More information about the devel mailing list