Interface DriveModule
-
- All Known Implementing Classes:
AnchorModule
,PathFollowerModule
,PowerEfficiencyModule
,PrecisionModule
,ShifterModule
,SpeedConstraintModule
,StabilityModule
,TargetAlignmentModule
,TractionControlModule
,VelocityControlModule
,VoltageControlModule
public interface DriveModule
A drive module which can be added to a ModularDrivetrain to enhance its functionality
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
overridesUser()
Determines if the module should override the user's inputDriveSpeed
run(DriveSpeed currentSpeed, DriveSpeed desiredSpeed, double deltaTime)
Run the drive module
-
-
-
Method Detail
-
run
DriveSpeed run(DriveSpeed currentSpeed, DriveSpeed desiredSpeed, double deltaTime)
Run the drive module- Parameters:
currentSpeed
- the current speed of the drivetraindesiredSpeed
- the desired speed of the drivetraindeltaTime
- the delta time since the last call in seconds- Returns:
- the speed the drivetrain should set
-
overridesUser
default boolean overridesUser()
Determines if the module should override the user's input- Returns:
- true if it overrides the user's input
-
-