Skip to main content

Crate use_pid

Crate use_pid 

Source
Expand description

Minimal PID controller primitives.

The controller keeps only the current gains and the state required for the integral and derivative terms.

§Examples

use use_pid::{PidController, PidGains};

let mut controller = PidController::new(PidGains {
    kp: 2.0,
    ki: 0.0,
    kd: 0.0,
})
.unwrap();

assert_eq!(controller.update(5.0, 3.0, 0.5).unwrap(), 4.0);

Structs§

PidController
PidGains
PidState

Enums§

PidError