// maj de l'intégrale de l'erreur du PID en tenant compte de sa limite max void pid_maj_err_int(Pid *pid){ pid->state.err_int = limit_float(pid->state.err_int + pid->state.err, -(pid->state.max_int), pid->state.max_int); pid->state.err_int_moy = limit_float(pid->state.err_int_moy + pid->state.err_moy, -(pid->state.max_int), pid->state.max_int); }
static void limit_bang(t_limit *x) { limit_float(x, x->x_f); /* recalculate result */ }