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:
Dirk Hohndel 2015-02-06 09:56:21 -08:00 committed by Jef Driesen
parent 415d7f2214
commit 588e7e7ab4

View File

@ -422,11 +422,11 @@ shearwater_predator_parser_samples_foreach (dc_parser_t *abstract, dc_sample_cal
// Status flags.
unsigned int status = data[offset + 11];
// PPO2
sample.ppo2 = data[offset + 6] / 100.0;
if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);
if ((status & OC) == 0) {
// PPO2
sample.ppo2 = data[offset + 6] / 100.0;
if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);
// Setpoint
if (parser->petrel) {
sample.setpoint = data[offset + 18] / 100.0;