Fix the memory layout descriptors.
The profile ringbuffer appears to be slightly smaller than expected for some models. For the Mares Matrix (and all compatible devices) it ends earlier, while for the Icon HD Net Ready it starts later. This bug resulted in missing dives, because all remaining dives were getting dropped once a dive that crossed the ringbuffer boundary was reached.
This commit is contained in:
parent
1bfcb8c3c1
commit
85fd0c524f
@ -90,10 +90,16 @@ static const mares_iconhd_layout_t mares_iconhd_layout = {
|
||||
0x100000, /* rb_profile_end */
|
||||
};
|
||||
|
||||
static const mares_iconhd_layout_t mares_iconhdnet_layout = {
|
||||
0x100000, /* memsize */
|
||||
0x00E000, /* rb_profile_begin */
|
||||
0x100000, /* rb_profile_end */
|
||||
};
|
||||
|
||||
static const mares_iconhd_layout_t mares_matrix_layout = {
|
||||
0x40000, /* memsize */
|
||||
0x0A000, /* rb_profile_begin */
|
||||
0x40000, /* rb_profile_end */
|
||||
0x3E000, /* rb_profile_end */
|
||||
};
|
||||
|
||||
static unsigned int
|
||||
@ -268,6 +274,9 @@ mares_iconhd_device_open (dc_device_t **out, dc_context_t *context, const char *
|
||||
if (model == NEMOWIDE2 || model == MATRIX || model == PUCKPRO || model == PUCK2) {
|
||||
device->layout = &mares_matrix_layout;
|
||||
device->packetsize = 64;
|
||||
} else if (model == ICONHDNET) {
|
||||
device->layout = &mares_iconhdnet_layout;
|
||||
device->packetsize = 0;
|
||||
} else {
|
||||
device->layout = &mares_iconhd_layout;
|
||||
device->packetsize = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user