Class PathFollowingDrive
- java.lang.Object
-
- org.wildstang.framework.subsystems.drive.PathFollowingDrive
-
- All Implemented Interfaces:
InputListener
,Subsystem
public abstract class PathFollowingDrive extends java.lang.Object implements Subsystem
Abstract representation of a Drive subsystem which support path following.
-
-
Field Summary
Fields Modifier and Type Field Description protected edu.wpi.first.wpilibj.Notifier
profileNotifier
-
Constructor Summary
Constructors Constructor Description PathFollowingDrive()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
isEstopActive()
Returns if the software emergency stop has been activated.abstract void
resetEncoders()
Zero all the encoders on the drive base.abstract void
setBrakeMode(boolean brake)
Enable brake or coast mode.abstract void
setGyro(double degrees)
Sets the gyro to the given valueabstract void
startPathFollower()
Enable the motion profile and start its notifier.abstract void
stopPathFollower()
Disable the motion profile and stop its notifier.abstract void
updatePathFollower(double[] trajectoryInfo)
Update the motion profile.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildstang.framework.io.InputListener
inputUpdate
-
-
-
-
Method Detail
-
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
-
-