Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
garmin_parser: add support for developer fields
This was the _actual_ reason why the Suunto FIT file import fell flat on its face: it adds records with developer fields in them, and I just had no idea how to parse them. It turns out that they aren't all *that* horrible to parse: they are kind of like a special case of the regular FIT event fields. And no, this does not really parse them: it only parses the layout, and using that it can then skip the developer fields without causing the decoder to go all wonky and lose stream synchronization. At least it works for the specific case of the Suunto FIT files, and the code makes some amount of sense. The FIT format may be odd, but at the same time it's most definitely designed for pretty simplistic devices, so it's not some kind of crazy XML thing. This gets us parsing those Suunto FIT files at least partially. That said, it is all very rough indeed, since you have to lie and claim you're downloading from a Garmin, and have to set up the whole magic 'Garmin/Activity/' directory structure and limit the file size to the 24 characters that Garmin uses. So this is by no means the real solution. Considering that Jef doesn't want the Garmin parser in libdivecomputer anyway, the proper solution might be to move this all to subsurface, and make it be a "FIT file import" thing instead. Annoying, but on the other hand it has also been a bit awkward to have it in libdivecomputer. Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information