mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Set dctype of dives with pO2 setpoint information to CCR.
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7afc65b99b
commit
d42b07a30a
1 changed files with 6 additions and 2 deletions
|
@ -895,8 +895,10 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
|
|||
return;
|
||||
if (MATCH("sensor3.sample", double_to_o2pressure, &sample->o2sensor[2])) // up to 3 CCR sensors
|
||||
return;
|
||||
if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint))
|
||||
if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) {
|
||||
cur_dive->dc.dctype = CCR;
|
||||
return;
|
||||
}
|
||||
if (MATCH("heartbeat", get_uint8, &sample->heartbeat))
|
||||
return;
|
||||
if (MATCH("bearing", get_bearing, &sample->bearing))
|
||||
|
@ -2027,8 +2029,10 @@ extern int shearwater_profile_sample(void *handle, int columns, char **data, cha
|
|||
cur_sample->depth.mm = metric ? atof(data[1]) * 1000 : feet_to_mm(atof(data[1]));
|
||||
if (data[2])
|
||||
cur_sample->temperature.mkelvin = metric ? C_to_mkelvin(atof(data[2])) : F_to_mkelvin(atof(data[2]));
|
||||
if (data[3])
|
||||
if (data[3]) {
|
||||
cur_sample->setpoint.mbar = atof(data[3]) * 1000;
|
||||
cur_dive->dc.dctype = CCR;
|
||||
}
|
||||
if (data[4])
|
||||
cur_sample->ndl.seconds = atoi(data[4]) * 60;
|
||||
if (data[5])
|
||||
|
|
Loading…
Add table
Reference in a new issue