Module config

Module config 

Source
Expand description

The config module provides structures for configuring a PID controller.

Gain is a structure that holds the proportional, integral, and derivative gains for a PID controller. Config is a structure that holds a Gain and also provides optional limits for the controller output.

§Examples

use advanced_pid::config::{Config, Gain};

let gain = Gain { kp: 1.0, ki: 0.1, kd: 0.1 };
let config = Config::from(gain);

let config_with_limits = Config::new(1.0, 0.1, 0.1).with_limits(-1.0, 1.0);

Structs§

Config
Config holds a Gain and also provides optional limits for the controller output.
Gain
Gain holds the proportional, integral, and derivative gains for a PID controller.