diff --git a/application/chassis/balance.c b/application/chassis/balance.c index af240a9..0c35852 100644 --- a/application/chassis/balance.c +++ b/application/chassis/balance.c @@ -229,13 +229,13 @@ static uint8_t DrivenMotorIsLost() /* 切换底盘遥控器控制和云台双板控制 */ static void ControlSwitch() { - // // 根据裁判系统底盘输出电压设定底盘状态 - // float chassis_vol = referee_data->PowerHeatData.chassis_voltage * 0.001; - // if (chassis_vol < 15.0f || JointMotorIsLost() || DrivenMotorIsLost()) - // { - // chassis_cmd_recv.chassis_mode = CHASSIS_ZERO_FORCE; // 皆离线,急停 - // return; - // } + // 根据裁判系统底盘输出电压设定底盘状态 + float chassis_vol = referee_data->PowerHeatData.chassis_voltage * 0.001; + if (chassis_vol < 15.0f || JointMotorIsLost() || DrivenMotorIsLost()) + { + chassis_cmd_recv.chassis_mode = CHASSIS_ZERO_FORCE; // 皆离线,急停 + return; + } // // 右侧拨杆向下,进入遥控器底盘控制,此时不响应云台控制指令 // if (switch_is_down(rc_data->rc.switch_right) && RemoteControlIsOnline()) diff --git a/application/robot_def.h b/application/robot_def.h index 0a0afbd..4906d5c 100644 --- a/application/robot_def.h +++ b/application/robot_def.h @@ -18,8 +18,8 @@ /* 开发板类型定义,烧录时注意不要弄错对应功能;修改定义后需要重新编译,只能存在一个定义! */ // #define ONE_BOARD // 单板控制整车 -// #define CHASSIS_BOARD //底盘板 -#define GIMBAL_BOARD //云台板 +#define CHASSIS_BOARD //底盘板 +// #define GIMBAL_BOARD //云台板 #define VISION_USE_VCP // 使用虚拟串口发送视觉数据 // #define VISION_USE_UART // 使用串口发送视觉数据 diff --git a/modules/motor/HTmotor/HT04.c b/modules/motor/HTmotor/HT04.c index eec1167..32b109a 100644 --- a/modules/motor/HTmotor/HT04.c +++ b/modules/motor/HTmotor/HT04.c @@ -121,7 +121,7 @@ HTMotorInstance *HTMotorInit(Motor_Init_Config_s *config) Daemon_Init_Config_s conf = { .callback = HTMotorLostCallback, .owner_id = motor, - .reload_count = 5, // 50ms + .reload_count = 50, // 50ms }; motor->motor_daemon = DaemonRegister(&conf); diff --git a/modules/motor/LKmotor/LK9025.c b/modules/motor/LKmotor/LK9025.c index b98c018..6f159db 100644 --- a/modules/motor/LKmotor/LK9025.c +++ b/modules/motor/LKmotor/LK9025.c @@ -82,7 +82,7 @@ LKMotorInstance *LKMotorInit(Motor_Init_Config_s *config) Daemon_Init_Config_s daemon_config = { .callback = LKMotorLostCallback, .owner_id = motor, - .reload_count = 5, // 50ms + .reload_count = 50, // 50ms }; motor->daemon = DaemonRegister(&daemon_config);