aboutsummaryrefslogtreecommitdiffstats
path: root/core/import-seac.c
AgeCommit message (Collapse)Author
2020-10-25cleanup: split out divecomputer functions from dive.cGravatar Berthold Stoeger
Since dive.c is so huge, split out divecomputer-related functions into divecomputer.[c|h], sample.[c|h] and extradata.[c|h]. This does not give huge compile time improvements, since struct dive contains a struct divecomputer and therefore dive.h has to include divecomputer.h. However, it make things distinctly more clear. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-10-24parser: add device_table to parser stateGravatar Berthold Stoeger
If we want to avoid the parsers to directly modify global data, we have to provide a device_table to parse into. This adds such a state and the corresponding function parameters. However, for now this is unused. Adding new parameters is very painful and this commit shows that we urgently need a "struct divelog" collecting all those tables! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-09-04Implement Seac SeacSync databaser parser.Gravatar James Wobser
Dives for the seac action computer are imported by the seacsync program into two tables in an sqlite3 database. The dive information is read from the headers_dive table. The dive_data table is then queried for each dive to get samples. The seac action computer is the only current supported computer by the seacsync program. It only supports two gas mixes, so the parser will toggle between two cylinders whenever it detects a change in the active O2 mix. Dive start time is stored in UTC with a timezone offset. A helper function to read this was added to qthelper. Default cases have been added to some switch statements to assist in future development for other dive types and salinity. Example database has been added to ./dives/TestDiveSeacSync.db Signed-off-by: James Wobser <james.wobser@gmail.com>