bool32.rising trig
bool32.pulse oneclick
bool32.pulse doubleclick
spinner time
uint32_t count;
bool trig;
bool doit;
outlet_oneclick = 0;
outlet_doubleclick = 0;
if (doit) {
count++;
if (count >= attr_time) {
outlet_oneclick = 1;
doit = 0;
}
if (inlet_trig && !trig) {
doit = 0;
if (count < attr_time) {
outlet_doubleclick = 1;
trig = 1;
}
}
}
if (inlet_trig && !trig) {
trig = 1;
doit = 1;
count = 0;
}
if (!inlet_trig)
trig = 0;