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:
38b0db5
)
Setup port and initialize wheel object for ShooterTest to use
author
EvanYap
<evanyap.14@gmail.com>
Thu, 21 Jan 2016 03:51:10 +0000
(19:51 -0800)
committer
Kevin Zhang
<icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:34 +0000
(19:37 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/Robot.java
patch
|
blob
|
blame
|
history
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.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 4878ffa72a905acdfe9212fa0afddfb0860f797c..eaf8bc6293711cb715e551c66a902fca6d20c694 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Constants.java
+++ b/
src/org/usfirst/frc/team3501/robot/Constants.java
@@
-10,6
+10,7
@@
public class Constants {
public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 0;
public static class OI {
public final static int LEFT_STICK_PORT = 0;
public final static int RIGHT_STICK_PORT = 0;
+ public final static int RIGHT_STICK_TRIGGER = 0;
}
public static class DriveTrain {
}
public static class DriveTrain {
@@
-26,6
+27,10
@@
public class Constants {
public final static int ENCODER_RIGHT_B = 1;
}
public final static int ENCODER_RIGHT_B = 1;
}
+ public static class Shooter {
+ public static final int SHOOTER_WHEEL_PORT = 0;
+ }
+
public static enum Direction {
LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
}
public static enum Direction {
LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
}
diff --git
a/src/org/usfirst/frc/team3501/robot/Robot.java
b/src/org/usfirst/frc/team3501/robot/Robot.java
index 36ca70bc268a526c02d33f5531c1d8d550fcbe90..79e12d9e00d8adc2adeb8be51b8fd97fa8978459 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Robot.java
+++ b/
src/org/usfirst/frc/team3501/robot/Robot.java
@@
-1,17
+1,21
@@
package org.usfirst.frc.team3501.robot;
import org.usfirst.frc.team3501.robot.Constants.DriveTrain;
package org.usfirst.frc.team3501.robot;
import org.usfirst.frc.team3501.robot.Constants.DriveTrain;
+import org.usfirst.frc.team3501.robot.subsystems.Shooter;
+
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
public class Robot extends IterativeRobot {
public static OI oi;
public static DriveTrain driveTrain;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
public class Robot extends IterativeRobot {
public static OI oi;
public static DriveTrain driveTrain;
+ public static Shooter shooter;
@Override
public void robotInit() {
driveTrain = new DriveTrain();
oi = new OI();
@Override
public void robotInit() {
driveTrain = new DriveTrain();
oi = new OI();
+ shooter = new Shooter();
}
@Override
}
@Override
diff --git
a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
index ca09301c4162c69c690e22e8b66029892948197f..b916c044f9519a520bd0f408c1ed4524015c3fab 100755
(executable)
--- a/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
+++ b/
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java
@@
-1,15
+1,19
@@
package org.usfirst.frc.team3501.robot.subsystems;
\r
\r
package org.usfirst.frc.team3501.robot.subsystems;
\r
\r
+import org.usfirst.frc.team3501.robot.Constants;
\r
+
\r
+import edu.wpi.first.wpilibj.CANTalon;
\r
import edu.wpi.first.wpilibj.command.Subsystem;
\r
\r
public class Shooter extends Subsystem {
\r
import edu.wpi.first.wpilibj.command.Subsystem;
\r
\r
public class Shooter extends Subsystem {
\r
+ CANTalon wheel;
\r
\r
\r
-
public Shooter() {
\r
-
\r
-
}
\r
+ public Shooter() {
\r
+ wheel = new CANTalon(Constants.Shooter.SHOOTER_WHEEL_PORT);
\r
+ }
\r
\r
\r
-
@Override
\r
-
protected void initDefaultCommand() {
\r
+ @Override
\r
+ protected void initDefaultCommand() {
\r
\r
\r
-
}
\r
+ }
\r
}
\r
}
\r