mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't force the first divecomputer to CCR just because there's po2 value
The existing code was bogus as it used cur_dive->dc instead of cur_dc (i.e., it always changed the first dive computer, even if the po2 was found in a different one). But fundamentally I consider this bogus. We are not doing the right thing here - some dive computer send us pO2 values that are just the calculated pO2 at a depth and NOT a setpoint, yet we pretend those are setpoints and then turn these dives into CCR dives. This needs to done differently. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1527cd0d05
commit
6dd6e90684
1 changed files with 1 additions and 3 deletions
|
@ -935,10 +935,8 @@ 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)) {
|
||||
cur_dive->dc.divemode = CCR;
|
||||
if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint))
|
||||
return;
|
||||
}
|
||||
if (MATCH("heartbeat", get_uint8, &sample->heartbeat))
|
||||
return;
|
||||
if (MATCH("bearing", get_bearing, &sample->bearing))
|
||||
|
|
Loading…
Add table
Reference in a new issue