Increase the memory size for the Aqualung i770R

The Aqualung i770R appears to have 6M instead of 4M (high) memory.
Confirmed by trying to read past the 6M limit, which fails with a NAK
response. This amount also matches with the capacity stated in the
manual (6553 hours of profile data at a 60 second sample rate).
This commit is contained in:
Greg McLaughlin 2022-10-31 22:40:06 +01:00 committed by Jef Driesen
parent 3d388a0a96
commit 59dd6a2a56
2 changed files with 8 additions and 5 deletions

View File

@ -365,7 +365,7 @@ static const oceanic_common_layout_t oceanic_proplusx_layout = {
};
static const oceanic_common_layout_t aqualung_i770r_layout = {
0x440000, /* memsize */
0x640000, /* memsize */
0x40000, /* highmem */
0x0000, /* cf_devinfo */
0x0040, /* cf_pointers */
@ -373,7 +373,7 @@ static const oceanic_common_layout_t aqualung_i770r_layout = {
0x10000, /* rb_logbook_end */
16, /* rb_logbook_entry_size */
0x40000, /* rb_profile_begin */
0x440000, /* rb_profile_end */
0x640000, /* rb_profile_end */
0, /* pt_mode_global */
1, /* pt_mode_logbook */
0, /* pt_mode_serial */

View File

@ -56,8 +56,9 @@ get_profile_first (const unsigned char data[], const oceanic_common_layout_t *la
}
unsigned int npages = (layout->memsize - layout->highmem) / pagesize;
if (npages > 0x2000) {
if (npages > 0x4000) {
value &= 0x7FFF;
} else if (npages > 0x2000) {
value &= 0x3FFF;
} else if (npages > 0x1000) {
value &= 0x1FFF;
@ -86,7 +87,9 @@ get_profile_last (const unsigned char data[], const oceanic_common_layout_t *lay
unsigned int npages = (layout->memsize - layout->highmem) / pagesize;
if (npages > 0x2000) {
if (npages > 0x4000) {
value &= 0x7FFF;
} else if (npages > 0x2000) {
value &= 0x3FFF;
} else if (npages > 0x1000) {
value &= 0x1FFF;