mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 11:37:45 +08:00
将os任务的创建统一转移到app层方便修改,使得架构更加清晰.修复了INS未初始化导致的读取错误
This commit is contained in:
@@ -150,7 +150,7 @@ float PIDCalculate(PIDInstance *pid, float measure, float ref)
|
||||
if (pid->Improve & PID_ErrorHandle)
|
||||
f_PID_ErrorHandle(pid);
|
||||
|
||||
pid->dt = DWT_GetDeltaT((void *)&pid->DWT_CNT); // 获取两次pid计算的时间间隔,用于积分和微分
|
||||
pid->dt = DWT_GetDeltaT(&pid->DWT_CNT); // 获取两次pid计算的时间间隔,用于积分和微分
|
||||
|
||||
// 保存上次的测量值和误差,计算当前error
|
||||
pid->Measure = measure;
|
||||
|
||||
Reference in New Issue
Block a user