Class TankDrive

java.lang.Object
org.chsrobotics.lib.drive.differential.TankDrive
All Implemented Interfaces:
DifferentialDriveMode

public class TankDrive extends Object implements DifferentialDriveMode
Moves the robot in teleoperated mode using one input directly mapped to each wheel.
  • Constructor Details

    • TankDrive

      public TankDrive(JoystickAxis leftAxis, JoystickAxis rightAxis, double driveModifier, double driveLimiter)
      Constructs a TankDrive.
      Parameters:
      leftAxis - The JoystickAxis to be used for the left side.
      rightAxis - The JoystickAxis to be used for the right side.
      driveModifier - A scalar to multiply each input by.
      driveLimiter - The maximum rate of change for each input, in units of input / second. If equal to 0, no rate limiting will be applied.
    • TankDrive

      public TankDrive(JoystickAxis leftAxis, JoystickAxis rightAxis)
      Constructs a TankDrive with no rate limiting.
      Parameters:
      leftAxis - The JoystickAxis to be used for the left side.
      rightAxis - The JoystickAxis to be used for the right side.
  • Method Details