mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't assume that pressures are always positive
When planning a dive, the dive could use more gas than is in the cylinder. So getting a negative end pressure is a useful indication to the user that there plan might not be a good one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
45725d1c30
commit
56395b3894
5 changed files with 7 additions and 7 deletions
4
dive.c
4
dive.c
|
@ -76,7 +76,7 @@ void remove_event(struct event* event)
|
|||
}
|
||||
}
|
||||
|
||||
int get_pressure_units(unsigned int mb, const char **units)
|
||||
int get_pressure_units(int mb, const char **units)
|
||||
{
|
||||
int pressure;
|
||||
const char *unit;
|
||||
|
@ -454,7 +454,7 @@ void per_cylinder_mean_depth(struct dive *dive, struct divecomputer *dc, int *me
|
|||
|
||||
static void fixup_pressure(struct dive *dive, struct sample *sample)
|
||||
{
|
||||
unsigned int pressure, index;
|
||||
int pressure, index;
|
||||
cylinder_t *cyl;
|
||||
|
||||
pressure = sample->cylinderpressure.mbar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue