forked from MontclairRobotics/FootballShooterBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drivetrain now implements RobotLikeComponent. This required some
renaming of methods in Drivetrain to match the standard for the FRC robotic class, but even absent the goal of my current effort, that's a good idea if only for consistency and ease of understanding of the code. This also required extending the RobotLikeComponent to accept an optional "debug" argument to methods. The current default is false. Should it really use an argument? It seems to me that there may be a more efficient approach, such as checking some "registry" or set of options that can be configured at runtime. In more conventional code, I could simply use environment variables.
- Loading branch information
Andrew Gideon
committed
Dec 15, 2019
1 parent
532dae5
commit 795c8dc
Showing
3 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
package frc.robot.core; | ||
|
||
public interface RobotLikeComponent { | ||
default public void robotInit() {} | ||
default public void teleopInit() {} | ||
default public void robotInit() {robotInit(false);} | ||
default public void robotInit(boolean debug) {} | ||
|
||
default public void teleopInit() {teleopInit(false);} | ||
default public void teleopInit(boolean debug) {} | ||
|
||
default public void autonomousInit() {} | ||
|
||
default public void roboticPeriodic() {} | ||
default public void teleopPeriodic() {} | ||
|
||
default public void teleopPeriodic() {teleopPeriodic(false);} | ||
default public void teleopPeriodic(boolean debug) {} | ||
|
||
default public void autonomousPeriodic() {} | ||
default public void testPeriodic() {} | ||
} |