WPILibC++  2020.3.2-60-g3011ebe
ButtonScheduler.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2011-2019 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 namespace frc {
11 
12 class Trigger;
13 class Command;
14 
16  public:
17  ButtonScheduler(bool last, Trigger* button, Command* orders);
18  virtual ~ButtonScheduler() = default;
19 
20  ButtonScheduler(ButtonScheduler&&) = default;
21  ButtonScheduler& operator=(ButtonScheduler&&) = default;
22 
23  virtual void Execute() = 0;
24  void Start();
25 
26  protected:
27  bool m_pressedLast;
28  Trigger* m_button;
29  Command* m_command;
30 };
31 
32 } // namespace frc
frc::Command
The Command class is at the very core of the entire command framework.
Definition: Command.h:49
frc::Trigger
This class provides an easy way to link commands to inputs.
Definition: Trigger.h:32
frc
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16
frc::ButtonScheduler
Definition: ButtonScheduler.h:15