Change SetMotorValue
authorShivani Ghanta <shivani.oghanta@gmail.com>
Mon, 16 Jan 2017 23:24:41 +0000 (15:24 -0800)
committerShivani Ghanta <shivani.oghanta@gmail.com>
Sat, 21 Jan 2017 22:27:37 +0000 (14:27 -0800)
src/org/usfirst/frc/team3501/robot/OI.java
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java
src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java
src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java
src/org/usfirst/frc/team3501/robot/subsystems/Climber.java

index 211c3992323cac295dc95ad8f22faa573dc0e3f1..cf71c721b94429dfd41ea6148fb296d924b05541 100644 (file)
@@ -6,16 +6,17 @@ public class OI {
   private static OI oi;
   public static Joystick leftJoystick;
   public static Joystick rightJoystick;
+  public static ClimberButton climberButton;
 
   public OI() {
     leftJoystick = new Joystick(Constants.OI.LEFT_STICK_PORT);
     rightJoystick = new Joystick(Constants.OI.RIGHT_STICK_PORT);
 
   }
-  
-  public static OI getOI(){
-         if(oi == null)
-                 oi = new OI();
-         return oi;
+
+  public static OI getOI() {
+    if (oi == null)
+      oi = new OI();
+    return oi;
   }
 }
index 028e33a23a314fa3fc05329f432e6c30c8617d17..ba8b20160635cbbc59ebd81a7975684d009f7438 100644 (file)
@@ -26,7 +26,7 @@ public class RunWinch extends Command {
   @Override
   protected void initialize() {
     timer.start();
-    Robot.getClimber().setMotorValues(motorVal, motorVal);
+    Robot.getClimber().setMotorValue(motorVal);
   }
 
   @Override
index 05fd63ae1c39b7158c2a1dc5ab3396801f192ba9..381a80acd63d17f77a9729910bceffb8cb5a0a41 100644 (file)
@@ -20,6 +20,8 @@ public class RunWinchContinuous extends Command {
 
   @Override
   protected void initialize() {
+    Robot.getClimber().setMotorValues(motorVal);
+
   }
 
   @Override
index d8267ff10f4601e6636d22523308a699d35b4788..31a5b552f011a80d7a1967547f038f90a3ac8be7 100644 (file)
@@ -22,7 +22,6 @@ public class StopWinch extends Command {
 
   @Override
   protected void execute() {
-
   }
 
   @Override
index 87407950e5cb83d9c6ece2ddce6f22f0467cb804..3426dad718b70fce7772c37871d39bbed8647de6 100644 (file)
@@ -13,4 +13,12 @@ public class Climber {
     }
     return climber;
   }
+
+  public void stop() {
+    setMotorValues(0);
+  }
+
+  public void setMotorValues(final double val) {
+
+  }
 }