mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
CNS doesn't increase when PO2 is below 0.5 atm
When chasing other bug in CNS code i found this. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9400e1190b
commit
3f74389b88
1 changed files with 3 additions and 0 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue