projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a36392
)
Implement RunWinchContinuous
author
Shivani Ghanta
<shivani.oghanta@gmail.com>
Sat, 14 Jan 2017 23:38:49 +0000
(15:38 -0800)
committer
Shivani Ghanta
<shivani.oghanta@gmail.com>
Sat, 21 Jan 2017 22:27:37 +0000
(14:27 -0800)
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
index ee075f29f6ac7b5bda8c1d5a2d23b619d46b16c6..05fd63ae1c39b7158c2a1dc5ab3396801f192ba9 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
@@
-1,5
+1,7
@@
package org.usfirst.frc.team3501.robot.commands.climber;
package org.usfirst.frc.team3501.robot.commands.climber;
+import org.usfirst.frc.team3501.robot.Robot;
+
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-12,6
+14,7
@@
public class RunWinchContinuous extends Command {
private double motorVal;
public RunWinchContinuous(double motorVal) {
private double motorVal;
public RunWinchContinuous(double motorVal) {
+ requires(Robot.getClimber());
this.motorVal = motorVal;
}
this.motorVal = motorVal;
}
@@
-31,10
+34,11
@@
public class RunWinchContinuous extends Command {
@Override
protected void end() {
@Override
protected void end() {
-
+ Robot.getClimber().stop();
}
@Override
protected void interrupted() {
}
@Override
protected void interrupted() {
+ end();
}
}
}
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
index f024569b545fec1f707fe665e07413610c2f6121..6c83816c37cc9102e23bed14b23b3e421701c042 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
@@
-1,5
+1,7
@@
package org.usfirst.frc.team3501.robot.commands.climber;
package org.usfirst.frc.team3501.robot.commands.climber;
+import org.usfirst.frc.team3501.robot.Robot;
+
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
@@
-11,6
+13,7
@@
import edu.wpi.first.wpilibj.command.Command;
public class StopWinch extends Command {
public StopWinch() {
public class StopWinch extends Command {
public StopWinch() {
+ requires(Robot.getClimber());
}
@Override
}
@Override