WPILibC++  2018.4.1-20180816013227-1153-g1462a5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
SampleRobot.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2008-2018 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 <wpi/deprecated.h>
11 
12 #include "frc/RobotBase.h"
13 
14 namespace frc {
15 
16 class WPI_DEPRECATED(
17  "WARNING: While it may look like a good choice to use for your code if "
18  "you're inexperienced, don't. Unless you know what you are doing, complex "
19  "code will be much more difficult under this system. Use TimedRobot or "
20  "Command-Based instead.") SampleRobot : public RobotBase {
21  public:
32  void StartCompetition() override;
33 
46  virtual void RobotInit();
47 
54  virtual void Disabled();
55 
63  virtual void Autonomous();
64 
72  virtual void OperatorControl();
73 
81  virtual void Test();
82 
95  virtual void RobotMain();
96 
97  protected:
98  SampleRobot();
99  virtual ~SampleRobot() = default;
100 
101  private:
102  bool m_robotMainOverridden = true;
103 };
104 
105 } // namespace frc
WPILib FRC namespace.
Definition: SPIAccelerometerSim.h:18
virtual void OperatorControl()
Operator control (tele-operated) code should go here.
class virtual WPI_DEPRECATED("WARNING: While it may look like a good choice to use for your code if ""you're inexperienced, don't. Unless you know what you are doing, complex ""code will be much more difficult under this system. Use TimedRobot or ""Command-Based instead.") SampleRobot void RobotInit()
Start a competition.
virtual void Test()
Test program should go here.
virtual void RobotMain()
Robot main program for free-form programs.
virtual void Disabled()
Disabled should go here.
virtual void Autonomous()
Autonomous should go here.