elgato-stream-deck
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -5,2 +5,9 @@ # Changelog | ||
### [4.2.1](https://github.com/julusian/node-elgato-stream-deck/compare/v4.2.0...v4.2.1) (2022-07-25) | ||
### Bug Fixes | ||
* mini-rev2 ([a97e0bb](https://github.com/julusian/node-elgato-stream-deck/commit/a97e0bbe4c73abdaa7aeac38875dae4e10ae8533)) | ||
## [4.2.0](https://github.com/julusian/node-elgato-stream-deck/compare/v4.1.0...v4.2.0) (2022-07-08) | ||
@@ -7,0 +14,0 @@ |
@@ -68,3 +68,3 @@ "use strict"; | ||
class: models_1.StreamDeckMiniV2, | ||
} | ||
}, | ||
]; | ||
@@ -71,0 +71,0 @@ function openStreamDeck(devicePath, userOptions) { |
@@ -1,6 +0,11 @@ | ||
import { OpenStreamDeckOptions } from './base'; | ||
import { StreamDeckGen2Base } from './base-gen2'; | ||
import { StreamDeckDeviceInfo } from './id'; | ||
export declare class StreamDeckMiniV2 extends StreamDeckGen2Base { | ||
/// <reference types="node" /> | ||
import { OpenStreamDeckOptions, StreamDeckBase, InternalFillImageOptions } from './base'; | ||
import { KeyIndex, StreamDeckDeviceInfo } from './id'; | ||
export declare class StreamDeckMiniV2 extends StreamDeckBase { | ||
constructor(deviceInfo: StreamDeckDeviceInfo, options: OpenStreamDeckOptions); | ||
protected transformKeyIndex(keyIndex: KeyIndex): KeyIndex; | ||
protected convertFillImage(sourceBuffer: Buffer, sourceOptions: InternalFillImageOptions): Buffer; | ||
protected getFillImagePacketLength(): number; | ||
private rotateCoordinates; | ||
getSerialNumber(): string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StreamDeckMiniV2 = void 0; | ||
const base_gen2_1 = require("./base-gen2"); | ||
const util_1 = require("../util"); | ||
const base_1 = require("./base"); | ||
const id_1 = require("./id"); | ||
const miniV2Properties = { | ||
MODEL: id_1.DeviceModelId.MINIV2, | ||
MODEL: id_1.DeviceModelId.MINI, | ||
COLUMNS: 3, | ||
@@ -12,10 +13,27 @@ ROWS: 2, | ||
KEY_DIRECTION: 'ltr', | ||
KEY_DATA_OFFSET: 4 | ||
KEY_DATA_OFFSET: 1, | ||
}; | ||
class StreamDeckMiniV2 extends base_gen2_1.StreamDeckGen2Base { | ||
class StreamDeckMiniV2 extends base_1.StreamDeckBase { | ||
constructor(deviceInfo, options) { | ||
super(deviceInfo, options, miniV2Properties); | ||
} | ||
transformKeyIndex(keyIndex) { | ||
return keyIndex; | ||
} | ||
convertFillImage(sourceBuffer, sourceOptions) { | ||
const byteBuffer = util_1.imageToByteArray(sourceBuffer, sourceOptions, util_1.BMP_HEADER_LENGTH, this.rotateCoordinates.bind(this), 'bgr', this.ICON_SIZE); | ||
util_1.writeBMPHeader(byteBuffer, this.ICON_SIZE, this.ICON_BYTES, 2835); | ||
return byteBuffer; | ||
} | ||
getFillImagePacketLength() { | ||
return 1024; | ||
} | ||
rotateCoordinates(x, y) { | ||
return { x: this.ICON_SIZE - y - 1, y: x }; | ||
} | ||
getSerialNumber() { | ||
return util_1.numberArrayToString(this.getFeatureReport(3, 32).slice(5, 17)); | ||
} | ||
} | ||
exports.StreamDeckMiniV2 = StreamDeckMiniV2; | ||
//# sourceMappingURL=miniv2.js.map |
{ | ||
"name": "elgato-stream-deck", | ||
"version": "4.2.0", | ||
"version": "4.2.1", | ||
"description": "An npm module for interfacing with the Elgato Stream Deck", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93206
980