template<typename InputType, typename FilterType>
FilteredControllerInput class
A ControllerInput with a filter built in.
Template parameters | |
---|---|
InputType | the type of the ControllerInput |
FilterType | the type of the Filter |
Contents
Base classes
-
template<typename T>class ControllerInput
Constructors, destructors, conversion operators
- FilteredControllerInput(std::unique_ptr<ControllerInput<InputType>> iinput, std::unique_ptr<FilterType> ifilter)
- A filtered controller input.
Public functions
- auto controllerGet() -> double override
- Gets the sensor value for use in a control loop.
Protected variables
- std::unique_ptr<ControllerInput<InputType>> input
- std::unique_ptr<FilterType> filter
Function documentation
template<typename InputType, typename FilterType>
okapi:: FilteredControllerInput<InputType, FilterType>:: FilteredControllerInput(std::unique_ptr<ControllerInput<InputType>> iinput,
std::unique_ptr<FilterType> ifilter)
A filtered controller input.
Parameters | |
---|---|
iinput | ControllerInput type |
ifilter | Filter type |
Applies a filter to the controller input. Useful if you want to place a filter between a control input and a control loop.
template<typename InputType, typename FilterType>
double okapi:: FilteredControllerInput<InputType, FilterType>:: controllerGet() override
Gets the sensor value for use in a control loop.
Returns | the current filtered sensor value. |
---|
This method might be automatically called in another thread by the controller.