projects
/
3501
/
2017steamworks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f3db582
)
Add buttons to OI class
author
shainachen
<shaina.sierra@gmail.com>
Sun, 15 Jan 2017 00:30:13 +0000
(16:30 -0800)
committer
Cindy Zhang
<cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:40:38 +0000
(19:40 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/OI.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/Robot.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.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 c93d6434bffd871ff429ec5822709a8d59ffabf6..e0d7f64adb1ced24523bfdf95b152fc5eaaaa3b4 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-11,6
+11,9
@@
public class Constants {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 1;
public final static int TOGGLE_WINCH_PORT = 0;
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 1;
public final static int TOGGLE_WINCH_PORT = 0;
+
+ public final static int TOGGLE_FLYWHEEL_PORT = 0;
+ public final static int TOGGLE_INDEXWHEEL_PORT = 0;
}
public static class DriveTrain {
}
public static class DriveTrain {
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index e72c0284b52d3f65336496174716c26c02fb18aa..d21fe84cd64c853623c7bae7881825738093c256 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/OI.java
+++ b/
src/org/usfirst/frc/team3501/robot/OI.java
@@
-10,12
+10,20
@@
public class OI {
public static Joystick rightJoystick;
public static Button toggleWinch;
public static Joystick rightJoystick;
public static Button toggleWinch;
+ public static Button toggleIndexWheel;
+ public static Button toggleFlyWheel;
+
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);
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);
+ toggleIndexWheel = new JoystickButton(leftJoystick,
+ Constants.OI.TOGGLE_INDEXWHEEL_PORT);
+ toggleFlyWheel = new JoystickButton(leftJoystick,
+ Constants.OI.TOGGLE_FLYWHEEL_PORT);
+
}
public static OI getOI() {
}
public static OI getOI() {
diff --git
a/src/org/usfirst/frc/team3501/robot/Robot.java
b/src/org/usfirst/frc/team3501/robot/Robot.java
index 00ad1cb9d8f13168f8c5668f155c113f2bdbb09f..451d339ae849cb997e333c66564761b50fea6d58 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Robot.java
+++ b/
src/org/usfirst/frc/team3501/robot/Robot.java
@@
-11,7
+11,6
@@
public class Robot extends IterativeRobot {
private static DriveTrain driveTrain;
private static Shooter shooter;
private static OI oi;
private static DriveTrain driveTrain;
private static Shooter shooter;
private static OI oi;
- private static Shooter shooter;
@Override
public void robotInit() {
@Override
public void robotInit() {
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java
index 8a6e5be4f9e3f1571afd4debb4c431198416fa73..806611d91335e0ebd7caa42401d1daea7a78602a 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java
@@
-53,8
+53,7
@@
public class RunFlyWheelContinuous extends Command {
@Override
protected boolean isFinished() {
// TODO
@Override
protected boolean isFinished() {
// TODO
- return false;
-
+ return !Robot.getOI().toggleFlyWheel.get();
}
}
}
}
diff --git
a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
index 2c243385f2395284613349f81d97e3c6ab17552d..d3d49b841a3322514b344e72b401155a1050094b 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
+++ b/
src/org/usfirst/frc/team3501/robot/commands/shooter/RunIndexWheelContinuous.java
@@
-53,7
+53,7
@@
public class RunIndexWheelContinuous extends Command {
@Override
protected boolean isFinished() {
// TODO
@Override
protected boolean isFinished() {
// TODO
- return
false
;
+ return
Robot.getOI().toggleIndexWheel.get()
;
}
}
}
}