defer(adafruitneopixel)

awgrover/adafruitneopixel/defer(adafruitneopixel)

Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
defer(adafruitneopixel)
@/defer(adafruitneopixel)
Allows to create feedback loops. Repeats a change of the input on the output right after the current transaction will complete.
IN@/adafruitneopixel
defer(adafruitneopixel)
IN
OUT
OUT@/adafruitneopixel
To use the node in your project you should have the awgrover/adafruitneopixel 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) {
    if (isInputDirty<input_IN>(ctx)) { // This happens only when all nodes are evaluated
        setTimeout(ctx, 0);
        // This will not have any immediate effect, because
        // deferred nodes are at the very bottom of sorted graph.
        // We do this to just save the value for reemission
        // on deferred-only evaluation.
        emitValue<output_OUT>(ctx, getValue<input_IN>(ctx));
    } else { // deferred-only evaluation pass
        emitValue<output_OUT>(ctx, getValue<output_OUT>(ctx));
    }
}