mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 19:03:23 +00:00
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>
This commit is contained in:
parent
b48eb47178
commit
8de887c8ee
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue