mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:43:25 +00:00
Accept negative pressure readings
Sometimes the planner can produce negative pressures (i.e. when the cylinders are not properly configured) or when the usser ignored gas management (for whatever reason). When such a dive gets saved and reread we should not display a further "Strange pressure reading" warning on the command line. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
24472a3b23
commit
9bf6100aa7
1 changed files with 2 additions and 2 deletions
|
@ -298,14 +298,14 @@ static void pressure(char *buffer, pressure_t *pressure)
|
|||
case BAR:
|
||||
/* Assume mbar, but if it's really small, it's bar */
|
||||
mbar = val.fp;
|
||||
if (mbar < 5000)
|
||||
if (fabs(mbar) < 5000)
|
||||
mbar = mbar * 1000;
|
||||
break;
|
||||
case PSI:
|
||||
mbar = psi_to_mbar(val.fp);
|
||||
break;
|
||||
}
|
||||
if (mbar > 5 && mbar < 500000) {
|
||||
if (fabs(mbar) > 5 && fabs(mbar) < 5000000) {
|
||||
pressure->mbar = rint(mbar);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue