ControllerSettings
vectorlib::ControllerSettings — fields, methods, parameters and return types.
pub struct ControllerSettingsConstants for a chassis controller.
Set a constant to 0 and it will be ignored.
let lateral_settings = ControllerSettings::new(
10.0, // proportional gain (kP)
0.0, // integral gain (kI), set to 0 to disable
3.0, // derivative gain (kD), set to 3
3.0, // integral anti windup range, set to 0 to disable
1.0, // small error range, in inches
100.0, // small error range timeout, in milliseconds
3.0, // large error range, in inches
500.0, // large error range timeout, in milliseconds
5.0, // maximum acceleration (slew)
);Fields
Prop
Type
Methods
Prop
Type
new
pub const fn new(
k_p: f32,
k_i: f32,
k_d: f32,
windup_range: f32,
small_error: f32,
small_error_timeout: f32,
large_error: f32,
large_error_timeout: f32,
slew: f32,
) -> SelfSame argument order as LemLib's ControllerSettings constructor.
Parameters
Prop
Type
Returns
Self