将os任务的创建统一转移到app层方便修改,使得架构更加清晰.修复了INS未初始化导致的读取错误

This commit is contained in:
NeoZng
2023-06-05 22:43:25 +08:00
parent 253f391cd5
commit 72884ef96b
9 changed files with 136 additions and 100 deletions

View File

@@ -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;