Add missing methods to Timed and TimedSkeleton templates (#2306)

This commit is contained in:
Prateek Machiraju
2020-01-24 23:01:23 -05:00
committed by Peter Johnson
parent 0ab81d768f
commit 7797da78f5
6 changed files with 63 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -63,6 +63,12 @@ void Robot::TeleopInit() {}
void Robot::TeleopPeriodic() {}
void Robot::DisabledInit() {}
void Robot::DisabledPeriodic() {}
void Robot::TestInit() {}
void Robot::TestPeriodic() {}
#ifndef RUNNING_FRC_TESTS

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -20,6 +20,9 @@ class Robot : public frc::TimedRobot {
void AutonomousPeriodic() override;
void TeleopInit() override;
void TeleopPeriodic() override;
void DisabledInit() override;
void DisabledPeriodic() override;
void TestInit() override;
void TestPeriodic() override;
private:

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -8,6 +8,7 @@
#include "Robot.h"
void Robot::RobotInit() {}
void Robot::RobotPeriodic() {}
void Robot::AutonomousInit() {}
void Robot::AutonomousPeriodic() {}
@@ -15,6 +16,9 @@ void Robot::AutonomousPeriodic() {}
void Robot::TeleopInit() {}
void Robot::TeleopPeriodic() {}
void Robot::DisabledInit() {}
void Robot::DisabledPeriodic() {}
void Robot::TestInit() {}
void Robot::TestPeriodic() {}

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -12,6 +12,7 @@
class Robot : public frc::TimedRobot {
public:
void RobotInit() override;
void RobotPeriodic() override;
void AutonomousInit() override;
void AutonomousPeriodic() override;
@@ -19,6 +20,9 @@ class Robot : public frc::TimedRobot {
void TeleopInit() override;
void TeleopPeriodic() override;
void DisabledInit() override;
void DisabledPeriodic() override;
void TestInit() override;
void TestPeriodic() override;
};

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -81,6 +81,13 @@ public class Robot extends TimedRobot {
}
}
/**
* This function is called once when teleop is enabled.
*/
@Override
public void teleopInit() {
}
/**
* This function is called periodically during operator control.
*/
@@ -88,6 +95,27 @@ public class Robot extends TimedRobot {
public void teleopPeriodic() {
}
/**
* This function is called once when the robot is disabled.
*/
@Override
public void disabledInit() {
}
/**
* This function is called periodically when disabled.
*/
@Override
public void disabledPeriodic() {
}
/**
* This function is called once when test mode is enabled.
*/
@Override
public void testInit() {
}
/**
* This function is called periodically during test mode.
*/

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2018-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
@@ -25,6 +25,10 @@ public class Robot extends TimedRobot {
public void robotInit() {
}
@Override
public void robotPeriodic() {
}
@Override
public void autonomousInit() {
}
@@ -41,6 +45,14 @@ public class Robot extends TimedRobot {
public void teleopPeriodic() {
}
@Override
public void disabledInit() {
}
@Override
public void disabledPeriodic() {
}
@Override
public void testInit() {
}