From 579f278e0728d39821e5ceebe1a41a0ba10aece2 Mon Sep 17 00:00:00 2001 From: newcat Date: Sun, 3 Mar 2024 10:52:11 +0100 Subject: [PATCH] Added DMX control panel --- .../controllers/dmx/DmxControllerSettings.vue | 10 ++- src/stage/controllers/dmx/DmxPanel.vue | 67 +++++++++++++++++++ src/stage/fixtures/dmx/dmx.fixture.ts | 5 ++ 3 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 src/stage/controllers/dmx/DmxPanel.vue diff --git a/src/stage/controllers/dmx/DmxControllerSettings.vue b/src/stage/controllers/dmx/DmxControllerSettings.vue index cdff5b2..9ed7153 100644 --- a/src/stage/controllers/dmx/DmxControllerSettings.vue +++ b/src/stage/controllers/dmx/DmxControllerSettings.vue @@ -1,19 +1,27 @@ diff --git a/src/stage/controllers/dmx/DmxPanel.vue b/src/stage/controllers/dmx/DmxPanel.vue new file mode 100644 index 0000000..deb1ba6 --- /dev/null +++ b/src/stage/controllers/dmx/DmxPanel.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/stage/fixtures/dmx/dmx.fixture.ts b/src/stage/fixtures/dmx/dmx.fixture.ts index 26f2293..d17a802 100644 --- a/src/stage/fixtures/dmx/dmx.fixture.ts +++ b/src/stage/fixtures/dmx/dmx.fixture.ts @@ -66,6 +66,11 @@ export class DmxFixture extends BaseFixture { this.name = "DMX Fixture"; } + public override setValue(v: number[]): void { + const normalizedValues = v.map((val) => Math.max(0, Math.min(255, Math.floor(val)))); + super.setValue(normalizedValues); + } + public override resetValue(): void { this.setValue([]); }