Temperature 0x7F appears to mean no reading

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2018-04-07 08:15:15 +03:00 committed by Dirk Hohndel
parent 6cfbe10bc3
commit b28e3db7f1

View file

@ -474,8 +474,10 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
float *temp = (float *)&(sampleBlob[i * block_size + 11]);
cur_sample->temperature.mkelvin = C_to_mkelvin(*temp);
} else {
if ((sampleBlob[i * block_size + 11]) != 0x7F) {
cur_sample->temperature.mkelvin = C_to_mkelvin(sampleBlob[i * block_size + 11]);
}
}
/*
* Limit cylinder pressures to somewhat sensible values