My PID integral part fixes

This commit is contained in:
Julian Oes
2012-12-19 17:54:18 -08:00
parent 28b3ecd9c6
commit 06407b166f
4 changed files with 33 additions and 27 deletions
+6
View File
@@ -183,3 +183,9 @@ __EXPORT float pid_calculate(PID_t *pid, float sp, float val, float val_dot, flo
return pid->last_output;
}
__EXPORT void pid_reset_integral(PID_t *pid)
{
pid->integral = 0;
}