Clears all the SegM8 modules, i.e., turns off all their segments.
clear
@/clear
Clears all the SegM8 modules, i.e., turns off all their segments.
DEV@/segm8-device
The SegM8 device.
UPDpulse
Triggers a new clear.
DONEpulse
Pulses when the clear is done.
DEV'@/segm8-device
The SegM8 device.
To use the node in your project you should have the amperka/segm8 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 {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
auto chain = getValue<input_DEV>(ctx);
if (isSettingUp())
emitValue<output_DEVU0027>(ctx, chain);
if(isInputDirty<input_UPD>(ctx)) {
chain->clear();
emitValue<output_DONE>(ctx, true);
}
}