Revert change in behavior in HeldButtonScheduler (#1381)

Originally, the command was restarted every time the scheduler was
executed if the button was pressed. #1340 changed this behavior in a
breaking manner.
This commit is contained in:
Tyler Veness
2018-10-20 21:25:37 -07:00
committed by Peter Johnson
parent 7c1a7332e1
commit 0a2ab4f0d7
2 changed files with 2 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ HeldButtonScheduler::HeldButtonScheduler(bool last, Trigger* button,
void HeldButtonScheduler::Execute() {
bool pressed = m_button->Grab();
if (!m_pressedLast && pressed) {
if (pressed) {
m_command->Start();
} else if (m_pressedLast && !pressed) {
m_command->Cancel();