Autoformatted
This commit is contained in:
parent
fc7c6545a4
commit
2d5b3699b6
@ -15,10 +15,8 @@ public class Robot extends IterativeRobot {
|
||||
CommandBase.init();
|
||||
oi = new OI();
|
||||
chooser = new SendableChooser();
|
||||
|
||||
chooser.addDefault("Time based drive", new RoutineDriveTime());
|
||||
chooser.addObject("Time based defense", new RoutineDefenseTime());
|
||||
|
||||
SmartDashboard.putData("Auto mode", chooser);
|
||||
SmartDashboard.putData("MainArm", CommandBase.mainArm.getPIDController());
|
||||
SmartDashboard.putData("LeftEncoderController", CommandBase.driveBase.getLeftController());
|
||||
|
@ -5,13 +5,13 @@ public class AutoDriveTime extends CommandBase {
|
||||
double power;
|
||||
public AutoDriveTime(double timeout, double power) {
|
||||
requires(driveBase);
|
||||
this.power=power;
|
||||
this.power = power;
|
||||
setTimeout(timeout);
|
||||
}
|
||||
protected void initialize() {
|
||||
}
|
||||
protected void execute() {
|
||||
driveBase.driveArcade(0,-power,0,0);
|
||||
driveBase.driveArcade(0, -power, 0, 0);
|
||||
}
|
||||
protected void end() {
|
||||
driveBase.stopDriving();
|
||||
|
@ -2,13 +2,13 @@ package org.usfirst.frc.team2059.robot.commands.autonomous;
|
||||
import org.usfirst.frc.team2059.robot.commands.CommandBase;
|
||||
import edu.wpi.first.wpilibj.command.CommandGroup;
|
||||
import org.usfirst.frc.team2059.robot.Robot;
|
||||
public class RoutineDefenseTime extends CommandGroup{
|
||||
public RoutineDefenseTime(){
|
||||
addSequential(new AutoSetArmStopState(true));
|
||||
addSequential(new AutoResetLower(-1));
|
||||
addSequential(new AutoSetArmPosition(15));
|
||||
addSequential(new AutoSetArmStopState(false));
|
||||
addSequential(new AutoSetArmPosition(11));
|
||||
public class RoutineDefenseTime extends CommandGroup {
|
||||
public RoutineDefenseTime() {
|
||||
addSequential(new AutoSetArmStopState(true));
|
||||
addSequential(new AutoResetLower(-1));
|
||||
addSequential(new AutoSetArmPosition(15));
|
||||
addSequential(new AutoSetArmStopState(false));
|
||||
addSequential(new AutoSetArmPosition(11));
|
||||
// addSequential(new AutoDriveTime(2,.5));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ package org.usfirst.frc.team2059.robot.commands.autonomous;
|
||||
import org.usfirst.frc.team2059.robot.commands.CommandBase;
|
||||
import edu.wpi.first.wpilibj.command.CommandGroup;
|
||||
import org.usfirst.frc.team2059.robot.Robot;
|
||||
public class RoutineDriveTime extends CommandGroup{
|
||||
public RoutineDriveTime(){
|
||||
addSequential(new AutoResetLower(-1));
|
||||
addSequential(new AutoDriveTime(2,.5));
|
||||
}
|
||||
public class RoutineDriveTime extends CommandGroup {
|
||||
public RoutineDriveTime() {
|
||||
addSequential(new AutoResetLower(-1));
|
||||
addSequential(new AutoDriveTime(2, .5));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user