Support for Gamrin Descent MK1
Linus Torvalds
torvalds at linux-foundation.org
Tue Aug 28 12:52:14 PDT 2018
On Tue, Aug 28, 2018 at 12:17 PM Wojciech Więckowski <xplwowi at gmail.com> wrote:
>
> If someone’s interested, please look at this repo:
>
> https://github.com/xplwowi/fit2subs
>
> You will find there also postulated source FIT files with GPS and diving activities inside.
Thanks, I'm definitely interested, because I'm getting to the point
where my FIT parser skeleton code is ready to actually maybe become
more than a skeleton.
And you shamed me into actually pushing my (INCOMPLETE!) work out too.
It's the 'garmin-descent' branch of
https://github.com/torvalds/libdc-for-dirk.git
and the way it currently works is that you build this version of
libdivecomputer together with the current git version of subsurface,
and you can download directly from your Garmin Descent.
And by "download directly" I mean "not really download at all, but
test". Because right now it doesn't actually fill any dive information
with the data, it just prints it out for my debugging purposes.
So I just capture 'stderr', and see things like this:
FILE_serial: ecee9feb
FILE_creation_time: 35de2636
FILE/7: ffffffff
FILE_manufacturer: 1
FILE_product: a2c
FILE/5: ffff
FILE_file_type: 4
FILE_CREATOR/0: 0104
FILE_CREATOR/1: ff
EVENT/253: 35de2636
EVENT/3: 00000000
EVENT/15: ffffffff
EVENT/0: 00
EVENT/1: 00
EVENT/4: 00
DEVICE_INFO/253: 35de2636
DEVICE_INFO/3: ecee9feb
DEVICE_INFO/7: ffffffff
DEVICE_INFO/8: ffffffff
...
where things like "FILE_serial" means that it actually has figured out
that it's the serial number field (although I have no idea what the
rule is for turning the value into a real Garmin serial number), but
something like "DEVICE_INFO/3" just means that I haven't even filled
in the data for field 3 for the DEVICE_INFO msg.
The parser is probably broken, and currently it doesn't even try to
handle the compressed record format because I've not actually seen one
yet.
And as mentioned, it doesn't actually fill any dive data at all, so
just do a "download" and then "cancel" after you see the dive list.
Don't actually accept it, you'll just get empty data. It's the debug
printout that is the interesting part right now.
I'll take a look at your fit files and your record numbers at some
point, but I need to take a break from looking at FIT files for now.
Linus
More information about the subsurface
mailing list