Autoformatted

This commit is contained in:
Austen Adler 2016-09-22 10:19:57 -04:00
parent fc7c6545a4
commit 2d5b3699b6
No known key found for this signature in database
GPG Key ID: 7ECEE590CCDFE3F1
4 changed files with 15 additions and 17 deletions

View File

@ -15,10 +15,8 @@ public class Robot extends IterativeRobot {
CommandBase.init(); CommandBase.init();
oi = new OI(); oi = new OI();
chooser = new SendableChooser(); chooser = new SendableChooser();
chooser.addDefault("Time based drive", new RoutineDriveTime()); chooser.addDefault("Time based drive", new RoutineDriveTime());
chooser.addObject("Time based defense", new RoutineDefenseTime()); chooser.addObject("Time based defense", new RoutineDefenseTime());
SmartDashboard.putData("Auto mode", chooser); SmartDashboard.putData("Auto mode", chooser);
SmartDashboard.putData("MainArm", CommandBase.mainArm.getPIDController()); SmartDashboard.putData("MainArm", CommandBase.mainArm.getPIDController());
SmartDashboard.putData("LeftEncoderController", CommandBase.driveBase.getLeftController()); SmartDashboard.putData("LeftEncoderController", CommandBase.driveBase.getLeftController());

View File

@ -5,13 +5,13 @@ public class AutoDriveTime extends CommandBase {
double power; double power;
public AutoDriveTime(double timeout, double power) { public AutoDriveTime(double timeout, double power) {
requires(driveBase); requires(driveBase);
this.power=power; this.power = power;
setTimeout(timeout); setTimeout(timeout);
} }
protected void initialize() { protected void initialize() {
} }
protected void execute() { protected void execute() {
driveBase.driveArcade(0,-power,0,0); driveBase.driveArcade(0, -power, 0, 0);
} }
protected void end() { protected void end() {
driveBase.stopDriving(); driveBase.stopDriving();

View File

@ -2,13 +2,13 @@ package org.usfirst.frc.team2059.robot.commands.autonomous;
import org.usfirst.frc.team2059.robot.commands.CommandBase; import org.usfirst.frc.team2059.robot.commands.CommandBase;
import edu.wpi.first.wpilibj.command.CommandGroup; import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2059.robot.Robot; import org.usfirst.frc.team2059.robot.Robot;
public class RoutineDefenseTime extends CommandGroup{ public class RoutineDefenseTime extends CommandGroup {
public RoutineDefenseTime(){ public RoutineDefenseTime() {
addSequential(new AutoSetArmStopState(true)); addSequential(new AutoSetArmStopState(true));
addSequential(new AutoResetLower(-1)); addSequential(new AutoResetLower(-1));
addSequential(new AutoSetArmPosition(15)); addSequential(new AutoSetArmPosition(15));
addSequential(new AutoSetArmStopState(false)); addSequential(new AutoSetArmStopState(false));
addSequential(new AutoSetArmPosition(11)); addSequential(new AutoSetArmPosition(11));
// addSequential(new AutoDriveTime(2,.5)); // addSequential(new AutoDriveTime(2,.5));
} }
} }

View File

@ -2,9 +2,9 @@ package org.usfirst.frc.team2059.robot.commands.autonomous;
import org.usfirst.frc.team2059.robot.commands.CommandBase; import org.usfirst.frc.team2059.robot.commands.CommandBase;
import edu.wpi.first.wpilibj.command.CommandGroup; import edu.wpi.first.wpilibj.command.CommandGroup;
import org.usfirst.frc.team2059.robot.Robot; import org.usfirst.frc.team2059.robot.Robot;
public class RoutineDriveTime extends CommandGroup{ public class RoutineDriveTime extends CommandGroup {
public RoutineDriveTime(){ public RoutineDriveTime() {
addSequential(new AutoResetLower(-1)); addSequential(new AutoResetLower(-1));
addSequential(new AutoDriveTime(2,.5)); addSequential(new AutoDriveTime(2, .5));
} }
} }