-
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.
* Co-authored-by: BookSerpent <BookSerpent@users.noreply.github.com> * declared left and right climb motors, and made it so we only call them "leftClimb" and "rightClimb" respectively * making sure prettier is happy * made the extention and retraction speed of the arm constants * added explanations with units to the constants for arm extension
- Loading branch information
1 parent
f9e0e96
commit c5f020a
Showing
6 changed files
with
86 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package frc.robot.auton; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import frc.robot.Constants; | ||
import frc.robot.Robot; | ||
|
||
public class ExtendArms extends AutonAction { | ||
|
||
private double extensionTime; | ||
|
||
@Override | ||
public boolean isDone() { | ||
if (Timer.getFPGATimestamp() >= extensionTime) { | ||
Robot.motors.getLeftClimb().set(0); | ||
Robot.motors.getRightClimb().set(0); | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void initiate() { | ||
Robot.motors.getLeftClimb().set(Constants.ARM_EXTENSION_SPEED); | ||
Robot.motors.getRightClimb().set(Constants.ARM_EXTENSION_SPEED); | ||
extensionTime = Timer.getFPGATimestamp() + Constants.ARM_EXTENSION_TIME; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package frc.robot.auton; | ||
|
||
import edu.wpi.first.wpilibj.Timer; | ||
import frc.robot.Constants; | ||
import frc.robot.Robot; | ||
|
||
public class RetractArms extends AutonAction { | ||
|
||
private double extensionTime; | ||
|
||
@Override | ||
public boolean isDone() { | ||
if (Timer.getFPGATimestamp() >= extensionTime) { | ||
Robot.motors.getLeftClimb().set(0); | ||
Robot.motors.getRightClimb().set(0); | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public void initiate() { | ||
Robot.motors.getLeftClimb().set(Constants.ARM_RETRACTION_SPEED); | ||
Robot.motors.getRightClimb().set(Constants.ARM_RETRACTION_SPEED); | ||
extensionTime = Timer.getFPGATimestamp() + Constants.ARM_RETRACTION_TIME; | ||
} | ||
} |