Commit f7b82d3
committed
Fix 0x85 distance field byte order (ZZZ nibble assembly)
The ZZZ distance value was assembled as (Z_high << 8) | ZZ, treating
Z_high as a full byte shift. Per the SeaTalk spec, ZZZ is a 12-bit
value where ZZ provides the high 8 bits and Z_high the low nibble:
ZZZ = (ZZ << 4) | Z_high.
Updated test vectors to match the corrected byte order.1 parent 95adc21 commit f7b82d3
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments