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:
parent
f42449b101
commit
121c7c12fb
@ -101,7 +101,7 @@ static const oceanic_common_layout_t aeris_f10_layout = {
|
||||
0x0D80, /* rb_profile_begin */
|
||||
0x10000, /* rb_profile_end */
|
||||
0, /* pt_mode_global */
|
||||
2, /* pt_mode_logbook */
|
||||
3, /* pt_mode_logbook */
|
||||
0, /* pt_mode_serial */
|
||||
};
|
||||
|
||||
@ -116,7 +116,7 @@ static const oceanic_common_layout_t aeris_f11_layout = {
|
||||
0x0D80, /* rb_profile_begin */
|
||||
0x20000, /* rb_profile_end */
|
||||
0, /* pt_mode_global */
|
||||
3, /* pt_mode_logbook */
|
||||
2, /* pt_mode_logbook */
|
||||
0, /* pt_mode_serial */
|
||||
};
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ get_profile_first (const unsigned char data[], const oceanic_common_layout_t *la
|
||||
value = array_uint16_le (data + 5);
|
||||
} else if (layout->pt_mode_logbook == 1) {
|
||||
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);
|
||||
} else {
|
||||
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;
|
||||
} else if (layout->pt_mode_logbook == 1) {
|
||||
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);
|
||||
} else {
|
||||
return array_uint16_le(data + 18);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user