mirror of
https://github.com/jwetzell/rttrp-js.git
synced 2026-08-22 15:29:08 +00:00
add decoder for centroid position submodule
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user