Skip to content

Commit

Permalink
ControlSystem now implements RobotLikeComponent. This is similar to
Browse files Browse the repository at this point in the history
what was done in 795c8dc.  See that
commit for why this is a good idea even if we're not putting all these
objects into a collection in the Robot class for dispatching, and also
for a brief discussion of why passing boolean debug flags at compile
time may not be an ideally flexible solution.
  • Loading branch information
Andrew Gideon committed Dec 15, 2019
1 parent e2979a9 commit 18a269b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void robotInit() {
controlSystem = new ControlSystem(this);
launcher = new Launcher(this);

controlSystem.init(true);
controlSystem.robotInit(true);
launcher.init(true);


Expand Down
7 changes: 4 additions & 3 deletions src/main/java/frc/robot/core/ControlSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import frc.robot.Robot;


public class ControlSystem{
public class ControlSystem implements RobotLikeComponent
{

private Robot robot;

Expand Down Expand Up @@ -62,7 +63,7 @@ public ControlSystem(Robot robot){
this.robot = robot;
}

public void init(boolean debug){
public void robotInit(boolean debug){
driveStick = new Joystick(Sticks.DRIVE_STICK.getPort());
opStick = new Joystick(Sticks.OPERATOR_STICK.getPort());

Expand Down Expand Up @@ -125,4 +126,4 @@ public boolean getOperatorButton(OperatorButtons operatorButtons){
}

}
}
}

0 comments on commit 18a269b

Please sign in to comment.