projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5be898b
)
Edit comments
author
Shivani Ghanta
<shivani.oghanta@gmail.com>
Wed, 18 Jan 2017 02:52:15 +0000
(18:52 -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/OI.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
patch
|
blob
|
blame
|
history
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index f9057302df9396e7a9dbb004e20e49496ae34412..e72c0284b52d3f65336496174716c26c02fb18aa 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/OI.java
+++ b/
src/org/usfirst/frc/team3501/robot/OI.java
@@
-1,6
+1,8
@@
package org.usfirst.frc.team3501.robot;
import edu.wpi.first.wpilibj.Joystick;
package org.usfirst.frc.team3501.robot;
import edu.wpi.first.wpilibj.Joystick;
+import edu.wpi.first.wpilibj.buttons.Button;
+import edu.wpi.first.wpilibj.buttons.JoystickButton;
public class OI {
private static OI oi;
public class OI {
private static OI oi;
@@
-11,7
+13,8
@@
public class OI {
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
public OI() {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
- Â toggleWinch = new JoystickButton(leftJoystick,Constants.OI.TOGGLE_WINCH_PORT);
+ toggleWinch = new JoystickButton(leftJoystick,
+ Constants.OI.TOGGLE_WINCH_PORT);
}
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
index ba8b20160635cbbc59ebd81a7975684d009f7438..d6d047c98f53671e57a77ea9405c0961e0c49a65 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
@@
-7,8
+7,12
@@
import com.sun.glass.ui.Timer;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
- *
Runs the winch for a given time and motor value
+ *
This command runs the winch for a given motor value and time in seconds
*
*
+ * @param motorVal
+ * value range is from -1 to 1
+ * @param time
+ * in seconds
* @author shivanighanta
*
*/
* @author shivanighanta
*
*/
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 dc29866a2e4892cd6ba49491e1afcd81fdd3de9d..c15ca1047c16f1697cebfca04fc0abaf7432c89d 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
@@
-5,7
+5,8
@@
import org.usfirst.frc.team3501.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
/**
import edu.wpi.first.wpilibj.command.Command;
/**
- * Runs the winch continuously at a given motor value
+ * This command will run the winch motor continuously until the button
+ * triggering it is released
*
* @author shivanighanta
*
*
* @author shivanighanta
*
@@
-30,7
+31,7
@@
public class RunWinchContinuous extends Command {
@Override
protected boolean isFinished() {
@Override
protected boolean isFinished() {
- return
false
;
+ return
!Robot.getOI().toggleWinch.get()
;
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
index 3426dad718b70fce7772c37871d39bbed8647de6..9dd7361ba83d3b2da383834f0150aa86696ca345 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java
@@
-15,10
+15,10
@@
public class Climber {
}
public void stop() {
}
public void stop() {
- setMotorValue
s
(0);
+ setMotorValue(0);
}
}
- public void setMotorValue
s
(final double val) {
+ public void setMotorValue(final double val) {
}
}
}
}