projects
/
3501
/
stronghold-2016
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cef820a
)
add end() in interrupted in scaler methods and make sure constants go in the right...
author
Kevin Zhang
<icestormf1@gmail.com>
Mon, 15 Feb 2016 00:34:06 +0000
(16:34 -0800)
committer
Kevin Zhang
<icestormf1@gmail.com>
Mon, 15 Feb 2016 00:34:06 +0000
(16:34 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/scaler/ClampBar.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/scaler/ExtendLift.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/scaler/RetractLift.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 232681683e28fb1fa029574f40514dd0aedaa85b..3304a101a858db6d9495c7b58d45b372f8c4e84f 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-66,7
+66,7
@@
public class Constants {
// Winch speeds
public final static double WINCH_STOP_SPEED = 0.0;
// Winch speeds
public final static double WINCH_STOP_SPEED = 0.0;
-
+ public final static double SECONDS_TO_CLAMP = 2.0;
}
public static class Shooter {
}
public static class Shooter {
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/scaler/ClampBar.java
b/src/org/usfirst/frc/team3501/robot/commands/scaler/ClampBar.java
index 9e9fbc1ba621913747c3d3225a62623aad8ca9ea..23b010f1d786eaa2be8583237b75a1d1b76de23e 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/scaler/ClampBar.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/scaler/ClampBar.java
@@
-1,21
+1,21
@@
package org.usfirst.frc.team3501.robot.commands.scaler;
package org.usfirst.frc.team3501.robot.commands.scaler;
+import org.usfirst.frc.team3501.robot.Constants;
import org.usfirst.frc.team3501.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
public class ClampBar extends Command {
import org.usfirst.frc.team3501.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
public class ClampBar extends Command {
- private double secondsToClamp = 2.0; // seconds for the winch to run in order
- // for it to clamp(requires testing)
- private double winchSpeed = 0.5; // requires testing
+ private double speed = 0;
- public ClampBar() {
+ public ClampBar(double speed) {
+ this.speed = speed;
}
@Override
protected void initialize() {
}
@Override
protected void initialize() {
- setTimeout(
secondsToClamp
);
- Robot.scaler.runWinch(
winchS
peed);
+ setTimeout(
Constants.Scaler.SECONDS_TO_CLAMP
);
+ Robot.scaler.runWinch(
this.s
peed);
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/scaler/ExtendLift.java
b/src/org/usfirst/frc/team3501/robot/commands/scaler/ExtendLift.java
index f4001d9ad9cbd5712e13ca5bdd3a767c6a2b0cfa..bead3866a8f4ac2d71c26465ba2ef9875ffe1bf2 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/scaler/ExtendLift.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/scaler/ExtendLift.java
@@
-29,5
+29,6
@@
public class ExtendLift extends Command {
@Override
protected void interrupted() {
@Override
protected void interrupted() {
+ end();
}
}
}
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/scaler/RetractLift.java
b/src/org/usfirst/frc/team3501/robot/commands/scaler/RetractLift.java
index e160b19c39b3572f60bbc88b762b6a408eeac015..880ff503f743cbce0758f89f8338942a5f55ca2e 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/commands/scaler/RetractLift.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/scaler/RetractLift.java
@@
-6,28
+6,29
@@
import edu.wpi.first.wpilibj.command.Command;
public class RetractLift extends Command {
public class RetractLift extends Command {
- public RetractLift() {
- }
-
- @Override
- protected void initialize() {
- Robot.scaler.lowerScissorLift();
- }
-
- @Override
- protected void execute() {
- }
-
- @Override
- protected boolean isFinished() {
- return true;
- }
-
- @Override
- protected void end() {
- }
-
- @Override
- protected void interrupted() {
- }
+ public RetractLift() {
+ }
+
+ @Override
+ protected void initialize() {
+ Robot.scaler.lowerScissorLift();
+ }
+
+ @Override
+ protected void execute() {
+ }
+
+ @Override
+ protected boolean isFinished() {
+ return true;
+ }
+
+ @Override
+ protected void end() {
+ }
+
+ @Override
+ protected void interrupted() {
+ end();
+ }
}
}