heads up, Subsurface-testing branch of libdivecomputer force-updated

Dirk Hohndel dirk at hohndel.org
Mon Nov 24 12:28:41 PST 2014


On Mon, Nov 24, 2014 at 11:19:25AM -0800, Linus Torvalds wrote:
> On Mon, Nov 24, 2014 at 11:12 AM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
> >
> > This patch fixes the Vyper2 case. It's signed-off, but you might just
> > want to squash it into your original suunto commit, I don't need the
> > credit..
> >
> > This does *not* touch the other suunto front-ends that don't have the
> > serial number string code, but afaik they should all basically use the
> > same "%08u" format.
> 
> Oh, and this patch does *not* fix the fact that current subsurface
> screws up the firmware version with its guess..
> 
>   -divecomputerid "Suunto Vyper Air" deviceid=d4629110
> serial="01201094" firmware="1.1.22"
>   +divecomputerid "Suunto Vyper Air" deviceid=d4629110
> serial="01201094" firmware="658.14"
> 
> so please do remove the incorrect testing code. Feel free to print it
> *out*, but don't do that
> 
> +       /* for now copy the "made up" strings converted from the 32bit
> numbers that libdivecomputer gives us;
> +        * if the dive computer backend supports the DC_FIELD_STRING
> interface this will later be overwritten by the correct strings */
> +       dive->dc.serial = copy_string(devdata->serial);
> +       dive->dc.fw_version = copy_string(devdata->firmware);

BTW: the only computers for which this should have happened are the Suunto
one where we actually have code to decode the magic numbers in Subsurface
instead of in libdivecomputer.

And on the flip side, I'm not returning the correct firmware as string
from libdivecomputer for the other Suuntos because we only have a string
type (DC_FIELD_STRING) in dive specific data, but not in the dive computer
header data. And I don't want to return the firmware version in the dive
data unless I am sure that this is actually the firware that was installed
when the dive was recorded. Suunto doesn't give us this information, only
the firware that is installed as we are downloading the dive(s). So in
order to actually get correct firmware data from Suunto dive computers we
first need to extend the devinfo event to include strings as well...

/D


More information about the subsurface mailing list