add Motor value in constants
authorShivani Ghanta <shivani.oghanta@gmail.com>
Wed, 18 Jan 2017 03:59:52 +0000 (19:59 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:40:39 +0000 (19:40 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java

index f416b33070ce06f18505ee693b2191c745da31a6..4978c317227b7d8a37a1696fe875c6f46db7c68a 100644 (file)
@@ -37,6 +37,12 @@ public class Constants {
     public static final int ENCODER_RIGHT_B = 3;
   }
 
+  public static class Climber {
+    // MOTOR CONTROLLERS
+    public static final int MOTOR_VAL = 1;
+
+  }
+
   public static enum Direction {
     LEFT, RIGHT, DOWN, UP, FORWARD, BACKWARD;
   }
index 8fa01a3014876d16872927b7ada95fa46fa5ed87..a11eee8d34a8ee2bc9eefc0a83b6d074d3c52d56 100644 (file)
@@ -13,6 +13,8 @@ import edu.wpi.first.wpilibj.command.Command;
 public class StopWinch extends Command {
 
   public StopWinch() {
+    requires(Robot.getClimber());
+
   }
 
   @Override
index 9dd7361ba83d3b2da383834f0150aa86696ca345..3d49f90be48f17f96ef93f6a4c550030697265a2 100644 (file)
@@ -1,10 +1,17 @@
 package org.usfirst.frc.team3501.robot.subsystems;
 
-public class Climber {
+import org.usfirst.frc.team3501.robot.Constants;
+
+import com.ctre.CANTalon;
+
+import edu.wpi.first.wpilibj.command.Subsystem;
+
+public class Climber extends Subsystem {
   private static Climber climber;
+  private final CANTalon motor;
 
   private Climber() {
-
+    motor = new CANTalon(Constants.Climber.MOTOR);
   }
 
   public static Climber getClimber() {
@@ -19,6 +26,7 @@ public class Climber {
   }
 
   public void setMotorValue(final double val) {
+    motor.set(MOTOR);
 
   }
 }