Skip to content

Commit 8aa6f48

Browse files
committed
Handle Warm/Cold White capabilities in DDF3 plugin correctly
1 parent 6dba32b commit 8aa6f48

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

plugins/dmxcontrol3/ddf3-functions.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,15 @@ export default {
184184
const capabilitiesPerColor = {};
185185

186186
for (const capability of capabilities) {
187-
if (!(capability.color in capabilitiesPerColor)) {
188-
capabilitiesPerColor[capability.color] = [];
187+
let color = capability.color;
188+
if (color === `Warm White` || color === `Cold White`) {
189+
color = `White`;
189190
}
190-
capabilitiesPerColor[capability.color].push(capability);
191+
192+
if (!(color in capabilitiesPerColor)) {
193+
capabilitiesPerColor[color] = [];
194+
}
195+
capabilitiesPerColor[color].push(capability);
191196
}
192197

193198
delete capabilitiesPerColor.null; // NoFunction caps will be ignored

plugins/dmxcontrol3/export.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import SwitchingChannel from '../../lib/model/SwitchingChannel.js';
88
import ddf3FunctionGroups from './ddf3-function-groups.js';
99
import ddf3Functions from './ddf3-functions.js';
1010

11-
export const version = `0.1.0`;
11+
export const version = `0.1.1`;
1212

1313
/**
1414
* @param {Fixture[]} fixtures The fixtures to convert into DMXControl device definitions

0 commit comments

Comments
 (0)