mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-23 17:42:20 +08:00
半舵·正式发售
This commit is contained in:
@@ -147,7 +147,7 @@ void ChassisInit()
|
||||
};
|
||||
|
||||
chassis_motor_steering_config.can_init_config.tx_id = 2;
|
||||
motor_steering_rf = DJIMotorInit(&chassis_motor_steering_config);
|
||||
motor_steering_rf = DJIMotorInit(&chassis_motor_steering_config);///
|
||||
|
||||
chassis_motor_steering_config.can_init_config.tx_id = 1;
|
||||
motor_steering_lb = DJIMotorInit(&chassis_motor_steering_config);
|
||||
@@ -164,11 +164,11 @@ void ChassisInit()
|
||||
.MaxOut = 50,
|
||||
// .Derivative_LPF_RC = 0.01, // 0.01
|
||||
};
|
||||
PIDInit(&chassis_follow_pid, &chassis_follow_pid_conf);
|
||||
PIDInit(&chassis_follow_pid, &chassis_follow_pid_conf);////
|
||||
|
||||
// 裁判系统初始化
|
||||
|
||||
referee_data = UITaskInit(&huart6,&ui_data); // 裁判系统初始化,会同时初始化UI
|
||||
referee_data = UITaskInit(&huart6,&ui_data); // 裁判系统初始化,会同时初始化UI//
|
||||
|
||||
SuperCap_Init_Config_s cap_conf = {
|
||||
.can_config = {
|
||||
@@ -391,7 +391,6 @@ void ChassisTask() {
|
||||
DJIMotorEnable(motor_steering_rf);
|
||||
DJIMotorEnable(motor_steering_lb);
|
||||
}
|
||||
|
||||
// 根据控制模式设定旋转速度
|
||||
switch (chassis_cmd_recv.chassis_mode)
|
||||
{
|
||||
@@ -403,7 +402,7 @@ void ChassisTask() {
|
||||
float single_round_offset = chassis_cmd_recv.offset_angle;
|
||||
if(single_round_offset > 180.0f)
|
||||
{
|
||||
single_round_offset -= 360.0f;
|
||||
single_round_offset -= 360.0f;///
|
||||
}
|
||||
else if(single_round_offset < -180.0f)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user