aboutsummaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Jan Schubert <Jan.Schubert@GMX.li>2013-02-02 19:38:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-03 07:07:12 +1100
commit99dbd667bf2a40f2ea8444780310114e353f4557 (patch)
tree4a9e686e515cf9124b62932df7c26a19f7bfd418 /planner.c
parent59cfa5c427da640ce15fe60c0d271532b26b14e4 (diff)
downloadsubsurface-99dbd667bf2a40f2ea8444780310114e353f4557.tar.gz
Fixing SP handling in planner, adding event
This moves some double/floating handling for po2 to plain integer. There are still non int values around (also for phe and po2) in the plot area. Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/planner.c b/planner.c
index 580426bf7..10a1657c3 100644
--- a/planner.c
+++ b/planner.c
@@ -112,7 +112,7 @@ double tissue_at_end(struct dive *dive, char **cached_datap)
for (j = t0; j < t1; j++) {
int depth = interpolate(lastdepth, sample->depth.mm, j - t0, t1 - t0);
tissue_tolerance = add_segment(depth_to_mbar(depth, dive) / 1000.0,
- &dive->cylinder[gasidx].gasmix, 1, sample->po2 / 1000.0, dive);
+ &dive->cylinder[gasidx].gasmix, 1, sample->po2, dive);
}
psample = sample;
t0 = t1;
@@ -139,7 +139,7 @@ int time_at_last_depth(struct dive *dive, int next_stop, char **cached_data_p)
while (deco_allowed_depth(tissue_tolerance, surface_pressure, dive, 1) > next_stop) {
wait++;
tissue_tolerance = add_segment(depth_to_mbar(depth, dive) / 1000.0,
- &dive->cylinder[gasidx].gasmix, 1, sample->po2 / 1000.0, dive);
+ &dive->cylinder[gasidx].gasmix, 1, sample->po2, dive);
}
return wait;
}