mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
将os任务的创建统一转移到app层方便修改,使得架构更加清晰.修复了INS未初始化导致的读取错误
This commit is contained in:
@@ -74,6 +74,11 @@ static void InitQuaternion(float *init_q4)
|
||||
|
||||
attitude_t *INS_Init(void)
|
||||
{
|
||||
if (!INS.init)
|
||||
INS.init = 1;
|
||||
else
|
||||
return (attitude_t *)&INS.Gyro;
|
||||
|
||||
while (BMI088Init(&hspi1, 1) != BMI088_NO_ERROR)
|
||||
;
|
||||
IMU_Param.scale[X] = 1;
|
||||
|
||||
@@ -62,6 +62,8 @@ typedef struct
|
||||
float Pitch;
|
||||
float Yaw;
|
||||
float YawTotalAngle;
|
||||
|
||||
uint8_t init;
|
||||
} INS_t;
|
||||
|
||||
/* 用于修正安装误差的参数 */
|
||||
|
||||
Reference in New Issue
Block a user