to-pulse(byte)

koadrobot/casts/to-pulse(byte)

Convert byte to pulse. If input>0 then emit pulse.
to-pulse(byte)
@/to-pulse(byte)
Convert byte to pulse. If input>0 then emit pulse.
INbyte
to-pulse(byte)
OUT
IN
OUTpulse
If input>0 then emit pulse.
To use the node in your project you should have the koadrobot/casts 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

#pragma XOD dirtieness disable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx)
{
    emitValue<output_OUT>(ctx, getValue<input_IN>(ctx) > 0);
}

Tabular tests

INOUT
0no-pulse
1pulse
1pulse
0no-pulse