mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
Clean up edge detection logic in ButtonScheduler subclasses (#1340)
This also changes the behavior of whileActive to call start once on the starting edge instead of every loop iteration.
This commit is contained in:
committed by
Peter Johnson
parent
6171856020
commit
a732854866
@@ -23,9 +23,6 @@ class CancelButtonScheduler : public ButtonScheduler {
|
||||
CancelButtonScheduler& operator=(CancelButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
|
||||
private:
|
||||
bool pressedLast;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -23,9 +23,6 @@ class ToggleButtonScheduler : public ButtonScheduler {
|
||||
ToggleButtonScheduler& operator=(ToggleButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
|
||||
private:
|
||||
bool pressedLast;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
Reference in New Issue
Block a user