example

czadohubert/analog-joystock/example

No description
example
@/example
example
To use the node in your project you should have the czadohubert/analog-joystock 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

node {
    // Internal state variables defined at this level persists across evaluations
    Number foo;
    uint8_t bar = 5;

    void evaluate(Context ctx) {
        bar += 42;

        if (isSettingUp()) {
            // This run once
            foo = (Number)(bar + 1);
        }

        auto inValue = getValue<input_IN>(ctx);
        emitValue<output_OUT>(ctx, inValue);
    }
}