diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-02-12 14:11:21 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-12 17:41:46 -0800 |
commit | 7ae05b4f710fc0d03a2198397e7dd779f477fd79 (patch) | |
tree | c1e1d5e447d09d2cf56e891aa7c90ce66de29f2d | |
parent | 730e0295c91494e7b3a596221334f014d4cf4c98 (diff) | |
download | subsurface-7ae05b4f710fc0d03a2198397e7dd779f477fd79.tar.gz |
Fix default value for missing surface pressure from divecomputer
We should *not* default to the incorrect "1 bar". Instead, we should
leave the resuling pressure at 0 mbar, which leaves visual entries empty
and uses the default surface pressure for calculations.
Reported-by: Pedro Neves <nevesdiver@gmail.com>
Cc: Patrick Valsecchi <patrick@thus.ch>
Cc: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | libdivecomputer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c index b3cc1d5f7..f93b2c0fc 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -476,7 +476,7 @@ static int dive_cb(const unsigned char *data, unsigned int size, } dive->dc.salinity = salinity.density * 10.0 + 0.5; - double surface_pressure = 1.0; + double surface_pressure = 0; rc = dc_parser_get_field(parser, DC_FIELD_ATMOSPHERIC, 0, &surface_pressure); if (rc != DC_STATUS_SUCCESS && rc != DC_STATUS_UNSUPPORTED) { dev_info(devdata, translate("gettextFromC","Error obtaining surface pressure")); |