Activate - Desactivate all devices.
matrix-set-all
@/matrix-set-all
Activate - Desactivate all devices.
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.
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);
}