Skip to content

Commit

Permalink
renamed setTargetState to goToState
Browse files Browse the repository at this point in the history
  • Loading branch information
Pointy Ice committed Feb 5, 2024
1 parent 3f89710 commit 6ed6dec
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void end(boolean interrupted){

@Override
public void execute(){
this.elevatorSubsystem.setTargetState(ElevatorState.AMP);
this.elevatorSubsystem.goToState(ElevatorState.AMP);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void end(boolean interrupted){

@Override
public void execute(){
this.elevatorSubsystem.setTargetState(ElevatorState.CHUTE);
this.elevatorSubsystem.goToState(ElevatorState.CHUTE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void initialize() {

@Override
public void execute(){
elevatorSubsystem.setTargetState(ElevatorState.GROUND);
elevatorSubsystem.goToState(ElevatorState.GROUND);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void end(boolean interrupted){

@Override
public void execute(){
this.elevatorSubsystem.setTargetState(ElevatorState.TRAP);
this.elevatorSubsystem.goToState(ElevatorState.TRAP);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ public ElevatorSubsystem() {
System.out.println(message);
if (message.equals("GROUND")) {
System.out.println("Setting Target to Ground");
this.setTargetState(ElevatorState.GROUND);
this.goToState(ElevatorState.GROUND);
} else if (message.equals("SPEAKER")) {
System.out.println("Setting Target to TRAP");
this.setTargetState(ElevatorState.TRAP);
this.goToState(ElevatorState.TRAP);
} else if (message.equals("AMP")) {
System.out.println("Setting Target to AMP");
this.setTargetState(ElevatorState.AMP);
this.goToState(ElevatorState.AMP);
} else
return;
ElevatorState currentTargetState = this.getTargetState();
Expand Down Expand Up @@ -145,7 +145,7 @@ public void setState(ElevatorState state) {
return;
}

public void setTargetState(ElevatorState targetState) {
public void goToState(ElevatorState targetState) {
extensionPidController.setReference(targetState.getExtendDistanceMeters(), ControlType.kPosition, 0, 0.03,
ArbFFUnits.kPercentOut);
return;
Expand Down

0 comments on commit 6ed6dec

Please sign in to comment.