src/main/java/frc/robot/commands/TankDrive.java
// Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
@Override
  protected void execute() {
    double leftSpeed = Robot.m_oi.leftJoystick.getY();
    double rightSpeed = Robot.m_oi.rightJoystick.getY();
    double scaler = Robot.m_oi.leftJoystick.getThrottle();
    scaler = ((scaler * -1 + 1) / 2) * RobotMap.SCALER_DRIVE; 
    Robot.m_drivetrain.tankDrive(leftSpeed * scaler * -1, rightSpeed * scaler * -1);
  }
@ Override protected void execute ( ) { double leftSpeed = Robot . m_oi . leftJoystick . getY ( ) ; double rightSpeed = Robot . m_oi . rightJoystick . getY ( ) ; double scaler = Robot . m_oi . leftJoystick . getThrottle ( ) ; scaler = ( ( scaler * - 1 + 1 ) / 2 ) * RobotMap . SCALER_DRIVE ; Robot . m_drivetrain . tankDrive ( leftSpeed * scaler * - 1 , rightSpeed * scaler * - 1 ) ; }
Called repeatedly when this Command is scheduled to run
Called repeatedly when this Command is scheduled to run
//Get the two joystick axis //Get the throttle from the left joystick //Trun the scaler into something we can use //Send values to drivetrain for tankdrive