From fc213066f8ee9e129bdace3c042322df6c5cc611 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 14 Jun 2016 17:12:57 +0200 Subject: Only setpoint changes with non-zero SP indicate a CCR dive There might be some spurious setpoint changes at t=0 without an actual value (I have no idea where those come from). In any case, those do not indicate that the dive is a CCR dive. Signed-off-by: Robert C. Helling Signed-off-by: Dirk Hohndel --- core/parse-xml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/parse-xml.c') diff --git a/core/parse-xml.c b/core/parse-xml.c index c79d7a9fc..3b5a2d794 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -1663,7 +1663,7 @@ static void event_end(void) * Older logs might mark the dive to be CCR by having an "SP change" event at time 0:00. Better * to mark them being CCR on import so no need for special treatments elsewhere on the code. */ - if (ev && cur_event.time.seconds == 0 && cur_event.type == SAMPLE_EVENT_PO2 && dc->divemode==OC) { + if (ev && cur_event.time.seconds == 0 && cur_event.type == SAMPLE_EVENT_PO2 && cur_event.value && dc->divemode==OC) { dc->divemode = CCR; } -- cgit v1.2.3-70-g09d2