Class PathFollowingDrive
java.lang.Object
org.wildstang.framework.subsystems.drive.PathFollowingDrive
- All Implemented Interfaces:
InputListener,Subsystem
Abstract representation of a Drive subsystem which support path following.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns if the software emergency stop has been activated.abstract voidZero all the encoders on the drive base.abstract voidsetBrakeMode(boolean brake) Enable brake or coast mode.abstract voidsetGyro(double degrees) Sets the gyro to the given valueabstract voidEnable the motion profile and start its notifier.abstract voidDisable the motion profile and stop its notifier.abstract voidupdatePathFollower(double[] trajectoryInfo) Update the motion profile.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildstang.framework.io.InputListener
inputUpdateMethods inherited from interface org.wildstang.framework.subsystems.Subsystem
getName, init, initSubsystems, resetState, selfTest, update
-
Field Details
-
profileNotifier
protected edu.wpi.first.wpilibj.Notifier profileNotifier
-
-
Constructor Details
-
PathFollowingDrive
public PathFollowingDrive()
-
-
Method Details
-
setBrakeMode
public abstract void setBrakeMode(boolean brake) Enable brake or coast mode.- Parameters:
brake- True to enable brake mode, false to enable coast.
-
resetEncoders
public abstract void resetEncoders()Zero all the encoders on the drive base. -
isEstopActive
public boolean isEstopActive()Returns if the software emergency stop has been activated.- Returns:
- True if the emergency stop is active.
-
startPathFollower
public abstract void startPathFollower()Enable the motion profile and start its notifier. -
updatePathFollower
public abstract void updatePathFollower(double[] trajectoryInfo) Update the motion profile.- Parameters:
trajectoryInfo- the line of double data for the current step of the path
-
stopPathFollower
public abstract void stopPathFollower()Disable the motion profile and stop its notifier. -
setGyro
public abstract void setGyro(double degrees) Sets the gyro to the given value- Parameters:
degrees- value you want the gyro to currently to be
-