@elgato-stream-deck/core
Version:
An npm module for interfacing with the Elgato Stream Deck
61 lines • 1.94 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamDeckPedalFactory = StreamDeckPedalFactory;
const base_js_1 = require("./base.js");
const id_js_1 = require("../id.js");
const controlsGenerator_js_1 = require("../controlsGenerator.js");
const pedal_js_1 = require("../services/properties/pedal.js");
const fake_js_1 = require("../services/buttonsLcdDisplay/fake.js");
const callback_hook_js_1 = require("../services/callback-hook.js");
const gen1_js_1 = require("../services/input/gen1.js");
const pedalControls = [
{
type: 'button',
row: 0,
column: 0,
index: 0,
hidIndex: 0,
feedbackType: 'none',
},
{
type: 'button',
row: 0,
column: 1,
index: 1,
hidIndex: 1,
feedbackType: 'none',
},
{
type: 'button',
row: 0,
column: 2,
index: 2,
hidIndex: 2,
feedbackType: 'none',
},
];
const pedalProperties = {
MODEL: id_js_1.DeviceModelId.PEDAL,
PRODUCT_NAME: id_js_1.MODEL_NAMES[id_js_1.DeviceModelId.PEDAL],
KEY_DATA_OFFSET: 3,
SUPPORTS_RGB_KEY_FILL: false,
CONTROLS: (0, controlsGenerator_js_1.freezeDefinitions)(pedalControls),
KEY_SPACING_HORIZONTAL: 0,
KEY_SPACING_VERTICAL: 0,
FULLSCREEN_PANELS: 0,
HAS_NFC_READER: false,
SUPPORTS_CHILD_DEVICES: false,
};
function StreamDeckPedalFactory(device, options) {
const events = new callback_hook_js_1.CallbackHook();
return new base_js_1.StreamDeckBase(device, options, {
deviceProperties: pedalProperties,
events,
properties: new pedal_js_1.PedalPropertiesService(device),
buttonsLcd: new fake_js_1.FakeLcdService(),
lcdSegmentDisplay: null,
inputService: new gen1_js_1.ButtonOnlyInputService(pedalProperties, events),
encoderLed: null,
});
}
//# sourceMappingURL=pedal.js.map