mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Track Uemis last dive downloaded on a per data-file basis
Actually, it's even better than that. Thanks to the new divecomputer datastructure we can now simply look up in the dive_table which dives have been downloaded from this specific Uemis SDA. This patch removes the old gconf based code - which leads to one unfortunate problem: the first time a Uemis SDA owner runs this version of Subsurface against their data file ALL dives will be downloaded again (which may not be a bad thing as we have improved a few other details of Uemis support so now they get their deco information, surface pressure and other data that we have started to support since 2.1). Still, this is not ideal. But I didn't want to keep the legacy code around since this new solution is so much cleaner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
10fac7a6af
commit
a79b74ed36
4 changed files with 19 additions and 96 deletions
12
uemis.c
12
uemis.c
|
@ -199,16 +199,10 @@ void uemis_parse_divelog_binary(char *base64, void *datap) {
|
|||
else
|
||||
dive->salinity = 10000; /* grams per 10l fresh water */
|
||||
|
||||
/* this will allow us to find the last dive read so far from this computer */
|
||||
dc->model = strdup("Uemis Zurich");
|
||||
|
||||
/*
|
||||
* FIXME:
|
||||
* - make the deive ID the first word of the SHA1 sum of the deviceid string
|
||||
* - do we want to have a dive ID? Without one, we'll just use the dive date,
|
||||
* which is likely fine.
|
||||
*/
|
||||
dc->deviceid = 0;
|
||||
dc->diveid = 0;
|
||||
dc->deviceid = *(uint32_t *)(data + 9);
|
||||
dc->diveid = *(uint16_t *)(data + 7);
|
||||
|
||||
/* dive template in use:
|
||||
0 = air
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue