Class TankDrivetrain

    • Method Detail

      • setLeftTarget

        public void setLeftTarget​(double leftTarget)
        Set the "left target", which is a value in the range [-1.0, 1.0]; 1.0 representing full speed forward on the left side of the drivetrain, -1.0 representing full speed backward on the left side of the drivetrain, and 0 representing no movement on the left side of the drivetrain.
        Parameters:
        leftTarget - the left target
      • setRightTarget

        public void setRightTarget​(double rightTarget)
        Set the "right target", which is a value in the range [-1.0, 1.0]; 1.0 representing full speed forward on the right side of the drivetrain, -1.0 representing full speed backward on the right side of the drivetrain, and 0 representing no movement on the right side of the drivetrain.
        Parameters:
        rightTarget - the left target
      • stop

        public void stop()
        Stop all movement by setting all motor target values to 0 and disabling them.
        Specified by:
        stop in class AbstractDrivetrainBase
      • task

        public void task()
                  throws java.lang.Exception
        The background task to run.
        Specified by:
        task in interface Subsystem
        Throws:
        java.lang.Exception - in case the defined task throws any Exceptions