diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-01-05 22:59:20 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-05 14:08:42 -0800 |
commit | ac6e84c4fd8e7cdccdb75cd978e6b3fa4f78d3c9 (patch) | |
tree | 225d498672db95bae2dce624affd311d66264868 /parse-xml.c | |
parent | 11542d84f76d29e9ae549a89994c007831f8d755 (diff) | |
download | subsurface-ac6e84c4fd8e7cdccdb75cd978e6b3fa4f78d3c9.tar.gz |
DLF import: Decode and import temperature
These decodings and constants makes the numbers line up perfectly with
the numbers presented on wetnotes.com.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/parse-xml.c b/parse-xml.c index 1f1b87ee5..77a62cca4 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -2602,6 +2602,8 @@ int parse_dlf_buffer(unsigned char *buffer, size_t size) cur_sample->ndl.seconds = ptr[8] * 60; // Guessed unit here.. looks good. cur_sample->tts.seconds = ((ptr[10] & 0x0F) << 4) + ptr[9] * 20; + cur_sample->temperature.mkelvin = (((ptr[11] & 0x0F) << 4) + (ptr[10] >> 4)) * 100 + ZERO_C_IN_MKELVIN; + // ptr[11] & 0xF0 is unknown, and always 0xC in all checked files sample_end(); break; case 1: |