Drivetrain/auton changes
authorHarel Dor <hareldor@gmail.com>
Sun, 13 Mar 2016 00:18:47 +0000 (16:18 -0800)
committerHarel Dor <hareldor@gmail.com>
Sun, 13 Mar 2016 00:18:47 +0000 (16:18 -0800)
src/org/usfirst/frc/team3501/robot/Constants.java
src/org/usfirst/frc/team3501/robot/commands/auton/ChooseStrategy.java
src/org/usfirst/frc/team3501/robot/subsystems/DriveTrain.java

index a6c7f06f379b6fbfbf68d3db367973b0539950db..d47d9034fb55363b39f897fc24e3d1a35b4438b6 100644 (file)
@@ -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
index 50337c73f40d7190bf5d89e1fe1296dac4e98502..837d7193f43a9afb7e2e9a047e81886fb004b720 100644 (file)
@@ -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());
 
   }
 }
index 73dcde7087954b041c3e102516b973dfa4de42d1..0f52e115d8eda7dca2cfbf7b04cc8a49fb08084b 100644 (file)
@@ -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) {