 package edu.stuy.commands;

import static edu.stuy.RobotMap.*;
import edu.stuy.Robot;
import edu.wpi.first.wpilibj.command.Command;

/**
 *
 */
public class DrivetrainTankDriveCommand extends Command {

    public DrivetrainTankDriveCommand() {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        requires(Robot.drivetrain);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        double left = Robot.oi.driverPad.getLeftY();
        double right = Robot.oi.driverPad.getRightY();
        if (Robot.oi.driverPad.getRawLeftTrigger() || Robot.oi.driverPad.getRawLeftBumper()) {
            Robot.drivetrain.setSpeedUp(false);
        }
        if (Robot.oi.driverPad.getRawRightTrigger() || Robot.oi.driverPad.getRawRightBumper()) {
            Robot.drivetrain.setSpeedUp(true);
        }

        if (Robot.drivetrain.isSpeedUp()) {
            Robot.drivetrain.tankDrive(-left, -right);
        } else {
            Robot.drivetrain.tankDrive(-left * DRIVETRAIN_SLOWNESS_FACTOR, -right * DRIVETRAIN_SLOWNESS_FACTOR);
        }
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        // This is Drivetrain's default command.
        return false;
    }

    // Called once after isFinished returns true
    protected void end() {
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}

@@ -1,9 +1,8 @@
- 
 package 
@@ -79,16 +79,52 @@
 .Robot;%0A
+import edu.wpi.first.wpilibj.Timer;%0A
 import e
@@ -232,16 +232,47 @@
 mand %7B%0A%0A
+    private double startTime;%0A%0A
     publ
@@ -745,24 +745,155 @@
 etRightY();%0A
+        %0A        if (Math.abs(left) %3C .05 && Math.abs(right) %3C .05) %7B%0A            startTime = Timer.getFPGATimestamp();%0A        %7D%0A%0A
         if (
@@ -1275,22 +1275,51 @@
 ive(
+getRampSpeed(
 -left
+)
 , 
+-getRampSpeed(
 -right)
+)
 ;%0A  
@@ -1372,21 +1372,35 @@
 nkDrive(
+getRampSpeed(
 -left
+)
  * DRIVE
@@ -1422,22 +1422,36 @@
 FACTOR, 
+getRampSpeed(
 -right
+)
  * DRIVE
@@ -1487,24 +1487,396 @@
    %7D%0A    %7D%0A%0A
+    private double getRampSpeed(double m) %7B%0A        double t = Timer.getFPGATimestamp() - startTime;%0A        double speed;%0A        if (t %3C 0.5) %7B%0A            speed = 2 * t * t;%0A        %7D else if (t %3C 1) %7B%0A            speed = -2 * t * t + 4 * t - 1;%0A        %7D else %7B%0A            speed = 1;%0A        %7D%0A        return speed * 0.6 * m; // Lower maximum speed to 0.6 * m%0A    %7D%0A%0A
     // Make 

Add untested temporary solution to ramping in teleop