[PATCH 1/2] Store DC_SAMPLE_PPO2 as a o2 sensor

Anton Lundin glance at acc.umu.se
Mon Aug 31 14:23:42 PDT 2015


DC_SAMPLE_PPO2 represents a known ppO2, and not a setpoint.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 libdivecomputer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libdivecomputer.c b/libdivecomputer.c
index bbabb1c..e877e59 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -269,7 +269,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
 		sample->setpoint.mbar = po2 = rint(value.setpoint * 1000);
 		break;
 	case DC_SAMPLE_PPO2:
-		sample->setpoint.mbar = po2 = rint(value.ppo2 * 1000);
+		sample->o2sensor[0].mbar = po2 = rint(value.ppo2 * 1000);
 		break;
 	case DC_SAMPLE_CNS:
 		sample->cns = cns = rint(value.cns * 100);
-- 
2.1.4



More information about the subsurface mailing list