Update test script

This commit is contained in:
Kai Vogelgesang 2021-11-09 11:26:01 +01:00
parent d0ba6312c2
commit 7eba49d07f
Signed by: kai
GPG Key ID: 0A95D3B6E62C0879

View File

@ -1,2 +1,60 @@
const mod = require('.') const mod = require('.')
console.log(mod.hello())
const o = mod.openOutput("/dev/ttyUSB0")
if (o.type !== "success") {
return
}
const movingHeads = [
{
startAddress: 1,
pan: 0,
tilt: 0,
brightness: {
type: "dimmer",
value: 1,
},
rgbw: [255, 0, 0, 0],
speed: 0,
},
{
startAddress: 15,
pan: 0,
tilt: 0,
brightness: {
type: "dimmer",
value: 1,
},
rgbw: [255, 0, 0, 0],
speed: 0,
},
{
startAddress: 29,
pan: 0,
tilt: 0,
brightness: {
type: "dimmer",
value: 1,
},
rgbw: [255, 0, 0, 0],
speed: 0,
},
{
startAddress: 43,
pan: 0,
tilt: 0,
brightness: {
type: "dimmer",
value: 1,
},
rgbw: [0, 0, 0, 255],
speed: 0,
}
];
r = o.set(movingHeads);
console.log(r);
o.close();