Renders a tree of graphic elements and display them on the device.
render
@/render
Renders a tree of graphic elements and display them on the device.
DEV@/st7735-device
The display device.
GFXxod/graphics/graphics
A tree of graphic elements created using the xod/graphics library.
DOpulse
Triggers a new rendering process.
DEV'@/st7735-device
The display device.
DONEpulse
Pulses when the rendering process is done.
To use the node in your project you should have the xod-dev/st7735-display 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 {
void evaluate(Context ctx) {
auto dev = getValue<input_DEV>(ctx);
if (isSettingUp())
emitValue<output_DEVU0027>(ctx, dev);
if (!isInputDirty<input_DO>(ctx))
return;
auto gfx = getValue<input_GFX>(ctx);
if (gfx)
gfx->render(dev);
emitValue<output_DONE>(ctx, 1);
}
}