From 06a2f36a6295598bdd6d37dc97786cb587df0b8f Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 7 Apr 2018 07:41:04 +0300 Subject: 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 --- core/import-suunto.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core') 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) { -- cgit v1.2.3-70-g09d2