#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_pid_update(
pid: *mut PamojaPid,
setpoint: f32,
measurement: f32,
dt: f32,
) -> f32Expand description
Advances a PID controller by one step.
dt is the time since the previous step, in the unit the integral and derivative
gains assume; one at or below zero, or not a finite number, skips the integral and
derivative. A setpoint or measurement that is not a finite number is ignored and the
previous output returned.
§Returns
The control output, or NaN if pid is null.
§Safety
pid must be a live handle from a PID constructor, or null.