mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-23 17:42:20 +08:00
方案——赛场_1.1
This commit is contained in:
@@ -15,7 +15,7 @@ static Subscriber_t *gimbal_sub; // cmd控制消息订阅者
|
||||
static Gimbal_Upload_Data_s gimbal_feedback_data; // 回传给cmd的云台状态信息
|
||||
static Gimbal_Ctrl_Cmd_s gimbal_cmd_recv; // 来自cmd的控制信息
|
||||
static float last_yaw_angle = 0.0f; // 保护模式前的yaw角度
|
||||
// static float last_pitch_angle = 0.0f; // 保护模式前的pitch角度
|
||||
static float last_pitch_angle = 0.0f; // 保护模式前的pitch角度
|
||||
uint8_t in_protection_mode = 0; // 是否在保护模式
|
||||
void GimbalInit()
|
||||
{
|
||||
@@ -148,7 +148,7 @@ void GimbalTask()
|
||||
// 进入保护模式时记录当前角度
|
||||
if (!in_protection_mode) {
|
||||
last_yaw_angle = gimba_IMU_data->YawTotalAngle;
|
||||
// last_pitch_angle = gimba_IMU_data->Pitch;
|
||||
last_pitch_angle = gimba_IMU_data->Pitch;
|
||||
in_protection_mode = 1;
|
||||
}
|
||||
DJIMotorStop(yaw_motor);
|
||||
|
||||
Reference in New Issue
Block a user