Use enumeration type for the switching delay method (more user friendly)
Correct the tapping direction of the integer output y1