PS4-esp32
PS4-esp32 copied to clipboard
Fix button down and analog move events
There was a bug where the button_up events were setting the button down event variables.
This is a small change to fix that and also only trigger an event if the analog stick is in a different location from where it was the last time. The current code checks if the stick isn't 0. The stick being at 0 could be an event if the previous location of the stick wasn't 0.
This fixes the behaviour described here: #35