UNPKG

@elgato-stream-deck/core

Version:

An npm module for interfacing with the Elgato Stream Deck

91 lines 2.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamDeckPlusXlFactory = StreamDeckPlusXlFactory; const base_js_1 = require("./base.js"); const generic_gen2_js_1 = require("./generic-gen2.js"); const id_js_1 = require("../id.js"); const controlsGenerator_js_1 = require("../controlsGenerator.js"); const generic_js_1 = require("../services/lcdSegmentDisplay/generic.js"); const plusXlControls = (0, controlsGenerator_js_1.generateButtonsGrid)(9, 4, { width: 112, height: 112 }); plusXlControls.push({ type: 'lcd-segment', row: 4, column: 0, columnSpan: 9, rowSpan: 1, id: 0, pixelSize: Object.freeze({ width: 1200, height: 100, }), drawRegions: true, }, { type: 'encoder', row: 5, column: 0, index: 0, hidIndex: 0, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 5, column: 2, index: 1, hidIndex: 1, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 5, column: 3, index: 2, hidIndex: 2, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 5, column: 5, index: 3, hidIndex: 3, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 5, column: 6, index: 4, hidIndex: 4, hasLed: false, ledRingSteps: 0, }, { type: 'encoder', row: 5, column: 8, index: 5, hidIndex: 5, hasLed: false, ledRingSteps: 0, }); const plusXlProperties = { MODEL: id_js_1.DeviceModelId.PLUS_XL, PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.PLUS_XL], SUPPORTS_RGB_KEY_FILL: true, CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(plusXlControls), KEY_SPACING_HORIZONTAL: 99, KEY_SPACING_VERTICAL: 40, FULLSCREEN_PANELS: 1, HAS_NFC_READER: false, SUPPORTS_CHILD_DEVICES: false, }; const lcdSegmentControls = plusXlProperties.CONTROLS.filter((control) => control.type === 'lcd-segment'); function StreamDeckPlusXlFactory(device, options) { const services = (0, generic_gen2_js_1.createBaseGen2Properties)(device, options, plusXlProperties, null, { rotate: true, yFlip: true, }); services.lcdSegmentDisplay = new generic_js_1.StreamdeckDefaultLcdService(options.encodeJPEG, device, lcdSegmentControls, true, id_js_1.DeviceModelId.PLUS_XL); return new base_js_1.StreamDeckBase(device, options, services); } //# sourceMappingURL=plus-xl.js.map