裁判系统发送重构前提交

This commit is contained in:
Kidenygood 2023-04-03 17:05:43 +08:00
parent 11b401c2bc
commit 7bb41c56b7
5 changed files with 44 additions and 43 deletions

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": []
}

22
.vscode/tasks.json vendored
View File

@ -3,9 +3,9 @@
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "build task", // "label": "build task",
"type": "shell", // ,mingw32-make,(CMD),shell "type": "shell",
"command": "mingw32-make -j24",// ,线,4~8 "command": "mingw32-make -j24",
"problemMatcher": [], "problemMatcher": [],
"group": { "group": {
"kind": "build", "kind": "build",
@ -14,21 +14,21 @@
}, },
{ {
"label": "download dap", "label": "download dap",
"type": "shell", // ,command "type": "shell",
"command":"mingw32-make download_dap", // "mingw32-make -j24 && mingw32-make download_dap", "command": "mingw32-make download_dap",
"group": { // ,,使. "group": {
"kind": "build", "kind": "build",
"isDefault": false, "isDefault": false
}, }
}, },
{ {
"label": "download jlink", "label": "download jlink",
"type": "shell", "type": "shell",
"command":"mingw32-make download_jlink", // "mingw32-make -j24 && mingw32-make download_dap" "command": "mingw32-make download_jlink",
"group": { "group": {
"kind": "build", "kind": "build",
"isDefault": false, "isDefault": false
}
} }
},
] ]
} }

View File

@ -30,18 +30,19 @@ static void UI_test_init(referee_info_t *_referee_info);//UI测试函数
void Referee_Interactive_init() void Referee_Interactive_init()
{ {
referee_data = RefereeInit(&huart6); // 裁判系统初始化 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); determine_ID(referee_data);
My_UI_init(referee_data); // My_UI_init(referee_data);
//UI_test_init(referee_data); UI_test_init(referee_data); // syhtodo此处先使用测试函数
for (int i=0;i<Communicate_Data_LEN;i++) // syhtodo此处先关闭机器人车间通信
{ // for (int i=0;i<Communicate_Data_LEN;i++)
SendData->data[i]=i+1; // {
} // SendData->data[i]=i+1;
referee_data->referee_id.Receiver_Robot_ID = RobotID_BEngineer; // 机器人车间通信时接收者的ID暂时发给蓝色2 // }
Communicate_SendData(&referee_data->referee_id,SendData); // referee_data->referee_id.Receiver_Robot_ID = RobotID_BEngineer; // 机器人车间通信时接收者的ID暂时发给蓝色2
// Communicate_SendData(&referee_data->referee_id,SendData);
} }
void Referee_Interactive_task() void Referee_Interactive_task()
@ -305,7 +306,6 @@ static void My_UI_Refresh(referee_info_t *_referee_info, Referee_Interactive_inf
} }
} }
/** /**
* @brief ,flag置位 * @brief ,flag置位
* @param Referee_Interactive_info_t *_Interactive_data * @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); 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]); 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_Draw(&sdata[0], "s7", UI_Graph_ADD, 0, UI_Color_Green, 20, 2, 620, 710);
Char_Write(&sdata[0], "number:%d", 123); Char_Write(&sdata[0], "number:%d", 123);
Char_ReFresh(&_referee_info->referee_id, sdata[0]); Char_ReFresh(&_referee_info->referee_id, sdata[0]);

View File

@ -52,6 +52,6 @@ void RobotTask()
#if defined(ONE_BOARD) || defined(CHASSIS_BOARD) #if defined(ONE_BOARD) || defined(CHASSIS_BOARD)
ChassisTask(); ChassisTask();
Referee_Interactive_task(); // Referee_Interactive_task();
#endif #endif
} }

View File

@ -43,7 +43,6 @@ void RefereeSend(uint8_t *send, uint16_t tx_len)
{ {
USARTSend(referee_usart_instance, send, tx_len); USARTSend(referee_usart_instance, send, tx_len);
/* syhtodo DMA请求过快会导致数据发送丢失考虑数据尽可能打成一个整包以及队列发送并且发送函数添加缓冲区 */ /* syhtodo DMA请求过快会导致数据发送丢失考虑数据尽可能打成一个整包以及队列发送并且发送函数添加缓冲区 */
HAL_Delay(5);
} }
/*裁判系统串口接收回调函数,解析数据 */ /*裁判系统串口接收回调函数,解析数据 */