Class PIFController
- java.lang.Object
-
- io.github.frc5024.common_drive.controller.PIFController
-
- All Implemented Interfaces:
BaseController
@Deprecated(since="October 2020", forRemoval=true) public class PIFController extends java.lang.Object implements BaseController
Deprecated, for removal: This API element is subject to removal in a future version.A PIFController is a simple PI + FeedForward calculation.
This is helpful for calculating steering gains
-
-
Constructor Summary
Constructors Constructor Description PIFController(PIFGains gains, boolean signedFF)
Deprecated, for removal: This API element is subject to removal in a future version.Create a PIFController
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
calculate(double error, double dt)
Deprecated, for removal: This API element is subject to removal in a future version.Calculate the controller output with FeedForwarddouble
calculate(double error, double dt, boolean enableFF)
Deprecated, for removal: This API element is subject to removal in a future version.Calculate the controller outputvoid
reset()
Deprecated, for removal: This API element is subject to removal in a future version.Reset the controller
-
-
-
Constructor Detail
-
PIFController
public PIFController(PIFGains gains, boolean signedFF)
Deprecated, for removal: This API element is subject to removal in a future version.Create a PIFController- Parameters:
gains
- PIF gainssignedFF
- Should FF be inverted if the output is negative?
-
-
Method Detail
-
calculate
public double calculate(double error, double dt)
Deprecated, for removal: This API element is subject to removal in a future version.Calculate the controller output with FeedForward- Specified by:
calculate
in interfaceBaseController
- Parameters:
error
- System errordt
- Delta time- Returns:
- Output
-
calculate
public double calculate(double error, double dt, boolean enableFF)
Deprecated, for removal: This API element is subject to removal in a future version.Calculate the controller output- Parameters:
error
- System errordt
- Delta timeenableFF
- Set this to false to bypass the FeedForward calculation- Returns:
- Output
-
reset
public void reset()
Deprecated, for removal: This API element is subject to removal in a future version.Reset the controller- Specified by:
reset
in interfaceBaseController
-
-