From e4e929a5cb7784729919c8725a2c3f395543e873 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <helling@atdotde.de>
Date: Thu, 6 Nov 2014 23:41:42 +0100
Subject: [PATCH 1/2] 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>
---
 profile.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/profile.c b/profile.c
index 7c4a885..c74c7c0 100644
--- a/profile.c
+++ b/profile.c
@@ -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];
-- 
1.8.5.2 (Apple Git-48)

