testing of download from divecomputer needed

Dirk Hohndel dirk at hohndel.org
Tue Jan 13 00:11:34 PST 2015


On Tue, Jan 13, 2015 at 09:00:50AM +0100, Henrik Brautaset Aronsen wrote:
> On Sat, Jan 10, 2015 at 12:22 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
> 
> > Either way, this REALLY needs some testing. And please report back both
> > success and failure. Tell us what you tried, what worked and what didn't.
> > I want to make sure I got the work flow right, that the options make sense
> > and are reasonably intuitive for a diver.
> 
> Just downloaded 200+ dives from my Petrel.  It took a looong time, but
> worked fine.   The selection list of downloaded dives is awesome!

Excellent. I'm glad you like it.
I guess a 200+ dive download is rather unusual - typically only the first
time one would use Subsurface. Normally it would be 6 dives a day. Or
maybe 30 dives after a liveaboard. Of course on a Uemis Zurich even 30
dives after a liveaboard are enough to want to kill someone... :-/

> The only thing I reacted to was that the progress bar only worked during
> the first couple of minutes.  After that it was at 0%.

That's strange. Looking at the shearwater_common_download() function in
libdivecomputer's shearwater_common.c, it seems that we should get regular
progress events throughout the download.

Could you put some debug printfs in the event_cb() function in
Subsurface's libdivecomputer.c ? Something like the patch below

I'd be curious what values you get from that...

/D

diff --git a/libdivecomputer.c b/libdivecomputer.c
index a78f53c27e8a..2763b3ac694e 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -713,6 +713,7 @@ static void event_cb(dc_device_t *device, dc_event_type_t event, const void *dat
 		dev_info(devdata, translate("gettextFromC", "Event: waiting for user action"));
 		break;
 	case DC_EVENT_PROGRESS:
+		fprintf(stderr, "progress %d of %d\n", progress->current, progress->maximum);
 		if (!progress->maximum)
 			break;
 		progress_bar_fraction = (double)progress->current / (double)progress->maximum;


More information about the subsurface mailing list