From 28cfe038711d89715beb1d060c12b94d249908ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9as=20HANSS?= Date: Mon, 29 May 2023 12:05:59 +0200 Subject: [PATCH] Add Channel value checker --- src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index a7c246a..d0277e9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -125,6 +125,15 @@ export class EnttecOpenDMXUSBDevice extends EventEmitter { } else throw new TypeError("data must be of type Buffer, Object or Array.") } + /** + * Return the current buffer value for a given channel (used to animations). + * @param channel + * @returns + */ + getChannelValue(channel: number): number { + return this.buffer[channel] + } + /** * @returns A Promise resolved when the whole universe was sent. * @private