mirror of
https://gitee.com/dlmu-cone/bf_original_balance_chassis
synced 2026-07-24 03:27:45 +08:00
修复电机反馈的bug,通信bug,ps2手柄支持,舵机的修复,cmdbug的修复
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "bsp_temperature.h"
|
||||
#include "spi.h"
|
||||
#include "user_lib.h"
|
||||
|
||||
#include "general_def.h"
|
||||
static INS_t INS;
|
||||
static IMU_Param_t IMU_Param;
|
||||
static PIDInstance TempCtrl = {0};
|
||||
@@ -118,11 +118,18 @@ void INS_Task(void)
|
||||
}
|
||||
BodyFrameToEarthFrame(INS.MotionAccel_b, INS.MotionAccel_n, INS.q); // 转换回导航系n
|
||||
|
||||
// 获取最终数据
|
||||
//获取最终数据
|
||||
INS.Accel[X] = INS.Accel[X]*RAD_2_ANGLE;
|
||||
INS.Accel[Y] = INS.Accel[Y]*RAD_2_ANGLE;
|
||||
INS.Accel[Z] = INS.Accel[Z]*RAD_2_ANGLE;
|
||||
INS.Gyro[X] = INS.Gyro[X]*RAD_2_ANGLE;
|
||||
INS.Gyro[Y] = INS.Gyro[Y]*RAD_2_ANGLE;
|
||||
INS.Gyro[Z] = INS.Gyro[Z]*RAD_2_ANGLE;
|
||||
INS.Yaw = QEKF_INS.Yaw;
|
||||
INS.Pitch = QEKF_INS.Pitch;
|
||||
INS.Roll = QEKF_INS.Roll;
|
||||
INS.YawTotalAngle = QEKF_INS.YawTotalAngle;
|
||||
|
||||
}
|
||||
|
||||
// temperature control
|
||||
|
||||
Reference in New Issue
Block a user