Button pressed event being called when button toggled off
Harmony Version: v2.06
MPLAB Version: 5.10
I've run into a bit of an issue in the project I'm working on.
I have some buttons which I've set to be toggleable and they work fine when toggling them on and off through the touchscreen.
But whenever I change the state of the button (usually through `button->state = LA_BUTTON_STATE_UP` or `DOWN`) it seems to reset which event should get called.
E.g. If I don't change the state of the button elsewhere and I toggle the button on and then off, I get a button pressed event followed by a button released event.
But if I toggle the button on, and then update the state of the button elsewhere in the code (usually it's the same state, it's just being confirmed) and go to toggle the button off with the touchscreen I'll get another button pressed event, and will have to press it again to get the button released event.
Is there some function I should be calling to change the state without calling the update events rather than just setting the state on the struct itself.