diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-12-11 13:09:48 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-12-11 13:09:48 -0800 |
commit | 91577f11b5373557dca50627b8e3348b6dee2514 (patch) | |
tree | 8f9179a9b1f42375f4a34743efc111594bb1a7c4 /dive.c | |
parent | c6ca263fb024bf06f76a5a89fbcd982f3f658d39 (diff) | |
parent | 563af1daa781a53fad308870320f99a1903d5058 (diff) | |
download | subsurface-91577f11b5373557dca50627b8e3348b6dee2514.tar.gz |
Merge branch 'cns' into cns-merge
I foolishly changed visible_columns in both the (ill-named) cns branch and
master...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Conflicts:
divelist.c
gtk-gui.c
profile.c
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -419,6 +419,7 @@ struct dive *fixup_dive(struct dive *dive) add_location(dive->location); add_suit(dive->suit); sanitize_cylinder_info(dive); + dive->maxcns = dive->cns; dc = &dive->dc; for (i = 0; i < dc->samples; i++) { struct sample *sample = dc->sample + i; @@ -479,6 +480,8 @@ struct dive *fixup_dive(struct dive *dive) depthtime += (time - lasttime) * (lastdepth + depth) / 2; lastdepth = depth; lasttime = time; + if (sample->cns > dive->maxcns) + dive->maxcns = sample->cns; } dive->start = start; dive->end = end; @@ -708,6 +711,10 @@ add_sample_b: sample.cylinderpressure = as->cylinderpressure; if (as->cylinderindex) sample.cylinderindex = as->cylinderindex; + if (as->cns) + sample.cns = as->cns; + if (as->po2) + sample.po2 = as->po2; merge_one_sample(&sample, at, res); |