Skip the last 2 bytes when reading the ringbuffer.
It turns out that those 2 bytes do not contain valid profile data.
This commit is contained in:
parent
0025221268
commit
7c466009fd
@ -10,7 +10,7 @@
|
|||||||
message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \
|
message ("%s:%d: %s\n", __FILE__, __LINE__, expr); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DISTANCE(a,b) distance (a, b, SUUNTO_D9_MEMORY_SIZE - 0x019A)
|
#define DISTANCE(a,b) distance (a, b, SUUNTO_D9_MEMORY_SIZE - 0x019A - 2)
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
distance (unsigned int a, unsigned int b, unsigned int size)
|
distance (unsigned int a, unsigned int b, unsigned int size)
|
||||||
@ -177,7 +177,7 @@ int test_dump_sdm (const char* name, const char* filename)
|
|||||||
nbytes += len;
|
nbytes += len;
|
||||||
address -= len;
|
address -= len;
|
||||||
if (address <= 0x019A)
|
if (address <= 0x019A)
|
||||||
address = SUUNTO_D9_MEMORY_SIZE;
|
address = SUUNTO_D9_MEMORY_SIZE - 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The last package of the current dive contains the previous and
|
// The last package of the current dive contains the previous and
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user