Skip to content

Commit

Permalink
Remove robotInit in favour of Robot constructor (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty authored Jul 29, 2024
1 parent 97752c0 commit b1bfec3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/export/cpp/CommandBasedRobot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
\#include <frc/smartdashboard/SmartDashboard.h>
\#include <frc2/command/CommandScheduler.h>

void Robot::RobotInit() {
Robot::Robot() {
EnableLiveWindowInTest(true);
HAL_Report(HALUsageReporting::kResourceType_Framework,
HALUsageReporting::kFramework_RobotBuilder);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/export/cpp/CommandBasedRobot.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class Robot : public frc::TimedRobot {
public:
void RobotInit() override;
Robot();
void RobotPeriodic() override;
void DisabledInit() override;
void DisabledPeriodic() override;
Expand Down
7 changes: 3 additions & 4 deletions src/main/resources/export/java/RobotTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the TimedRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the build.properties file in
* creating this project, you must also update the build.properties file in
* the project.
*/
public class Robot extends TimedRobot {
Expand All @@ -27,8 +27,7 @@ public class Robot extends TimedRobot {
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
@Override
public void robotInit() {
public Robot() {
// Instantiate our RobotContainer. This will perform all our button bindings, and put our
// autonomous chooser on the dashboard.
m_robotContainer = RobotContainer.getInstance();
Expand Down Expand Up @@ -115,4 +114,4 @@ public void testInit() {
public void testPeriodic() {
}

}
}

0 comments on commit b1bfec3

Please sign in to comment.