read-keyboard

bradzilla84/visi-genie-extra-library/read-keyboard

No description
read-keyboard
@/read-keyboard
DEVgabbapeople/4d-ulcd/4d-ulcd
a 4D uLCD device
IDXnumber
Object index
read-keyboard
VAL
DONE
DEV
IDX
DONEpulse
VALbyte
To use the node in your project you should have the bradzilla84/visi-genie-extra-library 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 {
    char str[4];
    CStringView view;
    State() : view(str) { }
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto state = getState(ctx);
    auto _genie = getValue<input_DEV>(ctx);

    if (_genie.cmd == 7){
        if (_genie.object == 13){
            if (_genie.index == getValue<input_IDX>(ctx)){
//                sprintf(state->str, "%c", (int) _genie.eventData);
//                emitValue<output_VAL>(ctx,XString(&state->view));
                uint8_t val = _genie.eventData;
                emitValue<output_VAL>(ctx,_genie.eventData);
                emitValue<output_DONE>(ctx, 1);
                }
            }
    }
}