Skip to content

Commit

Permalink
deleted unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
BCNOFNeNaMg committed Oct 29, 2023
1 parent f57c732 commit 25dee5b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/main/java/com/team766/robot/procedures/GyroBalance.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ public void run(Context context) {
}
// Loops until robot is level or until a call to the abort() method
while (!(curState == State.RAMP_LEVEL));

// After the robot is level, drives for correctionDelay seconds.
// Direction is opposite due to inversion of speed in setState() so it corrects for overshooting
context.waitForSeconds(CORRECTION_DELAY);

context.releaseOwnership(Robot.drive);
context.releaseOwnership(Robot.gyro);
}

// Sets state in state machine, see more details in GyroBalance.md
Expand All @@ -136,6 +129,7 @@ private void setState(Context context) {
context.startAsync(new SetCross());
log("Level, prevState: " + prevState + ", curState: " + curState);
context.waitForSeconds(1);
tilt = Robot.gyro.getAbsoluteTilt();
if (tilt < LEVEL) {
curState = State.RAMP_LEVEL;
} else {
Expand Down

0 comments on commit 25dee5b

Please sign in to comment.