Class ProfileInput

  • All Implemented Interfaces:
    Supplier<TankDriveData>, Input<TankDriveData>

    public class ProfileInput
    extends Object
    implements Input<TankDriveData>
    Class to get commanded drive values from a set of motion profiles. This class is non-reusable; the first call to get() begins a timer to determine where the input is in the profile. To execute multiple profiles, create multiple ProfileInputs.
    • Constructor Detail

      • ProfileInput

        public ProfileInput​(@NotNull
                            @NotNull MotionProfile left,
                            @NotNull
                            @NotNull MotionProfile right)
        Create a new ProfileInput.
        Parameters:
        left - The left-side profile to execute.
        right - The right-side profile to execute.
    • Method Detail

      • isFinished

        public boolean isFinished()
        Returns whether the end of the profile has been reached.
        Returns:
        true if the end of the profile has been reached, false otherwise.