aboutsummaryrefslogtreecommitdiffstats
path: root/core/import-suunto.c
AgeCommit message (Collapse)Author
2019-04-12Parser: parse into custom dive site tableGravatar Berthold Stoeger
To extend the undo system to dive sites, the importers and downloaders must not parse directly into the global dive site table. Instead, pass a dive_site_table argument to parse into. For now, always pass the global dive_site_table so that this commit should not cause any functional change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09Parser: add trip_table parameter to parsing functionsGravatar Berthold Stoeger
To allow parsing into arbitrary trip_tables, add the corresponding parameter to the parsing functions and the parser state. Currently, all callers pass the global trip_table so there should be no change in functionality. These arguments will be replaced in subsequent commits. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-23Parser: make parser (mostly) reentrantGravatar Berthold Stoeger
Introduce a parser_state structure, which describes (most) of the global parser state. Create such a structure in the entry routines to the parser and pass it down to the individual functions. The parser state is initialized and freed with the init_parser_state() and free_parser_state() functions. The main benefits are: 1) Isolation of parser state. 2) Keeping the global name space tidy. 3) Prevent memory leaks which could happen in truncated files by freeing all the parser state after parse. A somewhat controversial point might be that the individual parsing functions are split in those that need parser-state and those that don't. This means that there are now two versions of the MATCH macro, viz. one for the former and one for the latter. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-06-15DM5 import: support for larger sample sizeGravatar Miika Turkia
Suunto has updated SampleBlob to use 30 byte blobs. This adds support for the increased size. Note that this only parses the same fields we have parsed before. (Currently I have no idea what the increased size is used for.) Note also that I do not currently have data with the new format so I only tested this still works with old data. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-05-24core: replace (void) with UNUSED(x) and include ssrf.hGravatar jan Iversen
Unused parameters in C are "silenced" by adding UNUSED(x) Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-14Core: introduce new subsurface-string headerGravatar Dirk Hohndel
First small step to shrinking dive.h. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-07Temperature 0x7F appears to mean no readingGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07Handle int and float temperaturesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07Explicitly mark DM4 conversionGravatar Miika Turkia
Same as default branch, but as 0x01 appears to be converted from DM4 to DM5, let's just be explicit about it. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07Start to describe DM5 sampleBlobGravatar Miika Turkia
Currently the best guess of sampleBlob format. Unfortunately there seems to be some version of DM that stores the temperature in different location that I have not been able to figure out yet. Note that some version of DM does not utilize sampleBlob but specific blobs for each value (temperature, pressure, ...). Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-12-17Cleanup: durations are now signedGravatar Dirk Hohndel
Somehow a whitespace fix snuck in here. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-29Move Suunto DB import into its own fileGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>