Setup port and initialize wheel object for ShooterTest to use
authorEvanYap <evanyap.14@gmail.com>
Thu, 21 Jan 2016 03:51:10 +0000 (19:51 -0800)
committerKevin Zhang <icestormf1@gmail.com>
Sat, 23 Jan 2016 03:37:34 +0000 (19:37 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java

index 4878ffa72a905acdfe9212fa0afddfb0860f797c..eaf8bc6293711cb715e551c66a902fca6d20c694 100644 (file)
@@ -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 final static int RIGHT_STICK_TRIGGER = 0;
   }
 
   public static class DriveTrain {
@@ -26,6 +27,10 @@ public class Constants {
     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;
   }
index 36ca70bc268a526c02d33f5531c1d8d550fcbe90..79e12d9e00d8adc2adeb8be51b8fd97fa8978459 100644 (file)
@@ -1,17 +1,21 @@
 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;
+  public static Shooter shooter;
 
   @Override
   public void robotInit() {
     driveTrain = new DriveTrain();
     oi = new OI();
+    shooter = new Shooter();
   }
 
   @Override
index ca09301c4162c69c690e22e8b66029892948197f..b916c044f9519a520bd0f408c1ed4524015c3fab 100755 (executable)
@@ -1,15 +1,19 @@
 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
+  CANTalon wheel;\r
 \r
-       public Shooter() {\r
-\r
-       }\r
+  public Shooter() {\r
+    wheel = new CANTalon(Constants.Shooter.SHOOTER_WHEEL_PORT);\r
+  }\r
 \r
-       @Override\r
-       protected void initDefaultCommand() {\r
+  @Override\r
+  protected void initDefaultCommand() {\r
 \r
-       }\r
+  }\r
 }\r