mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
730e0295c9
commit
7ae05b4f71
1 changed files with 1 additions and 1 deletions
|
@ -476,7 +476,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
|
||||||
}
|
}
|
||||||
dive->dc.salinity = salinity.density * 10.0 + 0.5;
|
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);
|
rc = dc_parser_get_field(parser, DC_FIELD_ATMOSPHERIC, 0, &surface_pressure);
|
||||||
if (rc != DC_STATUS_SUCCESS && rc != DC_STATUS_UNSUPPORTED) {
|
if (rc != DC_STATUS_SUCCESS && rc != DC_STATUS_UNSUPPORTED) {
|
||||||
dev_info(devdata, translate("gettextFromC","Error obtaining surface pressure"));
|
dev_info(devdata, translate("gettextFromC","Error obtaining surface pressure"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue