[PATCH 4/3] Document quirks with Ostc 4 versions
Jef Driesen
jef at libdivecomputer.org
Thu Dec 29 04:29:13 PST 2016
On 28-12-16 21:06, Anton Lundin wrote:
> - // for now libdivecomputer gives us the firmware on device undecoded as integer
> + // libdivecomputer gives us the firmware on device as an integer
> // for the OSTC that means highbyte.lowbyte is the version number
> + // For OSTC 4's there is actually a another minor, x.y.Z, but its not
> + // exposed via libdivecomputer, so we won't trigger this update flow
> + // when the Z changes
> int firmwareOnDevice = devData.libdc_firmware;
> QString firmwareOnDeviceString = QString("%1.%2").arg(firmwareOnDevice / 256).arg(firmwareOnDevice % 256);
The OSTC4 version number has four parts (X.Y.Z.Beta) and is (for compatibility
reasons) packed into two bytes, but it's done different from the OSTC3 version
number which has only two parts (X.Y). You can find the details in
libdivecomputer commit ff15b865b2e35d38f0ee394c3a0d0218a763d5af.
Jef
More information about the subsurface
mailing list