Don't overwrite zero setpoints

As we agreed, in memory we don't zero repeated setpoints and thus zero
setpoints don't have to be overwritten by the last setpoint value.

This corrects the deco ceiling with CCR dives that bailout to OC.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-11-06 23:41:42 +01:00 committed by Dirk Hohndel
parent 3fe310e529
commit 24c491053c

View file

@ -952,10 +952,6 @@ void fill_o2_values(struct divecomputer *dc, struct plot_info *pi, struct dive *
for (j = 0; j < dc->no_o2sensors; j++)
last_sensor[j] = pi->entry->o2sensor[j];
} else { // Now re-insert the missing oxygen pressure values
if (entry->o2setpoint)
last_setpoint = entry->o2setpoint;
else
entry->o2setpoint = last_setpoint;
for (j = 0; j < dc->no_o2sensors; j++)
if (entry->o2sensor[j])
last_sensor[j] = entry->o2sensor[j];