一致UI初始化至chassis,添加id自动判断

This commit is contained in:
kidneygood
2023-01-15 21:11:15 +08:00
parent a9e1eb6247
commit 289530ac10
7 changed files with 143 additions and 204 deletions

View File

@@ -19,7 +19,7 @@
#include "referee.h"
#include "general_def.h"
#include "bsp_dwt.h"
#include "referee_UI.h"
#include "arm_math.h"
/* 根据robot_def.h中的macro自动计算的参数 */
@@ -41,7 +41,7 @@ static Subscriber_t *chassis_sub; // 用于订阅底盘的控
static Chassis_Ctrl_Cmd_s chassis_cmd_recv; // 底盘接收到的控制命令
static Chassis_Upload_Data_s chassis_feedback_data; // 底盘回传的反馈数据
static referee_info_t *referee_data; // 裁判系统数据
static referee_info_t *referee_data; // 裁判系统相关数据
static SuperCapInstance *cap; // 超级电容
static DJIMotorInstance *motor_lf; // left right forward back
static DJIMotorInstance *motor_rf;
@@ -101,6 +101,10 @@ void ChassisInit()
referee_data = RefereeInit(&huart6); // 裁判系统初始化
while (referee_data->GameRobotState.robot_id ==0);
Interactive_init(referee_data);
SuperCap_Init_Config_s cap_conf = {
.can_config = {
.can_handle = &hcan2,