示例#1
0
文件: pid.c 项目: 7Robot/Eurobot_2016
// 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);
}
示例#2
0
文件: limit.c 项目: Angeldude/pd
static void limit_bang(t_limit *x)
{
	limit_float(x, x->x_f);	/* recalculate result */
}