mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Integrate loading of uemis SDA files into the regular xml parsing
There are a few interesting issues with this: - this requires a change to the SDA file format; thankfully I control that format, too (the default files are not valid XML files) - once again, the fact that adding samples can change the dive pointer messes with me - I decided to change the interface of ALL of the XXX_dive_match functions to take a struct dive** I know this is not ideal as all the other functions don't need that - but I would have hated the inconsistency - there is the issue that we now overload two _different_ uemis formats in the same function - that's certainly a potential point of confusion - a minor detail is the problem that the SDA format is kinda odd to parse and that we trigger on the duration field by it being the only float. Yeah, that's not ideal - but again, I control the format, so I _know_ this is true. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f2566ba561
commit
254b851e44
3 changed files with 42 additions and 13 deletions
3
uemis.c
3
uemis.c
|
@ -180,11 +180,12 @@ bail:
|
|||
/*
|
||||
* parse uemis base64 data blob into struct dive
|
||||
*/
|
||||
void uemis_parse_divelog_binary(char *base64, struct dive **divep) {
|
||||
void uemis_parse_divelog_binary(char *base64, void *datap) {
|
||||
int datalen;
|
||||
int i;
|
||||
uint8_t *data;
|
||||
struct sample *sample;
|
||||
struct dive **divep = datap;
|
||||
struct dive *dive = *divep;
|
||||
int template, gasoffset;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue