Class NullController
java.lang.Object
com.cdarobotics.cdalib.controllers.Controller
com.cdarobotics.cdalib.controllers.NullController
A no-op
Controller whose update(double, double) always returns 0. Useful
as a placeholder or as a disabled term within a CompoundController.-
Field Summary
Fields inherited from class com.cdarobotics.cdalib.controllers.Controller
target -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleupdate(double current, double dt) Computes the control output for this loop.Methods inherited from class com.cdarobotics.cdalib.controllers.Controller
getTarget, setTarget
-
Constructor Details
-
NullController
public NullController(double target) - Parameters:
target- the initial setpoint (unused, since the output is always0)
-
-
Method Details
-
update
public double update(double current, double dt) Description copied from class:ControllerComputes the control output for this loop.- Specified by:
updatein classController- Parameters:
current- the current measured valuedt- the time elapsed since the previous update, in seconds- Returns:
- the control output to apply
-