修复PID堵转检测错误,修复LK电机位置环计算错误,更新文档,修改了消息中心的命名(不影响app层)

This commit is contained in:
NeoZng
2023-05-14 14:56:00 +08:00
parent 299073321b
commit ecb56ef935
12 changed files with 63 additions and 641 deletions

View File

@@ -97,7 +97,7 @@ static void f_Output_Limit(PIDInstance *pid)
static void f_PID_ErrorHandle(PIDInstance *pid)
{
/*Motor Blocked Handle*/
if (pid->Output < pid->MaxOut * 0.001f || fabsf(pid->Ref) < 0.0001f)
if (fabsf(pid->Output) < pid->MaxOut * 0.001f || fabsf(pid->Ref) < 0.0001f)
return;
if ((fabsf(pid->Ref - pid->Measure) / fabsf(pid->Ref)) > 0.95f)