[PATCH 5/6] Fill out last_setpoint

Anton Lundin glance at acc.umu.se
Sat Nov 8 05:11:10 PST 2014


There was traces of filling last_setpoint out for any samples that
didn't have it. This adds the last bits for it.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 profile.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/profile.c b/profile.c
index 5bfe7b9..04e74b6 100644
--- a/profile.c
+++ b/profile.c
@@ -952,6 +952,10 @@ 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 (pi->entry->o2setpoint)
+					last_setpoint = pi->entry->o2setpoint;
+				else
+					pi->entry->o2setpoint = last_setpoint;
 				for (j = 0; j < dc->no_o2sensors; j++)
 					if (entry->o2sensor[j])
 						last_sensor[j] = entry->o2sensor[j];
-- 
1.9.1



More information about the subsurface mailing list