diff options
author | Robert C. Helling <helling@atdotde.de> | 2016-12-15 23:22:54 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-12-26 12:47:57 -0800 |
commit | c1ef59c540c69b136808e98a334302464e5ba162 (patch) | |
tree | c49e98d9e59ea27f04023fbe1fa09413e72fb459 /core/divelist.c | |
parent | fb2ba72e429cd6c39b32eb87ee6c570149243ed5 (diff) | |
download | subsurface-c1ef59c540c69b136808e98a334302464e5ba162.tar.gz |
Indicate a repetitive dive in the diveplan
Fixes #1095
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/divelist.c b/core/divelist.c index fa100c236..f4762ddef 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -360,7 +360,8 @@ int get_divesite_idx(struct dive_site *ds) static struct gasmix air = { .o2.permille = O2_IN_AIR, .he.permille = 0 }; /* take into account previous dives until there is a 48h gap between dives */ -double init_decompression(struct dive *dive) +/* return true if this is a repetitive dive */ +bool init_decompression(struct dive *dive) { int i, divenr = -1; unsigned int surface_time; @@ -369,7 +370,7 @@ double init_decompression(struct dive *dive) double surface_pressure; if (!dive) - return 0.0; + return false; surface_pressure = get_surface_pressure_in_mbar(dive, true) / 1000.0; divenr = get_divenr(dive); @@ -445,7 +446,9 @@ double init_decompression(struct dive *dive) dump_tissues(); #endif } - return tissue_tolerance_calc(dive, surface_pressure); + // I do not dare to remove this call. We don't need the result but it might have side effects. Bummer. + tissue_tolerance_calc(dive, surface_pressure); + return deco_init; } void update_cylinder_related_info(struct dive *dive) |