add decoder for centroid position submodule

This commit is contained in:
2025-03-15 08:37:44 -05:00
parent 2f3d8486a0
commit 3c5cd86ae2
4 changed files with 59 additions and 0 deletions
+16
View File
@@ -19,6 +19,22 @@ const goodTests = [
},
decoder: Decoders.RTTrPHeader,
},
{
description: 'Centroid Position',
bytes: new Uint8Array([
0x02, 0x00, 0x1d, 0x00, 0x10, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
]),
expected: {
type: 0x02,
size: 0x1d,
latency: 16,
x: 1.0,
y: 2.0,
z: 3.0,
},
decoder: Decoders.CentroidPosition,
},
];
describe('RTTrP Bytes Decoding', () => {