Predator: don't report PPO2 unless in CC mode
Sending this in OC mode is redundant and might confuse applications that assume they only get PPO2 data in CC mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f1f2fa2c12
commit
427466c349
@ -375,9 +375,11 @@ shearwater_predator_parser_samples_foreach (dc_parser_t *abstract, dc_sample_cal
|
||||
sample.temperature = temperature;
|
||||
if (callback) callback (DC_SAMPLE_TEMPERATURE, sample, userdata);
|
||||
|
||||
// PPO2
|
||||
sample.ppo2 = data[offset + 6] / 100.0;
|
||||
if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);
|
||||
// PPO2 -- only return PPO2 if we are in closed circuit mode
|
||||
if (data[offset + 11] & 0x10 == 0) {
|
||||
sample.ppo2 = data[offset + 6] / 100.0;
|
||||
if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);
|
||||
}
|
||||
|
||||
// CNS
|
||||
if (parser->petrel) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user