[wpilib] Remove robotInit() (#8199)

Fixes #6622.
This commit is contained in:
Tyler Veness
2025-09-08 21:17:37 -07:00
committed by GitHub
parent f8ed2a4d92
commit be72d543ad
8 changed files with 5 additions and 68 deletions

View File

@@ -19,8 +19,6 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
* <p>This class provides the following functions which are called by the main loop,
* startCompetition(), at the appropriate times:
*
* <p>robotInit() -- provide for initialization at robot power-on
*
* <p>driverStationConnected() -- provide for initialization the first time the DS is connected
*
* <p>init() functions -- each of the following functions is called once when the appropriate mode
@@ -85,17 +83,6 @@ public abstract class IterativeRobotBase extends RobotBase {
/* ----------- Overridable initialization code ----------------- */
/**
* Robot-wide initialization code should go here.
*
* <p>Users should override this method for default Robot-wide initialization which will be called
* when the robot is first powered on. It will be called exactly one time.
*
* <p>Note: This method is functionally identical to the class constructor so that should be used
* instead.
*/
public void robotInit() {}
/**
* Code that needs to know the DS state should go here.
*
@@ -109,7 +96,7 @@ public abstract class IterativeRobotBase extends RobotBase {
*
* <p>Users should override this method for default Robot-wide simulation related initialization
* which will be called when the robot is first started. It will be called exactly one time after
* RobotInit is called only when the robot is in simulation.
* the robot class constructor is called only when the robot is in simulation.
*/
public void simulationInit() {}

View File

@@ -102,8 +102,6 @@ public class TimedRobot extends IterativeRobotBase {
/** Provide an alternate "main loop" via startCompetition(). */
@Override
public void startCompetition() {
robotInit();
if (isSimulation()) {
simulationInit();
}