裁判系统发送重构前提交
This commit is contained in:
parent
11b401c2bc
commit
7bb41c56b7
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": []
|
||||
}
|
|
@ -3,9 +3,9 @@
|
|||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build task", // 任务标签
|
||||
"type": "shell", // 任务类型,因为要调用mingw32-make,是在终端(CMD)里运行的,所以是shell任务
|
||||
"command": "mingw32-make -j24",// 任务命令,线程数可以根据自己的电脑修改,建议为核数的4~8倍
|
||||
"label": "build task",
|
||||
"type": "shell",
|
||||
"command": "mingw32-make -j24",
|
||||
"problemMatcher": [],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
|
@ -14,21 +14,21 @@
|
|||
},
|
||||
{
|
||||
"label": "download dap",
|
||||
"type": "shell", // 如果希望在下载前编译,可以把command换成下面的命令
|
||||
"command":"mingw32-make download_dap", // "mingw32-make -j24 && mingw32-make download_dap",
|
||||
"group": { // 如果没有修改代码,编译任务不会消耗时间,因此推荐使用上面的替换.
|
||||
"type": "shell",
|
||||
"command": "mingw32-make download_dap",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": false,
|
||||
},
|
||||
"isDefault": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "download jlink",
|
||||
"type": "shell",
|
||||
"command":"mingw32-make download_jlink", // "mingw32-make -j24 && mingw32-make download_dap"
|
||||
"command": "mingw32-make download_jlink",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": false,
|
||||
"isDefault": false
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
|
@ -30,18 +30,19 @@ static void UI_test_init(referee_info_t *_referee_info);//UI测试函数
|
|||
void Referee_Interactive_init()
|
||||
{
|
||||
referee_data = RefereeInit(&huart6); // 裁判系统初始化
|
||||
while (referee_data->GameRobotState.robot_id == 0)
|
||||
;
|
||||
// while (referee_data->GameRobotState.robot_id == 0);
|
||||
referee_data->GameRobotState.robot_id = 101; // syhtodo RobotInit中关闭了中断进行初始化,无法读取到裁判系统的ID,暂时在此处写死
|
||||
determine_ID(referee_data);
|
||||
My_UI_init(referee_data);
|
||||
//UI_test_init(referee_data);
|
||||
// My_UI_init(referee_data);
|
||||
UI_test_init(referee_data); // syhtodo此处先使用测试函数
|
||||
|
||||
for (int i=0;i<Communicate_Data_LEN;i++)
|
||||
{
|
||||
SendData->data[i]=i+1;
|
||||
}
|
||||
referee_data->referee_id.Receiver_Robot_ID = RobotID_BEngineer; // 机器人车间通信时接收者的ID暂时发给蓝色2
|
||||
Communicate_SendData(&referee_data->referee_id,SendData);
|
||||
// syhtodo此处先关闭机器人车间通信
|
||||
// for (int i=0;i<Communicate_Data_LEN;i++)
|
||||
// {
|
||||
// SendData->data[i]=i+1;
|
||||
// }
|
||||
// referee_data->referee_id.Receiver_Robot_ID = RobotID_BEngineer; // 机器人车间通信时接收者的ID暂时发给蓝色2
|
||||
// Communicate_SendData(&referee_data->referee_id,SendData);
|
||||
}
|
||||
|
||||
void Referee_Interactive_task()
|
||||
|
@ -305,7 +306,6 @@ static void My_UI_Refresh(referee_info_t *_referee_info, Referee_Interactive_inf
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 模式切换检测,模式发生切换时,对flag置位
|
||||
* @param Referee_Interactive_info_t *_Interactive_data
|
||||
|
@ -378,7 +378,6 @@ static void UI_test_init(referee_info_t *_referee_info)
|
|||
Integer_Draw(&num[1], "s6", UI_Graph_ADD, 0, UI_Color_Cyan, 50, 5, 1050, 460, 12345);
|
||||
UI_ReFresh(&_referee_info->referee_id, 7, graph[0], graph[1], graph[2], graph[3], graph[4], num[0], num[1]);
|
||||
|
||||
|
||||
Char_Draw(&sdata[0], "s7", UI_Graph_ADD, 0, UI_Color_Green, 20, 2, 620, 710);
|
||||
Char_Write(&sdata[0], "number:%d", 123);
|
||||
Char_ReFresh(&_referee_info->referee_id, sdata[0]);
|
||||
|
|
|
@ -52,6 +52,6 @@ void RobotTask()
|
|||
|
||||
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
|
||||
ChassisTask();
|
||||
Referee_Interactive_task();
|
||||
// Referee_Interactive_task();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ void RefereeSend(uint8_t *send, uint16_t tx_len)
|
|||
{
|
||||
USARTSend(referee_usart_instance, send, tx_len);
|
||||
/* syhtodo DMA请求过快会导致数据发送丢失,考虑数据尽可能打成一个整包以及队列发送,并且发送函数添加缓冲区 */
|
||||
HAL_Delay(5);
|
||||
}
|
||||
|
||||
/*裁判系统串口接收回调函数,解析数据 */
|
||||
|
|
Loading…
Reference in New Issue