Petrel progress bar problem [was: Re: testing of download from divecomputer needed]

Henrik Brautaset Aronsen subsurface at henrik.synth.no
Mon Feb 2 10:37:34 PST 2015


On 27 Jan 2015, at 23:18, Jef Driesen <jef at libdivecomputer.org> wrote:
> 
> On 14-01-15 19:43, Henrik Brautaset Aronsen wrote:
>> Jef Driesen wrote:
>>> This is a (known) bug in libdivecomputer. Instead of a global progress
>>> for the entire download, the petrel backend reports progress for each
>>> individual dive. So the progress bar will go from 0 to 100% for every
>>> dive. Due to the fact that the size of a dive isn't known in advance,
>>> we have to assume the worst case value (0xFFFFFF). But in practice a
>>> dive is usually much smaller, and thus the progress bar will stay near
>>> zero.
>> 
>> An individual 0-100% progress for each dive is OK.  The problem was that
>> the progress disappeared after a few dives had been imported.  With
>> Dirk's debug line it becomes obvious why:
>> 
>> [...]
> 
> I have been looking into the estimation of the dive length based on the dive time in the manifest. The results I get are off by 160 to 320 bytes (or 5-10 samples). I wonder if this is the same on other units or not. Can you give the attached patch a try, and send back the logfile from the universal app? (Make sure to run with the -vv option because I'm interested in the debug lines.)

Hi Jef,

Sorry for the slow reply.  I ran universal with «./examples/universal -l petrel.log -d petrel.xml -vv -n "Shearwater Petrel" /dev/tty.Petrel-SerialPort»

Get the results from:

https://www.dropbox.com/s/1b8pihvn7vrt0c3/petrel.xml?dl=0
https://www.dropbox.com/s/i10d9okw3bgz5mn/petrel.log?dl=0

I ctrl-c'ed after about 110 dives, hope that's ok.

Henrik



More information about the subsurface mailing list