mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
修改平衡参数
This commit is contained in:
@@ -77,12 +77,12 @@ static void InitQuaternion(float *init_q4)
|
||||
init_q4[i + 1] = axis_rot[i] * sinf(angle / 2.0f); // 轴角公式,第三轴为0(没有z轴分量)
|
||||
}
|
||||
|
||||
attitude_t *INS_Init(void)
|
||||
INS_t *INS_Init(void)
|
||||
{
|
||||
if (!INS.init)
|
||||
INS.init = 1;
|
||||
else
|
||||
return (attitude_t *)&INS.Gyro;
|
||||
return &INS;
|
||||
|
||||
HAL_TIM_PWM_Start(&htim10, TIM_CHANNEL_1);
|
||||
|
||||
@@ -113,7 +113,7 @@ attitude_t *INS_Init(void)
|
||||
INS.AccelLPF = 0.0085;
|
||||
INS.DGyroLPF = 0.009;
|
||||
DWT_GetDeltaT(&INS_DWT_Count);
|
||||
return (attitude_t *)&INS.Gyro; // @todo: 这里偷懒了,不要这样做! 修改INT_t结构体可能会导致异常,待修复.
|
||||
return &INS; // @todo: 这里偷懒了,不要这样做! 修改INT_t结构体可能会导致异常,待修复.
|
||||
}
|
||||
|
||||
/* 注意以1kHz的频率运行此任务 */
|
||||
|
||||
@@ -84,7 +84,7 @@ typedef struct
|
||||
* @brief 初始化惯导解算系统
|
||||
*
|
||||
*/
|
||||
attitude_t *INS_Init(void);
|
||||
INS_t *INS_Init(void);
|
||||
|
||||
/**
|
||||
* @brief 此函数放入实时系统中,以1kHz频率运行
|
||||
|
||||
Reference in New Issue
Block a user