Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions org/bitbuckets/frc2014/RobotMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* @author Default
*/
public class RobotMain extends IterativeRobot {
/** Autonomous command **/
private Command autonCommand;
/** The compressor. */
private Compressor compressor = new Compressor(RobotMap.PRESSURE_SWITCH, RobotMap.COMPRESSOR_RELAY);

Expand All @@ -40,12 +42,15 @@ public void robotInit() {
CommandBase.oi.intakeButton.whenPressed(new IntakeBall());
CommandBase.oi.intakeButton.whenReleased(new IntakeBallOff());
//CommandBase.oi.lightsOnOffButton.whenPressed(new SimpleLights());

autonCommand = new TwoBallAuto();
}

/**
* The method run when autonomous is started.
*/
public void autonomousInit() {
autonCommand.start();
}

/**
Expand Down
39 changes: 39 additions & 0 deletions org/bitbuckets/frc2014/commands/TwoBallAuto.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* FRC 4183 - The Bit Buckets
* Tucson, AZ
*
* FRC 2014 Codebase
*/

package org.bitbuckets.frc2014.commands;

/**
* @author Cal Miller cal@bpmpc.net
*
* <description>
*/

import edu.wpi.first.wpilibj.command.CommandGroup;

/**
*
* @author Cal Miller
*/
public class TwoBallAuto extends CommandGroup {
public TwoBallAuto() {
//need to change Fire and ArmCatapult commands. I'm using them as suggested in issue #25 on Github.
addSequential(new ArmCatapult());
addSequential(new DriveStraight(24,36));
addSequential(new Fire());
addSequential(new RollerOn());
addSequential(new WaitMillis(1000));
addSequential(new RetractIntake());
addSequential(new WaitMillis(500));
addSequential(new ArmCatapult());
addSequential(new Fire());
addSequential(new DriveStraight(36,36));
addParallel(new RetractIntake());
addSequential(new DriveTurn(180,270));

}

}