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:
c58ba1d
)
Add (BAD) shooter code. Very temporary.
author
Harel Dor
<hareldor@gmail.com>
Tue, 23 Feb 2016 04:26:26 +0000
(20:26 -0800)
committer
Harel Dor
<hareldor@gmail.com>
Tue, 23 Feb 2016 04:33:38 +0000
(20:33 -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
diff --git
a/src/org/usfirst/frc/team3501/robot/Constants.java
b/src/org/usfirst/frc/team3501/robot/Constants.java
index 6ed069637770a2d3b0d8915eb5d5d2121b90e75f..657fc2854790160b9591389f0d624d745f35f1e5 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-101,7
+101,7
@@
public class Constants {
}
public static class Shooter {
}
public static class Shooter {
- public static final int PORT =
0
;
+ public static final int PORT =
4
;
public static final int PUNCH_FORWARD = 5;
public static final int PUNCH_REVERSE = 1;
public static final int ANGLE_ADJUSTER_PORT = 0;
public static final int PUNCH_FORWARD = 5;
public static final int PUNCH_REVERSE = 1;
public static final int ANGLE_ADJUSTER_PORT = 0;
diff --git
a/src/org/usfirst/frc/team3501/robot/OI.java
b/src/org/usfirst/frc/team3501/robot/OI.java
index cb7e12d9b3120c094e24f39869be0d6deea94cf6..bde311bd3147356a90d92129557a340b7f134bc7 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/OI.java
+++ b/
src/org/usfirst/frc/team3501/robot/OI.java
@@
-42,8
+42,8
@@
public class OI {
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
- toggleGear = new JoystickButton(
righ
tJoystick,
- Constants.OI.
RIGH
T_JOYSTICK_TRIGGER_PORT);
+ toggleGear = new JoystickButton(
lef
tJoystick,
+ Constants.OI.
LEF
T_JOYSTICK_TRIGGER_PORT);
toggleGear.toggleWhenPressed(new ChangeGear());
// passPortcullis = new DigitalButton(
toggleGear.toggleWhenPressed(new ChangeGear());
// passPortcullis = new DigitalButton(
diff --git
a/src/org/usfirst/frc/team3501/robot/Robot.java
b/src/org/usfirst/frc/team3501/robot/Robot.java
index 46ef8069f75bfbbca275ed78fdbeb649e241c610..d0516b8e040ec23fc93c84fd3fa3ca5817ea4e42 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Robot.java
+++ b/
src/org/usfirst/frc/team3501/robot/Robot.java
@@
-126,6
+126,11
@@
public class Robot extends IterativeRobot {
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
+ if (OI.rightJoystick.getTrigger()) {
+ Robot.shooter.setSpeed(1);
+ } else {
+ Robot.shooter.setSpeed(0);
+ }
}
}
}
}