diff --git a/User/module/config.c b/User/module/config.c index 2ef4045..8bb0270 100644 --- a/User/module/config.c +++ b/User/module/config.c @@ -27,7 +27,7 @@ Config_RobotParam_t robot_config = { { { // 左髋关节 - .can = BSP_CAN_2, + .can = BSP_CAN_1, .motor_id = 124, .host_id = 0xFF, .module = MOTOR_LZ_RSO3, @@ -36,7 +36,7 @@ Config_RobotParam_t robot_config = { }, { // 左膝关节 - .can = BSP_CAN_2, + .can = BSP_CAN_1, .motor_id = 125, .host_id = 0xFF, .module = MOTOR_LZ_RSO3, @@ -45,7 +45,7 @@ Config_RobotParam_t robot_config = { }, { // 右膝关节 - .can = BSP_CAN_2, + .can = BSP_CAN_1, .motor_id = 126, .host_id = 0xFF, .module = MOTOR_LZ_RSO3, @@ -54,7 +54,7 @@ Config_RobotParam_t robot_config = { }, { // 右髋关节 - .can = BSP_CAN_2, + .can = BSP_CAN_1, .motor_id = 127, .host_id = 0xFF, .module = MOTOR_LZ_RSO3, diff --git a/User/task/ctrl_lz.c b/User/task/ctrl_lz.c index 6a2c58b..500da8e 100644 --- a/User/task/ctrl_lz.c +++ b/User/task/ctrl_lz.c @@ -123,7 +123,7 @@ void Task_ctrl_lz(void *argument) { motor_frame.data[6] = (velocity_int >> 8) & 0xFF; motor_frame.data[7] = velocity_int & 0xFF; - BSP_CAN_TransmitStdDataFrame(BSP_CAN_1, &motor_frame); + BSP_CAN_TransmitStdDataFrame(BSP_CAN_2, &motor_frame); } } diff --git a/User/task/init.c b/User/task/init.c index 4537802..e261f86 100644 --- a/User/task/init.c +++ b/User/task/init.c @@ -31,7 +31,7 @@ void Task_Init(void *argument) { /* 创建任务线程 */ task_runtime.thread.blink = osThreadNew(Task_blink, NULL, &attr_blink); - // task_runtime.thread.imu = osThreadNew(Task_imu, NULL, &attr_imu); + task_runtime.thread.imu = osThreadNew(Task_imu, NULL, &attr_imu); task_runtime.thread.ctrl_lz = osThreadNew(Task_ctrl_lz, NULL, &attr_ctrl_lz); // 创建消息队列