bool32.rising start trigger
bool32.rising stop trigger
int32 time interval in k-rate ticks (0.333ms)
int32_t trigstart;
int32_t trigstop;
int32_t tc;
int32_t tlatch;
trigstart = 0;
trigstop = 0;
tlatch = 0;
tc = 0;
if ((inlet_start > 0) && !trigstart) {
tc = 0;
trigstart = 1;
} else if (!(inlet_start > 0)) {
trigstart = 0;
}
if ((inlet_stop > 0) && !trigstop) {
tlatch = tc;
trigstop = 1;
} else if (!(inlet_stop > 0)) {
trigstop = 0;
}
outlet_t = tlatch;
tc++;