add a scaler to Robot.java and add method to RetractLift command
authorLauren Meier <meier.lauren@gmail.com>
Sat, 30 Jan 2016 05:06:17 +0000 (21:06 -0800)
committerLauren Meier <meier.lauren@gmail.com>
Sun, 31 Jan 2016 01:19:28 +0000 (17:19 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/commands/RetractLift.java

index c5e9681b79e783258cf89ff3262bd2adf00afae0..73e78662167b19479cbb9b5647b47ca222cc8d7c 100644 (file)
@@ -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
index 2d1e1e81d615068f34693f9c1b77436b43f23847..953d42895a7ffcb7b6aad77b568c0312b09a4946 100755 (executable)
@@ -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