diff options
author | Robert C. Helling <helling@atdotde.de> | 2018-10-30 12:19:00 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2018-10-30 15:33:43 +0100 |
commit | 62c57be1da37ca9a95e424896025b875e30e4697 (patch) | |
tree | 7df0f3c8d2c92c13af6586168b3c66ee2a105ad9 /core/divelist.c | |
parent | 7e4c8c387b4d72432c5fbdc922b60b7d3ff31277 (diff) | |
download | subsurface-62c57be1da37ca9a95e424896025b875e30e4697.tar.gz |
Fix gasmix for OTU calculation
With the fixed sematics of get_gasmix to return the new gasmix for
the time of a gas switch (added comments to make this clear), in the
OTU calculation we need the previous gasmix for the interval up to the
current time.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/divelist.c b/core/divelist.c index 6197f23b9..1054ccc94 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -173,7 +173,7 @@ static int calculate_otu(const struct dive *dive) if (sample->setpoint.mbar) { po2 = sample->setpoint.mbar; } else { - int o2 = active_o2(dive, dc, sample->time); + int o2 = active_o2(dive, dc, psample->time); po2 = lrint(o2 * depth_to_atm(sample->depth.mm, dive)); } if (po2 >= 500) |