From 8de887c8ee898c64d36dfda44e1ea55f538f1e2d Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Mon, 5 Mar 2018 21:23:23 +0100 Subject: 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 --- core/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/profile.c') 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; -- cgit v1.2.3-70-g09d2