summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-04-07 08:15:15 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-04-07 11:33:09 -0700
commitb28e3db7f17d3ce987abe41c6ce47c5f05f99508 (patch)
tree4cbf68b1c7f74682f5dac685e437da14e51402f3
parent6cfbe10bc315ae7ac2bce043196e4707c7a4b1da (diff)
downloadsubsurface-b28e3db7f17d3ce987abe41c6ce47c5f05f99508.tar.gz
Temperature 0x7F appears to mean no reading
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
-rw-r--r--core/import-suunto.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/import-suunto.c b/core/import-suunto.c
index e5d6c8c87..86298e722 100644
--- a/core/import-suunto.c
+++ b/core/import-suunto.c
@@ -474,7 +474,9 @@ 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 {
- cur_sample->temperature.mkelvin = C_to_mkelvin(sampleBlob[i * block_size + 11]);
+ if ((sampleBlob[i * block_size + 11]) != 0x7F) {
+ cur_sample->temperature.mkelvin = C_to_mkelvin(sampleBlob[i * block_size + 11]);
+ }
}
/*