I hope someone can help me out here. Either with a correction to existing code or a new way of implementing a "double push" function.
I have a button connected to a HW unit that I want to initiate different functions, depending if there is a "1 push" or a "double push" (2 pushes within 500 millisec)
I have written these code lines for a function that should detect a 1 push or 2 pushes of the HW button.
the 500 millisec is set in the TIMER_VALUES
S_Button_S is state of button and start as a "0" before any pushes
SPD_Knob = 1 is a 1 push
SPD_Knob = 2 is a 2 push