Skip to main content

pid_update

Function pid_update 

Source
pub fn pid_update(
    ctrl: &mut PidController,
    setpoint: f64,
    measured: f64,
    dt: f64,
) -> f64
Expand description

Update PID controller and return the control output.

setpoint is the desired value, measured is the process variable, dt is the time step.