From 2f79a7953ce2e5505f9f6b75ad2db08431c694c3 Mon Sep 17 00:00:00 2001 From: Cindy Zhang Date: Mon, 15 Feb 2016 12:16:46 -0800 Subject: [PATCH] add command to close hood on Compactrobot, and implement compactRobot when scaling --- .../robot/commands/auton/CompactRobot.java | 5 +-- .../robot/commands/scaler/ToggleScaling.java | 31 +++---------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/CompactRobot.java b/src/org/usfirst/frc/team3501/robot/commands/auton/CompactRobot.java index 6e3e59ae..b1102d13 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/CompactRobot.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/CompactRobot.java @@ -1,5 +1,6 @@ package org.usfirst.frc.team3501.robot.commands.auton; +import org.usfirst.frc.team3501.robot.Robot; import org.usfirst.frc.team3501.robot.commands.intakearm.MoveIntakeArmToAngle; import org.usfirst.frc.team3501.robot.subsystems.IntakeArm; @@ -11,8 +12,8 @@ import edu.wpi.first.wpilibj.command.CommandGroup; public class CompactRobot extends CommandGroup { public CompactRobot() { - addParallel(new MoveIntakeArmToAngle(IntakeArm.potAngles[3], + addSequential(new MoveIntakeArmToAngle(IntakeArm.potAngles[3], IntakeArm.moveIntakeArmSpeed)); - + Robot.shooter.closeHood(); } } diff --git a/src/org/usfirst/frc/team3501/robot/commands/scaler/ToggleScaling.java b/src/org/usfirst/frc/team3501/robot/commands/scaler/ToggleScaling.java index a3ee9d4f..5f5a64cc 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/scaler/ToggleScaling.java +++ b/src/org/usfirst/frc/team3501/robot/commands/scaler/ToggleScaling.java @@ -1,35 +1,14 @@ package org.usfirst.frc.team3501.robot.commands.scaler; import org.usfirst.frc.team3501.robot.Constants; +import org.usfirst.frc.team3501.robot.commands.auton.CompactRobot; -import edu.wpi.first.wpilibj.command.Command; +import edu.wpi.first.wpilibj.command.CommandGroup; -public class ToggleScaling extends Command { +public class ToggleScaling extends CommandGroup { public ToggleScaling() { - - } - - @Override - protected void initialize() { Constants.Scaler.SCALING = !Constants.Scaler.SCALING; - } - - @Override - protected void execute() { - - } - - @Override - protected boolean isFinished() { - return true; - } - - @Override - protected void end() { - } - - @Override - protected void interrupted() { - end(); + if (Constants.Scaler.SCALING) + addSequential(new CompactRobot()); } } -- 2.30.2