Class PrecisionModule
- java.lang.Object
-
- com.thegongoliers.output.drivetrain.PrecisionModule
-
- All Implemented Interfaces:
DriveModule
public class PrecisionModule extends java.lang.Object implements DriveModule
A drivetrain module which will allow higher precision driving at lower speeds.
-
-
Constructor Summary
Constructors Constructor Description PrecisionModule(double strength)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DriveSpeed
run(DriveSpeed currentSpeed, DriveSpeed desiredSpeed, double deltaTime)
Run the drive modulevoid
setStrength(double strength)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.thegongoliers.output.drivetrain.DriveModule
overridesUser
-
-
-
-
Method Detail
-
run
public DriveSpeed run(DriveSpeed currentSpeed, DriveSpeed desiredSpeed, double deltaTime)
Description copied from interface:DriveModule
Run the drive module- Specified by:
run
in interfaceDriveModule
- 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
-
setStrength
public void setStrength(double strength)
-
-