[PATCH 0/2] Clean up some of the dive computer nickname code
Dirk Hohndel
dirk at hohndel.org
Thu Jan 10 00:23:57 UTC 2013
Linus Torvalds <torvalds at linux-foundation.org> writes:
> On Wed, Jan 9, 2013 at 3:10 PM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>>
>> IOW, the serial numbers libdivecomputer gives us are useless. You
>> could perhaps turn them into an actual serial number string on a
>> per-vendor (or per-device) basis, if you know the vendor rules. The
>> Suunto vendor rules *seem* to be pretty simple, based on the two
>> devices I have (the Vyper Air clearly uses the same encoding, giving
>> another 8-byte string). Other dive computers? Who knows?
>
> Here's a patch for subsurface that hacks in the Suunto rules, and can
> thus save serial number and firmware version information for Suunto
> dive computers.
>
> It should be done by libdivecomputer, but hey, in the meantime this at
> least shows the concept. And helps test the XML save/restore code.
>
> It depends on the two patches that create the whole "device.c"
> infrastructure, of course. With this, my dive file ends up having the
> settings section look like this:
>
> <divecomputerid model='Suunto Vyper Air' deviceid='d4629110'
> serial='01201094' firmware='1.1.22'/>
> <divecomputerid model='Suunto HelO2' deviceid='995dd566'
> serial='23500027' firmware='1.0.4'/>
>
> where the format of the firmware version is something I guessed at,
> but it was the obvious choice (again, it's byte-based, I'm ignoring
> the high byte that is zero for both of my Suuntos).
I like this. Yes, we will have to tackle them one by one as we learn how
to do this (or until libdivecomputer does it for us), but still, I like
being able to save this information.
Is there a reason this didn't have a commit message / SOB ?
/D
More information about the Devel
mailing list