From: Shivani Ghanta Date: Sat, 28 Jan 2017 21:56:11 +0000 (-0800) Subject: Initialize timer X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=commitdiff_plain;h=6feace1b99b9f5377a1f76da783aa5e05effb75a Initialize timer --- 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; }