mirror of
https://github.com/Team4388/2019-Hit-or-Miss.git
synced 2026-06-09 00:28:05 -06:00
Rename Symbols
This commit is contained in:
+6
-8
@@ -3,21 +3,19 @@ package org.usfirst.frc4388.robot.commands;
|
||||
import org.usfirst.frc4388.robot.Robot;
|
||||
|
||||
import edu.wpi.first.wpilibj.command.Command;
|
||||
/**
|
||||
* @deprecated use HatchAndBallSet insted for all setting of hatch and ball intakes
|
||||
*/
|
||||
public class HatchFlip extends Command
|
||||
|
||||
public class DeployHatchIntake extends Command
|
||||
{
|
||||
public boolean PickingUp;
|
||||
public boolean deployed;
|
||||
|
||||
public HatchFlip(boolean PickingUP) {
|
||||
this.PickingUp=PickingUP;
|
||||
public DeployHatchIntake(boolean deployed) {
|
||||
this.deployed = !deployed;
|
||||
requires(Robot.pnumatics);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
Robot.pnumatics.setHatchIntakeState(PickingUp);
|
||||
Robot.pnumatics.setHatchIntakeState(deployed);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -10,52 +10,24 @@ package org.usfirst.frc4388.robot.commands;
|
||||
import org.usfirst.frc4388.robot.Robot;
|
||||
import org.usfirst.frc4388.robot.subsystems.Pneumatics;
|
||||
|
||||
import edu.wpi.first.wpilibj.command.Command;
|
||||
import edu.wpi.first.wpilibj.command.CommandGroup;
|
||||
|
||||
/**
|
||||
* Sets the hatch intake and ball intake to the boolean values passed in.
|
||||
* This will have no effect if called and both subsystems are already in the desired state.
|
||||
* @param hatch true is deployed, false is undeployed
|
||||
* @param ball true is deployed, false is undeployed
|
||||
*/
|
||||
public class HatchAndBallSet extends CommandGroup {
|
||||
|
||||
public class HatchAndBallSet extends Command {
|
||||
|
||||
private boolean hatchposition;
|
||||
private boolean ballposition;
|
||||
private boolean hatch;
|
||||
private boolean ball;
|
||||
|
||||
/**
|
||||
* Sets the hatch intake and ball intake to the boolean values passed in.
|
||||
* This will have no effect if called and both subsystems are already in the desired state.
|
||||
* @param hatch true is deploy, false is undeploy
|
||||
* @param ball true is deploy, false is undeploy
|
||||
*/
|
||||
public HatchAndBallSet(boolean hatch, boolean ball) {
|
||||
requires(Robot.pnumatics);
|
||||
hatchposition = !hatch;
|
||||
ballposition = ball;
|
||||
}
|
||||
|
||||
// Called just before this Command runs the first time
|
||||
@Override
|
||||
protected void initialize() {
|
||||
Robot.pnumatics.setBallIntake(ballposition);
|
||||
Robot.pnumatics.setHatchIntakeState(hatchposition);
|
||||
}
|
||||
|
||||
// Called repeatedly when this Command is scheduled to run
|
||||
@Override
|
||||
protected void execute() {
|
||||
}
|
||||
|
||||
// Make this return true when this Command no longer needs to run execute()
|
||||
@Override
|
||||
protected boolean isFinished() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Called once after isFinished returns true
|
||||
@Override
|
||||
protected void end() {
|
||||
}
|
||||
|
||||
// Called when another command which requires one or more of the same
|
||||
// subsystems is scheduled to run
|
||||
@Override
|
||||
protected void interrupted() {
|
||||
this.hatch = hatch;
|
||||
this.ball = ball;
|
||||
addSequential(new DeployHatchIntake(hatch));
|
||||
addParallel(new DeployBallIntake(ball));
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ public class HatchAndBallUp extends CommandGroup {
|
||||
* Add your docs here.
|
||||
*/
|
||||
public HatchAndBallUp() {
|
||||
addSequential(new HatchFlip(true));
|
||||
addSequential(new DeployHatchIntake(true));
|
||||
addParallel(new DeployBallIntake(false));
|
||||
// e.g. addSequential(new Command1());
|
||||
// addSequential(new Command2());
|
||||
|
||||
@@ -16,7 +16,7 @@ public class LiftBallDropHatch extends CommandGroup {
|
||||
* Add your docs here.
|
||||
*/
|
||||
public LiftBallDropHatch() {
|
||||
addSequential(new HatchFlip(false));
|
||||
addSequential(new DeployHatchIntake(false));
|
||||
addParallel(new DeployBallIntake(false));
|
||||
// Add Commands here:
|
||||
// e.g. addSequential(new Command1());
|
||||
|
||||
@@ -16,7 +16,7 @@ public class LiftHatchDropBall extends CommandGroup {
|
||||
* Add your docs here.
|
||||
*/
|
||||
public LiftHatchDropBall() {
|
||||
addSequential(new HatchFlip(true));
|
||||
addSequential(new DeployHatchIntake(true));
|
||||
addParallel(new DeployBallIntake(true));
|
||||
// Add Commands here:
|
||||
// e.g. addSequential(new Command1());
|
||||
|
||||
Reference in New Issue
Block a user