aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--divelist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c
index a07583857..ff493393d 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])