touchlocation

ivanmason/gt9271/touchlocation

No description
touchlocation
@/touchlocation
touchlocation
TLOC
TLOC@/touchlocation
To use the node in your project you should have the ivanmason/gt9271 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 {
    uint16_t* x;
    uint16_t* y;
};

struct TouchLocation
{
    uint16_t* x;
    uint16_t* y;
};

using Type = TouchLocation;

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
     auto state = getState(ctx);

    if (isSettingUp()) {
        state->x = new uint16_t[10];
        state->y = new uint16_t[10];
    }

    TouchLocation Touch;

    Touch.x = state->x;
    Touch.y = state->y;

    emitValue<output_TLOC>(ctx, Touch);
}