WPILibC++  2020.2.2-33-g65eab93
IterativeRobot.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-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 <atomic>
11 
12 #include "frc/IterativeRobotBase.h"
13 
14 namespace frc {
15 
26  public:
27  WPI_DEPRECATED(
28  "Use TimedRobot instead. It's a drop-in replacement that provides more "
29  "regular execution periods.")
31  virtual ~IterativeRobot() = default;
32 
39  void StartCompetition() override;
40 
44  void EndCompetition() override;
45 
46  private:
47  std::atomic<bool> m_exit{false};
48 };
49 
50 } // namespace frc
frc::IterativeRobotBase
IterativeRobotBase implements a specific type of robot program framework, extending the RobotBase cla...
Definition: IterativeRobotBase.h:48
frc::IterativeRobot
IterativeRobot implements the IterativeRobotBase robot program framework.
Definition: IterativeRobot.h:25
frc
WPILib FRC namespace.
Definition: AnalogOutSim.h:16
frc::IterativeRobot::EndCompetition
void EndCompetition() override
Ends the main loop in StartCompetition().
frc::IterativeRobot::StartCompetition
void StartCompetition() override
Provide an alternate "main loop" via StartCompetition().