From cf0865493f6565c47516bd2ff9ef43d9ba7f5d46 Mon Sep 17 00:00:00 2001 From: Shivani Ghanta Date: Mon, 16 Jan 2017 15:24:41 -0800 Subject: [PATCH] Change SetMotorValue --- src/org/usfirst/frc/team3501/robot/OI.java | 11 ++++++----- .../frc/team3501/robot/commands/climber/RunWinch.java | 2 +- .../robot/commands/climber/RunWinchContinuous.java | 2 ++ .../team3501/robot/commands/climber/StopWinch.java | 1 - .../frc/team3501/robot/subsystems/Climber.java | 8 ++++++++ 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/OI.java b/src/org/usfirst/frc/team3501/robot/OI.java index 211c399..cf71c72 100644 --- a/src/org/usfirst/frc/team3501/robot/OI.java +++ b/src/org/usfirst/frc/team3501/robot/OI.java @@ -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; } } diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java index 028e33a..ba8b201 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -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 diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java index 05fd63a..381a80a 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinchContinuous.java @@ -20,6 +20,8 @@ public class RunWinchContinuous extends Command { @Override protected void initialize() { + Robot.getClimber().setMotorValues(motorVal); + } @Override diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java index d8267ff..31a5b55 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/StopWinch.java @@ -22,7 +22,6 @@ public class StopWinch extends Command { @Override protected void execute() { - } @Override diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java index 8740795..3426dad 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/Climber.java @@ -13,4 +13,12 @@ public class Climber { } return climber; } + + public void stop() { + setMotorValues(0); + } + + public void setMotorValues(final double val) { + + } } -- 2.30.2