summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Jan Schubert <Jan.Schubert@GMX.li>2013-01-23 20:12:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-28 18:31:30 -0800
commit9df9fc088daedc71b56acc176cf3b8ee3de870fa (patch)
treeef33ca5645db6b79aa962eb23d408f496a80dd4a /divelist.c
parent37282176d5b3348beacda3622ca4726c4d1f41d7 (diff)
downloadsubsurface-9df9fc088daedc71b56acc176cf3b8ee3de870fa.tar.gz
Dive planning for closed circuit rebreather
This misses a single issue to be used as a base for further discussion: The CC setpoint is used for the next segment, not the one specified for. I also have in mind to modify the existing code to use setpoints specified in mbar and plain integer instead of float values. Signed-off-by: Jan Schubert <Jan.Schubert@GMX.li> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c
index f6ddb0cd3..d6c68eaaf 100644
--- a/divelist.c
+++ b/divelist.c
@@ -763,7 +763,7 @@ static int calculate_otu(struct dive *dive, struct divecomputer *dc)
struct sample *psample = sample - 1;
t = sample->time.seconds - psample->time.seconds;
if (sample->po2) {
- po2 = sample->po2;
+ po2 = sample->po2 / 1000;
} else {
int o2 = active_o2(dive, dc, sample->time);
po2 = o2 / 1000.0 * depth_to_mbar(sample->depth.mm, dive) / 1000.0;