bool32.rising increment trigger
bool32.rising decrement trigger
int32 output
int encoderPos;
int encoderLast;
int inval;
encoderPos = 0;
encoderLast = 0;
inval = 0;
inval = inlet_trig;
if ((encoderLast == 0) && (inval > 0)) {
if (inlet_dir == 0) {
encoderPos--;
} else {
encoderPos++;
}
}
encoderLast = inval;
outlet_o = encoderPos;