From 02cb494ec9770b47215de2a84775b7885a44c495 Mon Sep 17 00:00:00 2001 From: Lauren Meier Date: Fri, 29 Jan 2016 21:06:17 -0800 Subject: [PATCH] add a scaler to Robot.java and add method to RetractLift command --- src/org/usfirst/frc/team3501/robot/Robot.java | 5 ++++- src/org/usfirst/frc/team3501/robot/commands/RetractLift.java | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/Robot.java b/src/org/usfirst/frc/team3501/robot/Robot.java index c5e9681b..73e78662 100644 --- a/src/org/usfirst/frc/team3501/robot/Robot.java +++ b/src/org/usfirst/frc/team3501/robot/Robot.java @@ -1,7 +1,8 @@ package org.usfirst.frc.team3501.robot; import org.usfirst.frc.team3501.robot.Constants.Defense; -import org.usfirst.frc.team3501.robot.subsystems.DriveTrain; +import org.usfirst.frc.team3501.robot.Constants.DriveTrain; +import org.usfirst.frc.team3501.robot.subsystems.Scaler; import org.usfirst.frc.team3501.robot.subsystems.Shooter; import edu.wpi.first.wpilibj.IterativeRobot; @@ -13,6 +14,7 @@ public class Robot extends IterativeRobot { public static OI oi; public static DriveTrain driveTrain; public static Shooter shooter; + public static Scaler scaler; // Sendable Choosers send a drop down menu to the Smart Dashboard. SendableChooser positionChooser; @@ -24,6 +26,7 @@ public class Robot extends IterativeRobot { driveTrain = new DriveTrain(); oi = new OI(); shooter = new Shooter(); + scaler = new Scaler(); // Sendable Choosers allows the driver to select the position of the robot // and the positions of the defenses from a drop-down menu on the Smart diff --git a/src/org/usfirst/frc/team3501/robot/commands/RetractLift.java b/src/org/usfirst/frc/team3501/robot/commands/RetractLift.java index 2d1e1e81..953d4289 100755 --- a/src/org/usfirst/frc/team3501/robot/commands/RetractLift.java +++ b/src/org/usfirst/frc/team3501/robot/commands/RetractLift.java @@ -1,5 +1,7 @@ package org.usfirst.frc.team3501.robot.commands; +import org.usfirst.frc.team3501.robot.Robot; + import edu.wpi.first.wpilibj.command.Command; public class RetractLift extends Command { @@ -9,6 +11,7 @@ public class RetractLift extends Command { @Override protected void initialize() { + Robot.scaler.lowerScissorLift(); } @Override @@ -17,7 +20,7 @@ public class RetractLift extends Command { @Override protected boolean isFinished() { - return false; + return true; } @Override -- 2.30.2