mirror of
https://github.com/jwetzell/rttrp-js.git
synced 2026-09-03 13:19:04 +00:00
add decoder for universe
This commit is contained in:
@@ -251,6 +251,36 @@ const goodTests = [
|
||||
},
|
||||
decoder: Decoders.RTTrPM,
|
||||
},
|
||||
{
|
||||
description: 'Universe + Spot + Single Channel Block',
|
||||
bytes: new Uint8Array([
|
||||
0x09, 0x00, 0x15, 0x12, 0x34, 0x00, 0x01, 0x0a, 0x00, 0x0e, 0x12, 0x34, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00,
|
||||
0x06, 0x40,
|
||||
]),
|
||||
expected: {
|
||||
type: 0x09,
|
||||
size: 21,
|
||||
id: 0x1234,
|
||||
numberOfSpots: 1,
|
||||
spots: [
|
||||
{
|
||||
type: 0x0a,
|
||||
size: 14,
|
||||
id: 0x1234,
|
||||
offset: 1,
|
||||
numberOfChannelBlocks: 1,
|
||||
channelBlocks: [
|
||||
{
|
||||
offset: 0x08,
|
||||
fade: 0x06,
|
||||
value: 0x40,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
decoder: Decoders.Universe,
|
||||
},
|
||||
{
|
||||
description: 'Spot + Single Channel Block',
|
||||
bytes: new Uint8Array([0x0a, 0x00, 0x0e, 0x12, 0x34, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, 0x06, 0x40]),
|
||||
|
||||
Reference in New Issue
Block a user