UNPKG

blinkstick-ts

Version:
32 lines (31 loc) 905 B
"use strict"; /** * Provides access to BlinkStick devices * * @module blinkstick */ Object.defineProperty(exports, "__esModule", { value: true }); exports.BlinkStickChannel = void 0; const blinkstick_led_1 = require("./blinkstick-led"); class BlinkStickChannel { constructor(blinkStick, channel = 0) { this.blinkStick = blinkStick; this.channel = channel; } setColor(color, index) { this.blinkStick.setColor(color, index, this.channel); } setColors(colors) { this.blinkStick.setColors(colors, this.channel); } getColor(index) { return this.blinkStick.getColor(index, this.channel); } getColors(count, index) { return this.blinkStick.getColors(count, index, this.channel); } getLed(index) { return new blinkstick_led_1.BlinkStickLed(this, index); } } exports.BlinkStickChannel = BlinkStickChannel;