projects
/
3501
/
stronghold-2016
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
01b9b0e
)
change isUsingTime to final and delete the method that toggles it in drivetrain
author
Meryem Esa
<meresa14@gmail.com>
Thu, 18 Feb 2016 21:55:21 +0000
(13:55 -0800)
committer
Meryem Esa
<meresa14@gmail.com>
Thu, 18 Feb 2016 22:11:54 +0000
(14:11 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/Constants.java
b/src/org/usfirst/frc/team3501/robot/Constants.java
index bbc7a3b88b420a49f786ffe9f6582cde1ec33f0d..08dda700f3b64710aa3d141a3735884be595d27c 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-230,7
+230,7
@@
public class Constants {
// Passing Defenses Constants
public static final double DEFAULT_SPEED = 0.5;
// 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
// dead reckoning time and speed constants for driving through defenses
// TODO: find the times it takes to pass each defense
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.java
index 6450fa0342f6b4ffd9e26134942ed36a273556a5..e6fdf15710d4c832e6afa8fbc571e9c9bf4ea573 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/AlignToScore.java
@@
-39,7
+39,7
@@
public class AlignToScore extends CommandGroup {
public double horizontalDistToGoal;
public AlignToScore(int position) {
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));
if (position == 1) {
addSequential(new DriveForTime(Constants.Auton.POS1_DIST1_TIME,
Constants.Auton.POS1_DRIVE_MAXSPEED));
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
index fe35684f9e1d38870759c9d6d68cd4fcc476f47a..3f43356e72ef349d26ff0e73bce71ceff2950a44 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassLowBar.java
@@
-25,7
+25,7
@@
import edu.wpi.first.wpilibj.command.CommandGroup;
public class PassLowBar extends CommandGroup {
public PassLowBar() {
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));
}
addSequential(new DriveForTime(Constants.Auton.PASS_LOW_BAR_TIMEpassLowBarTime,
Constants.Auton.PASS_LOW_BAR_SPEED));
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
index de789f75b765e71d58130e66f39cd71a22db94ef..7afc178255bf5a67757f73865208ffc022e22b54 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassMoat.java
@@
-28,7
+28,7
@@
import edu.wpi.first.wpilibj.command.CommandGroup;
public class PassMoat extends CommandGroup {
public PassMoat() {
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));
}
addSequential(new DriveForTime(Constants.Auton.PASS_MOAT_TIME,
Constants.Auton.PASS_MOAT_SPEED));
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
index acd24469a86fbacefaf859c0c39cad36726463a5..780589171246a4c9b556ee3887349adc7022cb4d 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRampart.java
@@
-26,7
+26,7
@@
public class PassRampart extends CommandGroup {
public PassRampart() {
public PassRampart() {
- if (Constants.Auton.
isUsingTime
) {
+ if (Constants.Auton.
IS_USING_TIME
) {
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
index 73368d7e1793c62dfcf5ca99eee4e0c30b1b0a5b..55646b5a94254c695f5a0ebd97ad48886ba275aa 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRockWall.java
@@
-25,7
+25,7
@@
import edu.wpi.first.wpilibj.command.CommandGroup;
public class PassRockWall extends CommandGroup {
public PassRockWall() {
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));
}
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java
b/src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java
index a1783de214c36c23b811dbe5133ef09ae3ff5b3d..8e3ccba55d206bf2114122aaca380e3e96764374 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/auton/PassRoughTerrain.java
@@
-26,7
+26,7
@@
public class PassRoughTerrain extends CommandGroup {
public PassRoughTerrain() {
public PassRoughTerrain() {
- if (Constants.Auton.
isUsingTime
) {
+ if (Constants.Auton.
IS_USING_TIME
) {
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
addSequential(new DriveForTime(Constants.Auton.PASS_ROCK_WALL_TIME,
Constants.Auton.passRockWallSpeed));
}
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
index e19b46f02643a6c24af4d7d261ae9f13fb6c74a8..7576e1b08b4bb3c721d956136db5a2b91b574ea3 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java
@@
-227,16
+227,10
@@
public class DriveTrain extends PIDSubsystem {
}
/*
}
/*
- * 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
- * =======
- *
- * @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)
*/
private double sensorFeedback() {
if (DRIVE_MODE == Constants.DriveTrain.ENCODER_MODE)
@@
-367,7
+361,4
@@
public class DriveTrain extends PIDSubsystem {
rightGearPiston.set(gear);
}
rightGearPiston.set(gear);
}
- public void toggleTimeDeadReckoning() {
- Constants.Auton.isUsingTime = !Constants.Auton.isUsingTime;
- }
}
}