OpenLightingProject / open-fixture-library

A library and website for lighting technology's DMX fixture definition files.
https://open-fixture-library.org/
MIT License
193 stars 64 forks source link

Validation suggestion: StrobeSpeed + ShutterStrobe #3981

Open kengruven opened 4 months ago

kengruven commented 4 months ago

There are many fixtures (and proposed fixtures) which are written with capabilities like this:

        {
          "dmxRange": [128, 250],
          "type": "StrobeSpeed",
          "speedStart": "1Hz",
          "speedEnd": "20Hz"
        },
        {
          "dmxRange": [251, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Open"
        }

which is almost certainly wrong: StrobeSpeed is a global setting, not an enabler of the strobe feature, so a sibling capability of type ShutterStrobe is indicative that this isn't what was intended.

In the above case, it should be:

        {
          "dmxRange": [128, 250],
          "type": "ShutterStrobe",
          "shutterEffect": "Strobe",
          "speedStart": "1Hz",
          "speedEnd": "20Hz"
        },
        {
          "dmxRange": [251, 255],
          "type": "ShutterStrobe",
          "shutterEffect": "Open"
        }

It would be great if we could catch this mistake earlier (in the editor, or the validator) so we didn't end up with a bunch of these to fix in review, or which accidentally pass review and end up in OFL.