Open
Description
Steps to reproduce
Create a capability that exceeds the maximum DMX value, like so:
"Mode": {
"defaultValue": 0,
"capabilities": [
{
"dmxRange": [0, 239],
"type": "NoFunction"
},
{
"dmxRange": [240, 299],
"type": "Effect",
"effectName": "Sound-active",
"soundControlled": true
}
]
}
The fixture valid test fails, but primarily because of an error thrown in scale-dmx-values
module.
[FAIL] boomtonedj/silentpar-7x10w-5in1.json
└ Error: File could not be imported into model. Error: Given DMX value was outside the given resolution
at getBytes (/home/felix/Development/open-fixture-library/lib/scale-dmx-values.mjs:105:11)
at scaleDmxRangeIndividually (/home/felix/Development/open-fixture-library/lib/scale-dmx-values.mjs:44:20)
at scaleDmxRange (/home/felix/Development/open-fixture-library/lib/scale-dmx-values.mjs:31:10)
at Capability.getDmxRangeWithResolution (/home/felix/Development/open-fixture-library/lib/model/Capability.mjs:313:72)
at Capability.get rawDmxRange [as rawDmxRange] (/home/felix/Development/open-fixture-library/lib/model/Capability.mjs:302:17)
at checkRangeValid (/home/felix/Development/open-fixture-library/tests/fixture-valid.js:484:19)
at checkDmxRange (/home/felix/Development/open-fixture-library/tests/fixture-valid.js:462:14)
at checkCapabilities (/home/felix/Development/open-fixture-library/tests/fixture-valid.js:447:31)
at checkChannel (/home/felix/Development/open-fixture-library/tests/fixture-valid.js:415:5)
at checkChannels (/home/felix/Development/open-fixture-library/tests/fixture-valid.js:368:9)
Expected behavior
The error should be catched directly by the fixture-valid test, so that the error string includes information about which channel and which capability is affected.