From 6feace1b99b9f5377a1f76da783aa5e05effb75a Mon Sep 17 00:00:00 2001 From: Shivani Ghanta Date: Sat, 28 Jan 2017 13:56:11 -0800 Subject: [PATCH] Initialize timer --- .../frc/team3501/robot/commands/climber/MaintainWinchSpeed.java | 1 + .../usfirst/frc/team3501/robot/commands/climber/RunWinch.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainWinchSpeed.java b/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainWinchSpeed.java index 6d11b64..9741eac 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainWinchSpeed.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/MaintainWinchSpeed.java @@ -37,6 +37,7 @@ public class MaintainWinchSpeed extends Command { * value range is from -1 to 1 */ public MaintainWinchSpeed(double time, double motorVal) { + timer = new Timer(); requires(Robot.getDriveTrain()); this.time = time; this.motorVal = motorVal; 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 88195a4..2428aff 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java +++ b/src/org/usfirst/frc/team3501/robot/commands/climber/RunWinch.java @@ -38,6 +38,7 @@ public class RunWinch extends Command { */ public RunWinch(double time, double motorVal) { requires(Robot.getDriveTrain()); + timer = new Timer(); this.time = time; this.motorVal = motorVal; } -- 2.30.2