Class ProfileInput
- java.lang.Object
-
- org.team1540.rooster.drive.pipeline.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 toget()begins a timer to determine where the input is in the profile. To execute multiple profiles, create multipleProfileInputs.
-
-
Constructor Summary
Constructors Constructor Description ProfileInput(@NotNull MotionProfile left, @NotNull MotionProfile right)Create a newProfileInput.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TankDriveDataget()booleanisFinished()Returns whether the end of the profile has been reached.
-
-
-
Constructor Detail
-
ProfileInput
public ProfileInput(@NotNull @NotNull MotionProfile left, @NotNull @NotNull MotionProfile right)Create a newProfileInput.- Parameters:
left- The left-side profile to execute.right- The right-side profile to execute.
-
-
Method Detail
-
get
public TankDriveData get()
- Specified by:
getin interfaceSupplier<TankDriveData>
-
isFinished
public boolean isFinished()
Returns whether the end of the profile has been reached.- Returns:
trueif the end of the profile has been reached,falseotherwise.
-
-