Open peqoud opened 6 years ago
https://gpiozero.readthedocs.io/en/stable/api_input.html#button
Define hold time until first event hold_time (float) hold_repeat(bool) = true
--> when_held() is done like this first event = Next/Previous Track (dont execute) Second Event = Forwards X seconds (immediate execute) Release of button before second event --> Execute Next/previous track Release of button after second event --> Nothing - Reset system
The buttons for next / prev shall have a second use-case: Pressed for more then x seconds, they shall to a fast forward. Short press shall do the current behaviour of going to next or previous track on the playlist
https://github.com/peqoud/RPi-Jukebox-RFID/blob/1d6dbe0c41ccfb27bd952032d4754d55ffbf596f/scripts/jukebox_control.py#L141