Fix the memory layout for the Atom 3.x and VT4.x.

The logbook ringbuffer appears to start at offset 0x400 instead of
0x240. Since these ringbuffer boundaries have to be taken taken into
account only once the ringbuffer has been filled completely, this bug
affects users with more than 200 dives only. Thus, no surprise it didn't
get noticed earlier.
This commit is contained in:
Jef Driesen 2013-09-03 22:01:12 +02:00
parent b35e07b71b
commit 1331db75cb

View File

@ -112,10 +112,13 @@ static const oceanic_common_version_t tusa_zenair_version[] = {
static const oceanic_common_version_t oceanic_oc1_version[] = {
{"OCWATCH R\0\0 1024"},
{"OCEANVT4 \0\0 1024"},
{"OC1WATCH \0\0 1024"},
{"OCEATOM3 \0\0 1024"},
{"OCSWATCH \0\0 1024"},
};
static const oceanic_common_version_t oceanic_atom3_version[] = {
{"OCEANVT4 \0\0 1024"},
{"OCEATOM3 \0\0 1024"},
{"OCEAVT41 \0\0 1024"},
{"ATOM31 \0\0 1024"},
{"AERISAIR \0\0 1024"},
@ -233,6 +236,19 @@ static const oceanic_common_layout_t oceanic_oc1_layout = {
1 /* pt_mode_logbook */
};
static const oceanic_common_layout_t oceanic_atom3_layout = {
0x20000, /* memsize */
0x0000, /* cf_devinfo */
0x0040, /* cf_pointers */
0x0400, /* rb_logbook_begin */
0x0A40, /* rb_logbook_end */
8, /* rb_logbook_entry_size */
0x0A40, /* rb_profile_begin */
0x1FE00, /* rb_profile_end */
0, /* pt_mode_global */
1 /* pt_mode_logbook */
};
static const oceanic_common_layout_t oceanic_veo1_layout = {
0x0400, /* memsize */
0x0000, /* cf_devinfo */
@ -433,6 +449,8 @@ oceanic_atom2_device_open (dc_device_t **out, dc_context_t *context, const char
device->base.layout = &tusa_zenair_layout;
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_oc1_version)) {
device->base.layout = &oceanic_oc1_layout;
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_atom3_version)) {
device->base.layout = &oceanic_atom3_layout;
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_veo1_version)) {
device->base.layout = &oceanic_veo1_layout;
} else if (OCEANIC_COMMON_MATCH (device->base.version, oceanic_reactpro_version)) {