From: EvanYap Date: Thu, 21 Jan 2016 03:51:10 +0000 (-0800) Subject: Setup port and initialize wheel object for ShooterTest to use X-Git-Url: http://challenge-bot.com/repos/?a=commitdiff_plain;h=40348cabbc95d9cb1253b78e61783933e6a33af6;p=3501%2Fstronghold-2016 Setup port and initialize wheel object for ShooterTest to use --- diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index 4878ffa7..eaf8bc62 100644 --- 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 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; } diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index 36ca70bc..79e12d9e 100644 --- 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; +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 diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java b/src/org/usfirst/frc/team3501/robot/subsystems/Shooter.java index ca09301c..b916c044 100755 --- 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; +import org.usfirst.frc.team3501.robot.Constants; + +import edu.wpi.first.wpilibj.CANTalon; import edu.wpi.first.wpilibj.command.Subsystem; public class Shooter extends Subsystem { + CANTalon wheel; - public Shooter() { - - } + public Shooter() { + wheel = new CANTalon(Constants.Shooter.SHOOTER_WHEEL_PORT); + } - @Override - protected void initDefaultCommand() { + @Override + protected void initDefaultCommand() { - } + } }