// Passing Defenses Constants
public static final double DEFAULT_SPEED = 0.5;
- public static boolean isUsingTime = true;
+ public static final boolean IS_USING_TIME = true;
// dead reckoning time and speed constants for driving through defenses
// TODO: find the times it takes to pass each defense
public double horizontalDistToGoal;
public AlignToScore(int position) {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
if (position == 1) {
addSequential(new DriveForTime(Constants.Auton.POS1_DIST1_TIME,
Constants.Auton.POS1_DRIVE_MAXSPEED));
public class PassLowBar extends CommandGroup {
public PassLowBar() {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
addSequential(new DriveForTime(Constants.Auton.PASS_LOW_BAR_TIMEpassLowBarTime,
Constants.Auton.PASS_LOW_BAR_SPEED));
}
public class PassMoat extends CommandGroup {
public PassMoat() {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
addSequential(new DriveForTime(Constants.Auton.PASS_MOAT_TIME,
Constants.Auton.PASS_MOAT_SPEED));
}
public PassRampart() {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
public class PassRockWall extends CommandGroup {
public PassRockWall() {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
public PassRoughTerrain() {
- if (Constants.Auton.isUsingTime) {
+ if (Constants.Auton.IS_USING_TIME) {
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
}
/*
- * Checks the drive mode <<<<<<< 9728080f491e9fb09795494349dba1297f447c0f
+ * Checks the drive mode
*
* @return the current state of the robot in each state Average distance from
* both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE
- * =======
- *
- * @return the current state of the robot in each state Average distance from
- * both sides of tank drive for Encoder Mode Angle from the gyro in GYRO_MODE
- * >>>>>>> Move all constants in DeadReckoning to Auton class because it makes
- * more sense
*/
private double sensorFeedback() {
if (DRIVE_MODE == Constants.DriveTrain.ENCODER_MODE)
rightGearPiston.set(gear);
}
- public void toggleTimeDeadReckoning() {
- Constants.Auton.isUsingTime = !Constants.Auton.isUsingTime;
- }
}