mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix bit shift on Suunto DB import
Let's do the bit shift properly and not by block size. Fixes #906 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
577965cc26
commit
1bea48f9bd
1 changed files with 1 additions and 1 deletions
|
@ -2385,7 +2385,7 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
|
|||
for (i = 0; interval && sampleBlob && i * interval < cur_dive->duration.seconds; i++) {
|
||||
float *depth = (float *)&sampleBlob[i * block_size + 3];
|
||||
int32_t temp = (sampleBlob[i * block_size + 10] << 8) + sampleBlob[i * block_size + 11];
|
||||
int32_t pressure = (sampleBlob[i * block_size + 9] << block_size) + (sampleBlob[i * block_size + 8] << 8) + sampleBlob[i * block_size + 7];
|
||||
int32_t pressure = (sampleBlob[i * block_size + 9] << 16) + (sampleBlob[i * block_size + 8] << 8) + sampleBlob[i * block_size + 7];
|
||||
|
||||
sample_start();
|
||||
cur_sample->time.seconds = i * interval;
|
||||
|
|
Loading…
Reference in a new issue