@xkeys-lib/core
Version:
NPM package to interact with the X-keys panels
1,054 lines • 29.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PRODUCTS = exports.BackLightType = exports.XKEYS_VENDOR_ID = void 0;
const lib_1 = require("./lib");
/*
* This file contains information about the various X-keys panels
*/
exports.XKEYS_VENDOR_ID = 1523;
var BackLightType;
(function (BackLightType) {
/** No back lights */
BackLightType[BackLightType["NONE"] = 0] = "NONE";
/** Legacy LED:s, blue and red backlights */
BackLightType[BackLightType["LEGACY"] = 2] = "LEGACY";
/** Only blue light. Is the stick buttons, that requires special mapping. */
BackLightType[BackLightType["STICK_BUTTONS"] = 3] = "STICK_BUTTONS";
/** Backlight LED type 4, is the 40 buttons, map keyIndex-1 to ledIndex */
BackLightType[BackLightType["LINEAR"] = 4] = "LINEAR";
/** Backlight LED type 5 is the RGB 24 buttons */
BackLightType[BackLightType["REMAP_24"] = 5] = "REMAP_24";
/** Backlight LED type 6 is the RGB 2 banks most XKB modules */
BackLightType[BackLightType["RGBx2"] = 6] = "RGBx2";
})(BackLightType = exports.BackLightType || (exports.BackLightType = {}));
exports.PRODUCTS = {
// Note: The byte numbers are byte index (starts with 0) and will be offset from PIE SDK documentation by -2
// the byte index is used to access the exact byte in the data report.
XK24: (0, lib_1.literal)({
name: 'XK-24',
hidDevices: [
[1029, 0],
[1027, 0],
],
bBytes: 4,
bBits: 6,
layouts: [['Keys', 0, 1, 1, 6, 4]],
colCount: 4,
rowCount: 6,
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 6, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XK24RGB: (0, lib_1.literal)({
name: 'XK-24M-RGB',
hidDevices: [[1404, 0]],
bBytes: 4,
bBits: 6,
colCount: 4,
rowCount: 6,
hasPS: true,
backLightType: BackLightType.REMAP_24,
backLight2offset: 0,
timestampByte: 6, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XK4: (0, lib_1.literal)({
name: 'XK-4 Stick',
hidDevices: [
[1127, 0],
[1129, 0],
],
bBytes: 4,
bBits: 1,
colCount: 4,
rowCount: 1,
hasPS: true,
backLightType: BackLightType.STICK_BUTTONS,
backLight2offset: 0,
timestampByte: 6, // ms time since device boot 4 byte BE
}),
XK8: (0, lib_1.literal)({
name: 'XK-8 Stick',
hidDevices: [
[1130, 0],
[1132, 0],
],
bBytes: 4,
bBits: 2,
colCount: 8,
rowCount: 1,
hasPS: true,
backLightType: BackLightType.STICK_BUTTONS,
backLight2offset: 0,
timestampByte: 6,
btnLocation: [
[0, 0],
[1, 1],
[1, 5],
[1, 2],
[1, 6],
[1, 3],
[1, 7],
[1, 4],
[1, 8],
], // map button index to [Row,Column] 0,0 is program switch
}),
XK16: (0, lib_1.literal)({
name: 'XK-16 Stick',
hidDevices: [
[1049, 0],
[1051, 0],
[1213, 0],
[1216, 0],
],
bBytes: 4,
bBits: 4,
colCount: 16,
rowCount: 1,
hasPS: true,
backLightType: BackLightType.STICK_BUTTONS,
backLight2offset: 0,
timestampByte: 6,
btnLocation: [
[0, 0],
[1, 1],
[1, 5],
[1, 9],
[1, 13],
[1, 2],
[1, 6],
[1, 10],
[1, 14],
[1, 3],
[1, 7],
[1, 11],
[1, 15],
[1, 4],
[1, 8],
[1, 12],
[1, 16],
],
}),
XK12JOG: (0, lib_1.literal)({
name: 'XK-12 Jog-Shuttle',
hidDevices: [
[1062, 0],
[1064, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4,
rowCount: 3,
hasPS: true,
hasJog: [{ jogByte: 6 }],
hasShuttle: [{ shuttleByte: 7 }],
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 8, // ms time since device boot 4 byte BE
}),
XK12JOYSTICK: (0, lib_1.literal)({
name: 'XK-12 Joystick',
hidDevices: [
[1065, 0],
[1067, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4,
rowCount: 3,
hasPS: true,
hasJoystick: [
{
joyXbyte: 6,
joyYbyte: 7,
joyZbyte: 8, //Joystick Z motion, twist of stick, absolute 0 to 255, rolls over,
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 12,
}),
XK68JOYSTICK: (0, lib_1.literal)({
name: 'XK-68 Joystick',
hidDevices: [
[1117, 0],
[1119, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Joystick', 0, 4, 4, 6, 7],
],
colCount: 10,
rowCount: 8,
hasPS: true,
hasJoystick: [
{
joyXbyte: 14,
joyYbyte: 15,
joyZbyte: 16, //Joystick Z motion, twist of stick, absolute 0 to 255, rolls over
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 18,
disableButtons: [28, 29, 30, 36, 37, 38, 44, 45, 46, 52, 53, 54], // these are the index of the "hole" created by the joystick in the center, they will always be 0
}),
XKR32: (0, lib_1.literal)({
// discontinued product, XKE 40 is viable replacement
name: 'XKR-32',
hidDevices: [
[1279, 0],
[1282, 0],
],
bBytes: 4,
bBits: 8,
colCount: 16,
rowCount: 2,
hasPS: false,
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKE40: (0, lib_1.literal)({
name: 'XKE-40',
hidDevices: [
[1355, 0],
[1356, 0],
[1357, 0],
[1358, 0],
[1359, 0],
[1360, 0],
[1361, 0],
],
bBytes: 5,
bBits: 8,
colCount: 20,
rowCount: 2,
hasPS: true,
backLightType: BackLightType.LINEAR,
backLight2offset: 40,
timestampByte: 31,
btnLocation: [
[0, 0],
[1, 1],
[1, 2],
[1, 3],
[1, 4],
[1, 5],
[1, 6],
[1, 7],
[1, 8],
[1, 9],
[1, 10],
[1, 11],
[1, 12],
[1, 13],
[1, 14],
[1, 15],
[1, 16],
[1, 17],
[1, 18],
[1, 19],
[1, 20],
[2, 1],
[2, 2],
[2, 3],
[2, 4],
[2, 5],
[2, 6],
[2, 7],
[2, 8],
[2, 9],
[2, 10],
[2, 11],
[2, 12],
[2, 13],
[2, 14],
[2, 15],
[2, 16],
[2, 17],
[2, 18],
[2, 19],
[2, 20],
],
}),
XK60: (0, lib_1.literal)({
name: 'XK-60',
hidDevices: [
[1121, 0],
[1123, 0],
[1231, 0],
[1234, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 2, 10],
['Keys', 1, 4, 1, 8, 20],
['Keys', 2, 4, 4, 8, 7],
['Keys', 3, 4, 9, 8, 10],
],
colCount: 10,
rowCount: 8,
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 12, // ms time since device boot 4 byte BE
//disableButtons: [2,10,18,26,34,42,50,58,66,74,19,20,21,22,23,59,60,61,] // these buttons are not installed on the 60 button unit, these bytes will always be 0.
}),
XK80: (0, lib_1.literal)({
name: 'XK-80',
hidDevices: [
[1089, 0],
[1091, 0],
[1217, 0],
[1220, 0],
],
bBytes: 10,
bBits: 8,
colCount: 10,
rowCount: 8,
hasPS: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 12, // ms time since device boot 4 byte BE
}),
XKE124TBAR: (0, lib_1.literal)({
name: 'XKE-124 T-bar',
hidDevices: [
[1275, 0],
[1278, 0],
],
bBytes: 16,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 16],
['Tbar', 0, 5, 14, 8, 14],
],
colCount: 16,
rowCount: 8,
hasPS: false,
hasTbar: [
{
tbarByte: 28, //this gives a clean 0-255 value
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 128,
//timeStamp: 31, // the XKE-124 T-bar has no time stamp for technical reasons
disableButtons: [109, 110, 111, 112],
}),
XKE128: (0, lib_1.literal)({
name: 'XKE-128',
hidDevices: [
[1227, 0],
[1230, 0],
],
bBytes: 16,
bBits: 8,
colCount: 16,
rowCount: 8,
hasPS: false,
backLightType: BackLightType.LEGACY,
backLight2offset: 128,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKMatrix: (0, lib_1.literal)({
name: 'XK-128 Matrix',
hidDevices: [
[1030, 0],
[1032, 0],
],
bBytes: 16,
bBits: 8,
colCount: 16,
rowCount: 8,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 18, // ms time since device boot 4 byte BE
// many buttons may be disabled or not as the custom wiring determines this.
// to prevent phantom buttons, external diodes may be required, if diodes not used the board may be set by write command 215, see documentation
}),
XK68JOGSHUTTLE: (0, lib_1.literal)({
name: 'XK-68 Jog-Shuttle',
hidDevices: [
[1114, 0],
[1116, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Jog-Shuttle', 0, 6, 4, 8, 7],
],
colCount: 10,
rowCount: 8,
hasPS: true,
hasJog: [{ jogByte: 16 }],
hasShuttle: [{ shuttleByte: 17 }],
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 18,
disableButtons: [30, 31, 32, 38, 39, 40, 46, 47, 48, 54, 55, 56],
}),
XK3FOOT: (0, lib_1.literal)({
name: 'XK-3 Foot Pedal',
hidDevices: [
[1080, 0],
[1082, 0],
],
bBytes: 1,
bBits: 4,
colCount: 3,
rowCount: 1,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 18,
btnLocation: [
[0, 0],
[0, 0],
[1, 1],
[1, 2],
[1, 3],
],
disableButtons: [1],
}),
XK3SI: (0, lib_1.literal)({
name: 'XK-3 Switch Interface',
hidDevices: [
[1221, 0],
[1224, 0],
],
bBytes: 1,
bBits: 5,
colCount: 3,
rowCount: 1,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 31,
btnLocation: [
[0, 0],
[1, 1],
[1, 2],
[1, 0],
[2, 0],
[1, 3],
],
disableButtons: [4], // Exclude index 4, redundant on index 3, note some or all of the buttons may be triggered when plugging switch into 3.5 mm socket
}),
XK12SI: (0, lib_1.literal)({
name: 'XK-12 Switch Interface',
hidDevices: [
[1192, 0],
[1195, 0],
],
bBytes: 2,
bBits: 8,
layouts: [
['SwitchPorts', 0, 1, 1, 2, 3],
['SwitchPorts', 1, 1, 4, 2, 6],
],
colCount: 6,
rowCount: 2,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 31,
btnLocation: [
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
[2, 5],
[1, 5],
[2, 6],
[1, 6],
], // column indicates port #, mono plugs map to row 1, stereo plugs to row 1 and 2
// due to the stereo jack some buttons may always be down when a single pole (mono) plug is plugged in.
}),
XKHD15WI: (0, lib_1.literal)({
name: 'XK-HD15 Wire Interface',
hidDevices: [
[1244, 0],
[1247, 0],
],
bBytes: 2,
bBits: 8,
colCount: 1,
rowCount: 14,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKHD15GPIO: (0, lib_1.literal)({
name: 'XK-HD15 GPIO',
hidDevices: [
[1351, 0],
[1354, 0],
],
bBytes: 2,
bBits: 8,
colCount: 1,
rowCount: 14,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
hasGPIO: true,
timestampByte: 31, // ms time since device boot 4 byte BE
//The input data will always be in the 2 data bytes described, but this device may be configured in several ways
// it is best to Query the device and get its current setup data, using GetIoConfiguration function
}),
XCRS232: (0, lib_1.literal)({
name: 'XC-RS232-DB9',
hidDevices: [
[1257, 0],
[1260, 0],
],
bBytes: 2,
bBits: 8,
layouts: [
['SwitchPorts', 0, 1, 1, 2, 3],
['SwitchPorts', 1, 1, 4, 2, 6],
],
colCount: 3,
rowCount: 4,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
hasSerialData: true,
btnLocation: [
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
[2, 5],
[1, 5],
[2, 6],
[1, 6],
], // column indicates port #, mono plugs map to row 1, stereo plugs to row 1 and 2
//The Serial data will come on a special message with byte 1 id of 216, see documentation
}),
XCDMX512TST: (0, lib_1.literal)({
name: 'XC-DMX512-T ST',
hidDevices: [[1324, 0]],
bBytes: 2,
bBits: 8,
colCount: 6,
rowCount: 2,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
hasDMX: true,
//Sends DMX512 Data, see documentation
}),
XCDMX512TRJ45: (0, lib_1.literal)({
name: 'XC-DMX512-T RJ45',
hidDevices: [[1225, 0]],
bBytes: 1,
bBits: 8,
colCount: 4,
rowCount: 2,
hasPS: false,
backLightType: BackLightType.NONE,
backLight2offset: 0,
hasDMX: true,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
//Sends DMX512 Data to DMX512 devices on the , see documentation
}),
XK16LCD: (0, lib_1.literal)({
name: 'XK-16 LCD',
hidDevices: [
[1316, 0],
[1317, 0],
[1318, 0],
[1319, 0],
[1320, 0],
[1321, -1],
[1322, 0],
],
bBytes: 4,
bBits: 4,
colCount: 4,
rowCount: 4,
hasPS: true,
hasLCD: true,
backLightType: BackLightType.LEGACY,
backLight2offset: 32,
timestampByte: 31, // ms time since device boot 4 byte BE
}),
XKE180BROAD: (0, lib_1.literal)({
name: 'XKE-180 Broadcast Keyboard',
hidDevices: [[1443, 0]],
bBytes: 31,
bBits: 7,
layouts: [
['Keys', 0, 1, 1, 2, 24],
['Keys', 1, 3, 1, 8, 2],
['QWERTY-77', 0, 3, 3, 8, 17],
['Keys', 2, 3, 18, 8, 20],
['NumPad-24', 0, 3, 21, 8, 24],
],
colCount: 24,
rowCount: 8,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 36, // ms time since device boot 4 byte BE
}),
XK64JOGTBAR: (0, lib_1.literal)({
name: 'XKE-64 Jog T-bar',
hidDevices: [
[1325, 0],
[1326, 0],
[1327, 0],
[1328, 0],
[1329, 0],
[1330, 0],
[1331, 0],
],
bBytes: 10,
bBits: 8,
layouts: [
['Keys', 0, 1, 1, 8, 10],
['Jog-Shuttle', 0, 6, 1, 8, 4],
['Tbar', 0, 1, 10, 4, 10],
],
colCount: 10,
rowCount: 8,
hasPS: false,
hasJog: [{ jogByte: 18 }],
hasShuttle: [{ shuttleByte: 19 }],
hasTbar: [
{
tbarByte: 17,
},
],
backLightType: BackLightType.LEGACY,
backLight2offset: 80,
timestampByte: 31,
disableButtons: [6, 7, 8, 14, 15, 16, 22, 23, 24, 30, 31, 32, 73, 74, 75, 73], // These bits are messy, better to ignore them
}),
XBK4X6: (0, lib_1.literal)({
//new product, expected release Q4 2022
name: 'X-blox XBK-4x6 Module',
hidDevices: [
[1365, 0],
[1366, 0],
[1367, 0],
[1368, 0],
[1369, 0],
[1370, 0],
[1371, 0],
],
bBytes: 4,
bBits: 6,
colCount: 4,
rowCount: 6,
hasPS: false,
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK3X6: (0, lib_1.literal)({
//new product, expected release Q4 2022
name: 'X-blox XBK-3x6 Module',
hidDevices: [
[1378, 0],
[1379, 0],
[1380, 0],
[1381, 0],
[1382, 0],
[1383, 0],
[1384, 0],
],
bBytes: 3,
bBits: 6,
colCount: 3,
rowCount: 6,
hasPS: false,
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA4X3JOG: (0, lib_1.literal)({
//new product, expected release Q4 2022
name: 'X-blox XBA-4x3 Jog-Shuttle Module',
hidDevices: [
[1388, 0],
[1389, 0],
[1390, 0],
[1391, 0],
[1392, 0],
[1393, 0],
[1394, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4,
rowCount: 3,
hasPS: false,
hasJog: [{ jogByte: 12 }],
hasShuttle: [{ shuttleByte: 13 }],
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA3X6TBAR: (0, lib_1.literal)({
//new product, expected release Q4 2022
name: 'X-blox XBA-3x6 T-bar Module',
hidDevices: [
[1396, 0],
[1397, 0],
[1398, 0],
[1399, 0],
[1400, 0],
[1401, 0],
[1402, 0],
],
bBytes: 3,
bBits: 6,
colCount: 3,
rowCount: 6,
hasPS: false,
hasTbar: [
{
tbarByte: 8, // value Was incorrect, 8 is correct
},
],
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBA4X3TRACKBALL: (0, lib_1.literal)({
//new product, expected release Q4 2022
name: 'X-blox XBA-4x3 Trackball Module',
hidDevices: [
[1488, 0],
[1489, 0],
[1490, 0],
[1491, 0],
[1492, 0],
[1493, 0],
[1494, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4,
rowCount: 3,
hasPS: false,
hasTrackball: [
{
trackXbyte_L: 7,
trackXbyte_H: 8,
trackYbyte_L: 9,
trackYbyte_H: 10, //Delta Y motion, High byte of 2 byte date, Y ball motion = 256*DELTA_Y_H + DELTA_Y_L.
},
],
// this handles extra button like would be beside the track ball.
hasExtraButtons: [
{
ebByte: 5,
ebBit: 3, // the bit of the extra button
},
{
ebByte: 5,
ebBit: 4, // the bit of the extra button
},
],
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK_QWERTY: (0, lib_1.literal)({
//new product, expected release Q1 2023
name: 'X-blox XBK-QWERTY Module',
hidDevices: [
[1343, 0],
[1344, 0],
[1345, 0],
[1346, 0],
[1347, 0],
[1348, 0],
[1349, 0],
],
bBytes: 32,
bBits: 6,
layouts: [
['Keys', 0, 1, 1, 6, 8],
['QWERTY-85', 0, 1, 9, 6, 24],
['Keys', 1, 1, 25, 6, 32], // right side satellite keys, optional
],
colCount: 32,
rowCount: 6,
hasPS: false,
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 36, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XBK16X6: (0, lib_1.literal)({
//new product, expected release Q1 2023
name: 'X-blox XBK-16x6 Module',
hidDevices: [
[1496, 0],
[1497, 0],
[1498, 0],
[1499, 0],
[1500, 0],
[1501, 0],
[1502, 0],
],
bBytes: 16,
bBits: 6,
colCount: 16,
rowCount: 6,
hasPS: false,
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XCDRCSERVO: (0, lib_1.literal)({
//new product, expected release Q1 2023
name: 'XC-RC Servo',
hidDevices: [[1364, 0]],
bBytes: 1,
bBits: 8,
colCount: 4,
rowCount: 2,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
}),
XCRELAY: (0, lib_1.literal)({
//prototype product,
name: 'XC-Relay',
hidDevices: [[1363, 0]],
bBytes: 1,
bBits: 8,
colCount: 4,
rowCount: 2,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
}),
XCMOTORDRIVER: (0, lib_1.literal)({
//prototype product,
name: 'XC-Motor Driver',
hidDevices: [[1456, 0]],
bBytes: 1,
bBits: 8,
colCount: 4,
rowCount: 2,
hasPS: true,
hasGPIO: true,
hasADC: [
{
adcByte_L: 6,
adcByte_H: 7, //ADC Value, High byte of 2 byte date,
},
{
adcByte_L: 8,
adcByte_H: 9, //ADC Value, High byte of 2 byte date,
},
{
adcByte_L: 10,
adcByte_H: 11, //ADC Value, High byte of 2 byte date,
},
{
adcByte_L: 12,
adcByte_H: 13, //ADC Value, High byte of 2 byte date,
},
],
backLightType: BackLightType.NONE,
backLight2offset: 0,
btnLocation: [
// columns are port number and row 1 is the first switch on the port and 2 is second
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
],
}),
XBA4X3TRACKPAD: (0, lib_1.literal)({
//prototype product,
name: 'X-blox XBA-Track Pad Module',
hidDevices: [
[1422, 0],
[1423, 0],
[1424, 0],
[1425, 0],
[1426, 0],
[1427, 0],
[1428, 0],
],
bBytes: 4,
bBits: 3,
colCount: 4,
rowCount: 3,
hasPS: false,
hasTrackpad: [
{
padXbyte_L: 6,
padXbyte_H: 7,
padYbyte_L: 8,
padYbyte_H: 9,
pinchByte: 10,
scrollByte: 11, // the index of the scroll byte
},
],
backLightType: BackLightType.RGBx2,
backLight2offset: 0,
timestampByte: 31, // index of first of 4 bytes, ms time since device boot, 4 byte BE
}),
XK433REMOTE: (0, lib_1.literal)({
//prototype product,
name: 'XK-433RF Remote',
hidDevices: [
[1505, 0],
[1506, 0],
[1507, 0],
[1508, 0],
[1509, 0],
[1510, 0],
],
bBytes: 2,
bBits: 8,
layouts: [
['Remote', 0, 1, 1, 2, 4],
['SwitchPorts', 0, 1, 1, 2, 2],
['SwitchPorts', 1, 1, 3, 2, 4],
],
colCount: 4,
rowCount: 2,
hasPS: true,
backLightType: BackLightType.NONE,
backLight2offset: 0,
timestampByte: 31,
btnLocation: [
[0, 0],
[2, 1],
[1, 1],
[2, 2],
[1, 2],
[2, 3],
[1, 3],
[2, 4],
[1, 4],
[2, 5],
[1, 5],
[2, 6],
[1, 6],
], // column indicates port #, mono plugs map to row 1, stereo plugs to row 1 and 2
// due to the stereo jack some buttons may always be down when a single pole (mono) plug is plugged in.
}),
RailDriver: (0, lib_1.literal)({
//In production: www.raildriver.com
name: 'RailDriver Cab Controller',
hidDevices: [
[210, 0],
[210, -1],
],
bBytes: 6,
bBits: 8,
layouts: [
['Cab Buttons', 0, 1, 1, 2, 4],
['Horn', 0, 1, 3, 2, 3],
['Reverser', 0, 1, 4, 4, 4],
['Throttle', 0, 1, 5, 4, 5],
['Auto Brake', 0, 1, 6, 4, 6],
['Ind Brake', 0, 1, 7, 4, 7],
['Bail Off', 0, 1, 8, 4, 8],
['Wiper', 0, 1, 9, 4, 9],
['Lights', 0, 3, 9, 4, 9],
],
colCount: 6,
rowCount: 8,
hasPS: false,
hasTbar: [
// the raildriver has 5 lever controls, we will call them T-bars for this mapping
{
tbarByte: 8, //Reverser Lever
},
{
tbarByte: 9, //Throttle Lever
},
{
tbarByte: 10, //Auto Brake Lever
},
{
tbarByte: 11, //Independent Brake
},
//{
// tbarByte: 12, //Bail Off, moving Ind Brake to Right, this is changed to a single bit in the remapping.
//},
],
hasRotary: [
// the raildriver has 2 rotary controls,
{
rotaryByte: 12, //Upper twist knob
},
{
rotaryByte: 13, //Lower twist knob
},
],
backLightType: BackLightType.NONE,
backLight2offset: 0,
//timestamp: none, RailDriver has no time stamp
}),
};
//# sourceMappingURL=products.js.map