Figure 6—This is the debouncing algorithm in the trigger mechanism.