matrix-set-all

cesars/matrix/matrix-set-all

Activate - Desactivate all devices.
matrix-set-all
@/matrix-set-all
Activate - Desactivate all devices.
72XX@/matrix-dev
Input from Dev
BRIGHTnumber
LED intensity.
ACTboolean
True=Activate                False=Desactivate
SETpulse
Pulse setting
matrix-set-all
72XX
BRIGHT
ACT
SET
72XX'
DONE
DONEpulse
Pulse Done
72XX'@/matrix-dev
To use the node in your project you should have the cesars/matrix library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {

    emitValue<output_72XXU0027>(ctx, getValue<input_72XX>(ctx));
    if (!isInputDirty<input_SET>(ctx))
        return;

    auto led = getValue<input_72XX>(ctx);

    for(uint8_t idx=0;idx<led->getDeviceCount();idx++)
      {
        led->setIntensity(idx,(uint8_t)getValue<input_BRIGHT>(ctx));
      }

    if(getValue<input_ACT>(ctx))
    {
      for(uint8_t idx=0;idx<led->getDeviceCount();idx++) {led->shutdown(idx,false);}
    }
    else
    {
      for(uint8_t idx=0;idx<led->getDeviceCount();idx++) {led->shutdown(idx, true);}
    }

    emitValue<output_DONE>(ctx, 1);

}