Cleanup and correct CCR detection
== has precedence over & and would have needed some parenthesis. Instead of that, this moves that code into the block below which already contains a correct CCR check. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
058538e628
commit
854f58fa32
@ -453,13 +453,11 @@ shearwater_predator_parser_samples_foreach (dc_parser_t *abstract, dc_sample_cal
|
||||
// Status flags.
|
||||
unsigned int status = data[offset + 11];
|
||||
|
||||
if ((status & OC) == 0) {
|
||||
// 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);
|
||||
}
|
||||
|
||||
if ((status & OC) == 0) {
|
||||
// Setpoint
|
||||
if (parser->petrel) {
|
||||
sample.setpoint = data[offset + 18] / 100.0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user