aboutsummaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2018-03-05 21:23:23 +0100
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-03-13 18:54:16 +0200
commit8de887c8ee898c64d36dfda44e1ea55f538f1e2d (patch)
treeef855608a6a8bbd8cdc4ce6f28a920bab5af1ca8 /core/profile.c
parentb48eb4717810f53b13145525974086b3fdcc04c4 (diff)
downloadsubsurface-8de887c8ee898c64d36dfda44e1ea55f538f1e2d.tar.gz
Treat a PSCR dive with sensors more like a CCR dive
PSCR dives with o2 sensors are more like CCR dives. The math is exactly the same, its just a different diluent and a different po2. Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/profile.c b/core/profile.c
index 64949c295..555f623cf 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -578,7 +578,7 @@ struct plot_data *populate_plot_entries(struct dive *dive, struct divecomputer *
entry->tts = sample->tts.seconds;
entry->in_deco = sample->in_deco;
entry->cns = sample->cns;
- if (dc->divemode == CCR) {
+ if (dc->divemode == CCR || (dc->divemode == PSCR && dc->no_o2sensors)) {
entry->o2pressure.mbar = entry->o2setpoint.mbar = sample->setpoint.mbar; // for rebreathers
entry->o2sensor[0].mbar = sample->o2sensor[0].mbar; // for up to three rebreather O2 sensors
entry->o2sensor[1].mbar = sample->o2sensor[1].mbar;
@@ -1255,7 +1255,7 @@ void fill_o2_values(struct dive *dive, struct divecomputer *dc, struct plot_info
for (i = 0; i < pi->nr; i++) {
struct plot_data *entry = pi->entry + i;
- if (dc->divemode == CCR) {
+ if (dc->divemode == CCR || (dc->divemode == PSCR && dc->no_o2sensors)) {
if (i == 0) { // For 1st iteration, initialise the last_sensor values
for (j = 0; j < dc->no_o2sensors; j++)
last_sensor[j].mbar = pi->entry->o2sensor[j].mbar;