WPILibC++  2020.3.2-60-g3011ebe
StartCommand.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 #include "frc/commands/InstantCommand.h"
11 
12 namespace frc {
13 
14 class StartCommand : public InstantCommand {
15  public:
16  explicit StartCommand(Command* commandToStart);
17  virtual ~StartCommand() = default;
18 
19  StartCommand(StartCommand&&) = default;
20  StartCommand& operator=(StartCommand&&) = default;
21 
22  protected:
23  virtual void Initialize();
24 
25  private:
26  Command* m_commandToFork;
27 };
28 
29 } // namespace frc
frc::StartCommand
Definition: StartCommand.h:14
frc::Command
The Command class is at the very core of the entire command framework.
Definition: Command.h:49
frc::InstantCommand
This command will execute once, then finish immediately afterward.
Definition: InstantCommand.h:24
frc::StartCommand::Initialize
virtual void Initialize()
The initialize method is called the first time this Command is run after being started.
frc
A class that enforces constraints on the differential drive kinematics.
Definition: PDPSim.h:16