diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2018-04-07 07:41:04 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-07 11:33:09 -0700 |
commit | 06a2f36a6295598bdd6d37dc97786cb587df0b8f (patch) | |
tree | eb4a6927a6fa637a1e34e9f5615b9b844e343a90 | |
parent | b257b7a027e6c84996630f0c241cd07d496d231f (diff) | |
download | subsurface-06a2f36a6295598bdd6d37dc97786cb587df0b8f.tar.gz |
Start to describe DM5 sampleBlob
Currently the best guess of sampleBlob format. Unfortunately there seems
to be some version of DM that stores the temperature in different
location that I have not been able to figure out yet. Note that some
version of DM does not utilize sampleBlob but specific blobs for each
value (temperature, pressure, ...).
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
-rw-r--r-- | core/import-suunto.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/import-suunto.c b/core/import-suunto.c index 35a2c86de..e2c9aad05 100644 --- a/core/import-suunto.c +++ b/core/import-suunto.c @@ -425,6 +425,17 @@ extern int dm5_dive(void *param, int columns, char **data, char **column) cur_dive->dc.surface_pressure.mbar = (atoi(data[14]) / 100); interval = data[16] ? atoi(data[16]) : 0; + + /* + * sampleBlob[0] version number, indicates the size of one sample + * + * Following ones describe single sample, bugs in interpretation of the binary blob are likely: + * + * sampleBlob[3] depth + * sampleBlob[7-9] pressure + * sampleBlob[11] temperature - either full Celsius or float, might be different field for some version of DM + */ + sampleBlob = (unsigned const char *)data[24]; if (sampleBlob) { |