blinkstick-ts
Version:
BlinkStick TypeScript implementation
27 lines (26 loc) • 771 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimulatedBlinkStick = void 0;
class SimulatedBlinkStick {
constructor(channels) {
this.channels = channels;
}
setColor(color, index = 0, channel = 0) {
this.channels[channel].setColor(color, index);
}
setColors(colors, channel = 0) {
this.channels[channel].setColors(colors);
}
getColor(index = 0, channel = 0) {
return this.channels[channel].getColor(index);
}
getColors(count, index = 0, channel = 0) {
return this.channels[channel].getColors(count, index);
}
getChannel(channel) {
return this.channels[channel];
}
close() {
}
}
exports.SimulatedBlinkStick = SimulatedBlinkStick;