[PATCH] CNS doesn't increase when PO3 is below 0.5 atm
Anton Lundin
glance at acc.umu.se
Tue Jun 17 11:01:16 PDT 2014
When chasing other bug in CNS code i found this.
Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
divelist.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/divelist.c b/divelist.c
index a075838..ff49339 100644
--- a/divelist.c
+++ b/divelist.c
@@ -248,6 +248,9 @@ static int calculate_cns(struct dive *dive)
int o2 = active_o2(dive, dc, sample->time);
po2 = o2 * depth_to_atm(sample->depth.mm, dive);
}
+ /* CNS don't increse when below 500 matm */
+ if (po2 < 500)
+ continue;
/* Find what table-row we should calculate % for */
for (j = 1; j < sizeof(cns_table) / (sizeof(int) * 3); j++)
if (po2 > cns_table[j][0])
--
1.9.1
More information about the subsurface
mailing list