From: Harel Dor Date: Sun, 13 Mar 2016 00:18:47 +0000 (-0800) Subject: Drivetrain/auton changes X-Git-Url: http://challenge-bot.com/repos/?p=3501%2Fstronghold-2016;a=commitdiff_plain;h=5c7067897a215194968ba6e53c4f19e8516c6ef5 Drivetrain/auton changes --- diff --git a/src/org/usfirst/frc/team3501/robot/Constants.java b/src/org/usfirst/frc/team3501/robot/Constants.java index a6c7f06f..d47d9034 100644 --- a/src/org/usfirst/frc/team3501/robot/Constants.java +++ b/src/org/usfirst/frc/team3501/robot/Constants.java @@ -116,7 +116,7 @@ public class Constants { public static final double MOAT_SPEED = 0.6; public static final double ROCK_WALL_SPEED = 0.8; public static final double ROUGH_TERRAIN_SPEED = 0.6; - public static final double RAMPART_SPEED = 0.6; + public static final double RAMPART_SPEED = 0.4; public static final double LOW_BAR_SPEED = 0.6; // Defense crossing times in seconds @@ -124,7 +124,7 @@ public class Constants { public static final double MOAT_TIME = 5.0; public static final double ROCK_WALL_TIME = 5.0; public static final double ROUGH_TERRAIN_TIME = 5.0; - public static final double RAMPART_TIME = 5.0; + public static final double RAMPART_TIME = 10.0; public static final double LOW_BAR_TIME = 5.0; // Time to wait before shooting in seconds diff --git a/src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java b/src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java index 50337c73..837d7193 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java +++ b/src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java @@ -1,11 +1,8 @@ package org.usfirst.frc.team3501.robot.commands.auton; -import org.usfirst.frc.team3501.robot.Constants.Auton; import org.usfirst.frc.team3501.robot.Constants.Defense; -import org.usfirst.frc.team3501.robot.commands.shooter.Shoot; import edu.wpi.first.wpilibj.command.CommandGroup; -import edu.wpi.first.wpilibj.command.WaitCommand; public class ChooseStrategy extends CommandGroup { @@ -38,10 +35,10 @@ public class ChooseStrategy extends CommandGroup { else if (defense == Defense.LOW_BAR) addSequential(new PassLowBar()); - addSequential(new AlignToScore(position)); - // TODO: test for how long robot should wait - addSequential(new WaitCommand(Auton.WAIT_TIME)); - addSequential(new Shoot()); + // addSequential(new AlignToScore(position)); + // // TODO: test for how long robot should wait + // addSequential(new WaitCommand(Auton.WAIT_TIME)); + // addSequential(new Shoot()); } } diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java index 73dcde70..0f52e115 100644 --- a/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java +++ b/src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java @@ -199,22 +199,25 @@ public class DriveTrain extends PIDSubsystem { // Handle flipping of the "front" of the robot double k = (isFlipped() ? -1 : 1); - if (type == Constants.DriveTrain.TANK) { - // TODO Test this for negation and for voltage vs. [-1,1] outputs - double leftSpeed = (-frontLeft.get() + -rearLeft.get()) / 2; - double rightSpeed = (-frontRight.get() + -rearRight.get()) / 2; - left = ((Constants.DriveTrain.kADJUST - 1) * leftSpeed + left) - / Constants.DriveTrain.kADJUST; - right = ((Constants.DriveTrain.kADJUST - 1) * rightSpeed + right) - / Constants.DriveTrain.kADJUST; - robotDrive.tankDrive(-left * k, -right * k); - } else if (type == Constants.DriveTrain.ARCADE) { - double speed = (-frontLeft.get() + -rearLeft.get() + -frontRight.get() + -rearRight - .get()) / 2; - left = ((Constants.DriveTrain.kADJUST - 1) * speed + left) - / Constants.DriveTrain.kADJUST; - robotDrive.arcadeDrive(left * k, right); - } + robotDrive.tankDrive(-left, -right); + + // if (type == Constants.DriveTrain.TANK) { + // // TODO Test this for negation and for voltage vs. [-1,1] outputs + // double leftSpeed = (-frontLeft.get() + -rearLeft.get()) / 2; + // double rightSpeed = (-frontRight.get() + -rearRight.get()) / 2; + // left = ((Constants.DriveTrain.kADJUST - 1) * leftSpeed + left) + // / Constants.DriveTrain.kADJUST; + // right = ((Constants.DriveTrain.kADJUST - 1) * rightSpeed + right) + // / Constants.DriveTrain.kADJUST; + // robotDrive.tankDrive(-left * k, -right * k); + // } else if (type == Constants.DriveTrain.ARCADE) { + // double speed = (-frontLeft.get() + -rearLeft.get() + -frontRight.get() + + // -rearRight + // .get()) / 2; + // left = ((Constants.DriveTrain.kADJUST - 1) * speed + left) + // / Constants.DriveTrain.kADJUST; + // robotDrive.arcadeDrive(left * k, right); + // } } public void setMotorSpeeds(double left, double right) {