Swap values 2 and 3 of the pointer mode

Swapping values 2 and 3 of the pointer mode has the advantage that only
the mode with the largest value uses bytes as its unit, while all others
use the page size as their unit.
This commit is contained in:
Jef Driesen 2024-03-05 20:06:28 +01:00
parent f42449b101
commit 121c7c12fb
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ static const oceanic_common_layout_t aeris_f10_layout = {
0x0D80, /* rb_profile_begin */ 0x0D80, /* rb_profile_begin */
0x10000, /* rb_profile_end */ 0x10000, /* rb_profile_end */
0, /* pt_mode_global */ 0, /* pt_mode_global */
2, /* pt_mode_logbook */ 3, /* pt_mode_logbook */
0, /* pt_mode_serial */ 0, /* pt_mode_serial */
}; };
@ -116,7 +116,7 @@ static const oceanic_common_layout_t aeris_f11_layout = {
0x0D80, /* rb_profile_begin */ 0x0D80, /* rb_profile_begin */
0x20000, /* rb_profile_end */ 0x20000, /* rb_profile_end */
0, /* pt_mode_global */ 0, /* pt_mode_global */
3, /* pt_mode_logbook */ 2, /* pt_mode_logbook */
0, /* pt_mode_serial */ 0, /* pt_mode_serial */
}; };

View File

@ -49,7 +49,7 @@ get_profile_first (const unsigned char data[], const oceanic_common_layout_t *la
value = array_uint16_le (data + 5); value = array_uint16_le (data + 5);
} else if (layout->pt_mode_logbook == 1) { } else if (layout->pt_mode_logbook == 1) {
value = array_uint16_le (data + 4); value = array_uint16_le (data + 4);
} else if (layout->pt_mode_logbook == 3) { } else if (layout->pt_mode_logbook == 2) {
value = array_uint16_le (data + 16); value = array_uint16_le (data + 16);
} else { } else {
return array_uint16_le (data + 16); return array_uint16_le (data + 16);
@ -79,7 +79,7 @@ get_profile_last (const unsigned char data[], const oceanic_common_layout_t *lay
value = array_uint16_le (data + 6) >> 4; value = array_uint16_le (data + 6) >> 4;
} else if (layout->pt_mode_logbook == 1) { } else if (layout->pt_mode_logbook == 1) {
value = array_uint16_le (data + 6); value = array_uint16_le (data + 6);
} else if (layout->pt_mode_logbook == 3) { } else if (layout->pt_mode_logbook == 2) {
value = array_uint16_le (data + 18); value = array_uint16_le (data + 18);
} else { } else {
return array_uint16_le(data + 18); return array_uint16_le(data + 18);