allwpilib
allwpilib copied to clipboard
Add Trigger.onChange()
Is your feature request related to a problem? Please describe. It would be useful to have an onChange event that can occur in triggers so that the same command can execute on both onTrue and onFalse, without having to explicitly write it out twice.
Describe the solution you'd like
A method Trigger::onChange (or similar) which accepts a Command as a parameter, acting the same as
(onTrue or onFalse)
or
(m_pressedLast != pressed)