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

Linus Torvalds torvalds at linux-foundation.org
Mon Nov 24 10:56:37 PST 2014


On Mon, Nov 24, 2014 at 10:37 AM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> Anyway, the Subsurface-testing branch now adds DC_FIELD_STRING support for
> a hand full of dive computers, including Petrel, Cobalt, Suunto EON Steel
> and Vyper2 family, Oceanic Atom 2 family and OSTC family.

So I haven't tested, but looking at it, I think the Suunto Vyper2
version is broken.

Why? libdivecomputer has already messed with the serial number. We
undo that in subsurface (because libdivecomputer didn't *use* to mess
with it, and starting to mess with the serial number changed it,
duh!), but it looks lik eyou take the internal messed-with serial
number.

I suspect you should just use "%08u" for printing it out. See
suunto_{eon,solution,vyper,common2}_device_foreach():

        for (unsigned int i = 0; i < 4; ++i) {
                devinfo.serial *= 100;
                devinfo.serial += header[hoffset + 2 + i];
        }

where Jef has turned the four bytes into a decimal number (see also
commit dbb6b1aa2116: "Fix the decoding of the Suunto serial numbers.")
which is where this all changed last year.

Also, you should probably do it for all Suunto's except for the new
EON Steel. It's true not just for the vyper2.

                     Linus


More information about the subsurface mailing list