添加了ist8310磁力计的支持,同时修复了gpio初始化先于exti的bug

This commit is contained in:
NeoZng
2023-02-03 15:25:58 +08:00
parent 73cdc66de5
commit 1262f9a516
19 changed files with 326 additions and 124 deletions

View File

@@ -49,7 +49,7 @@ static DJIMotorInstance *motor_lb;
static DJIMotorInstance *motor_rb;
/* 用于自旋变速策略的时间变量,后续考虑查表加速 */
static float t;
// static float t;
/* 私有函数计算的中介变量,设为静态避免参数传递的开销 */
static float chassis_vx, chassis_vy; // 将云台系的速度投影到底盘

View File

@@ -13,7 +13,10 @@
#endif
void RobotInit()
{
{
// 关闭中断,防止在初始化过程中发生中断
// 请不要在初始化过程中使用中断!!!
__disable_irq();
BSPInit();
#if defined(ONE_BOARD) || defined(GIMBAL_BOARD)
@@ -25,6 +28,8 @@ void RobotInit()
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
ChassisInit();
#endif
// 初始化完成,开启中断
__enable_irq();
}
void RobotTask()