HAL Component — MULTICLICKV2
INSTANTIABLE COMPONENTS — General
All instantiable components can be loaded in two manners
Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)
multiclickv2 — Single-, double-, triple-, and quadruple-click detector
newinst multiclickv2 <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]
( args in [ ] denote possible args and parameters, may not be used in all components )
A click is defined as a rising edge on the 'in' pin, followed by the 'in' pin being True for at most 'max-hold-ns' nanoseconds, followed by a falling edge.
A double-click is defined as two clicks, separated by at most 'max-space-ns' nanoseconds with the 'in' pin in the False state.
I bet you can guess the definition of triple- and quadruple-click.
You probably want to run the input signal through a debounce component before feeding it to the multiclick detector, if the input is at all noisy.
The '*-click' pins go high as soon as the input detects the correct number of clicks.
The '*-click-only' pins go high a short while after the click, after the click separator space timeout has expired to show that no further click is coming. This is useful for triggering halui MDI commands.
multiclickv2.N.funct ( OR <newinstname>.funct )
Detect single-, double-, triple-, and quadruple-clicks