summaryrefslogtreecommitdiffstats
path: root/uemis.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-02-09 11:15:18 +1100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-08 18:22:30 -0800
commit926fcef2a1e83b58c37c948a3f1a904aa0be0d0e (patch)
tree7f759284b78c77beecb2a11bae25649122f2690a /uemis.c
parentb286ea638c8ce468cf9c1a1b5037867acb5d6fe4 (diff)
downloadsubsurface-926fcef2a1e83b58c37c948a3f1a904aa0be0d0e.tar.gz
Do more dive fixup for each dive computer
In commit b6c9301e5847 ("Move more dive computer filled data to the divecomputer structure") we moved the fields that get filled in by the dive computers to be per-divecomputer data structures. This patch re-creates some of those fields back in the "struct dive", but now the fields are initialized to be a reasonable average from the dive computer data. We already did some of this for the temperature min/max fields for the statistics, so this just continues that trend. The goal is to make it easy to look at "dive values" without having to iterate over dive computers every time you do. Just do it once in "fixup_dive()" instead. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis.c')
-rw-r--r--uemis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uemis.c b/uemis.c
index 026c836df..aad76c10f 100644
--- a/uemis.c
+++ b/uemis.c
@@ -300,9 +300,9 @@ void uemis_parse_divelog_binary(char *base64, void *datap) {
dive->dc.airtemp.mkelvin = *(uint16_t *)(data + 45) * 100 + ZERO_C_IN_MKELVIN;
dive->dc.surface_pressure.mbar = *(uint16_t *)(data + 43);
if (*(uint8_t *)(data + 19))
- dive->dc.salinity = 10300; /* avg grams per 10l sea water */
+ dive->dc.salinity = SEAWATER_SALINITY; /* avg grams per 10l sea water */
else
- dive->dc.salinity = 10000; /* grams per 10l fresh water */
+ dive->dc.salinity = FRESHWATER_SALINITY; /* 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");