mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make planner work again for CCR dives
The latest CCR patches had rendered the planner not usable for CCR dives. This patch corrects this (and reenables the CCR set point column for segments). The problem was that a new member setpoint of struct divepoint had been introduced, but there was already po2 which had the same meaning. This patch merges the two and renames them setpoint to prevent future confusion. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
839bcaaf70
commit
5f44fdd9cf
11 changed files with 53 additions and 52 deletions
|
@ -208,7 +208,7 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
|||
sample->ndl.seconds = ndl;
|
||||
sample->stoptime.seconds = stoptime;
|
||||
sample->stopdepth.mm = stopdepth;
|
||||
sample->po2.mbar = po2;
|
||||
sample->setpoint.mbar = po2;
|
||||
sample->cns = cns;
|
||||
}
|
||||
sample = prepare_sample(dc);
|
||||
|
@ -247,10 +247,10 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
|||
#if DC_VERSION_CHECK(0, 3, 0)
|
||||
case DC_SAMPLE_SETPOINT:
|
||||
/* for us a setpoint means constant pO2 from here */
|
||||
sample->po2.mbar = po2 = rint(value.setpoint * 1000);
|
||||
sample->setpoint.mbar = po2 = rint(value.setpoint * 1000);
|
||||
break;
|
||||
case DC_SAMPLE_PPO2:
|
||||
sample->po2.mbar = po2 = rint(value.ppo2 * 1000);
|
||||
sample->setpoint.mbar = po2 = rint(value.ppo2 * 1000);
|
||||
break;
|
||||
case DC_SAMPLE_CNS:
|
||||
sample->cns = cns = rint(value.cns * 100);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue