This commit is contained in:
zcj 2024-05-17 06:23:21 +08:00
parent 89609e884a
commit 589d260cf3
1 changed files with 10 additions and 7 deletions

View File

@ -54,12 +54,12 @@ void UITask()
}
static Graph_Data_t UI_shoot_line[10]; // 射击准线
static Graph_Data_t UI_shoot_line[11]; // 射击准线
static Graph_Data_t UI_shoot_circle[1]; //自瞄标识
static Graph_Data_t UI_Energy[3]; // 电容能量条
static String_Data_t UI_State_sta[6]; // 机器人状态,静态只需画一次
static String_Data_t UI_State_dyn[6]; // 机器人状态,动态先add才能change
static uint32_t shoot_line_location[10] = {540, 960, 490, 515, 565,940};
static uint32_t shoot_line_location[10] = {540, 960, 490, 515, 565,940,1110,465,440};
void MyUIInit()
{
@ -75,15 +75,18 @@ void MyUIInit()
// 绘制发射基准线
UILineDraw(&UI_shoot_line[0], "sl0", UI_Graph_ADD, 7, UI_Color_White, 1, 710, shoot_line_location[0], 1210, shoot_line_location[0]);
UILineDraw(&UI_shoot_line[1], "sl1", UI_Graph_ADD, 7, UI_Color_White, 1, 740, shoot_line_location[1], 340, shoot_line_location[1]);
UILineDraw(&UI_shoot_line[2], "sl2", UI_Graph_ADD, 7, UI_Color_Yellow, 1, 810, shoot_line_location[2], 1110, shoot_line_location[2]);
UILineDraw(&UI_shoot_line[2], "sl2", UI_Graph_ADD, 7, UI_Color_White, 1, 810, shoot_line_location[2], 1110, shoot_line_location[2]);
UILineDraw(&UI_shoot_line[3], "sl3", UI_Graph_ADD, 7, UI_Color_Yellow, 1, 810, shoot_line_location[3], 1110, shoot_line_location[3]);
UILineDraw(&UI_shoot_line[4], "sl4", UI_Graph_ADD, 7, UI_Color_Yellow, 1, 810, shoot_line_location[4], 1110, shoot_line_location[4]);
UILineDraw(&UI_shoot_line[5], "sl5", UI_Graph_ADD, 7, UI_Color_Yellow, 1, shoot_line_location[5], 200, shoot_line_location[5], 800);
UIFloatDraw(&UI_shoot_line[6], "sl6", UI_Graph_ADD, 7, UI_Color_Green, 18, 2, 2, 650, 440, 5500000);
UIFloatDraw(&UI_shoot_line[6], "sl6", UI_Graph_ADD, 7, UI_Color_Green, 18, 2, 2, 650, 400, 5500000);
UIGraphRefresh(&referee_recv_info->referee_id, 7, UI_shoot_line[0], UI_shoot_line[1], UI_shoot_line[2], UI_shoot_line[3], UI_shoot_line[4], UI_shoot_line[5],UI_shoot_line[6]);
UIFloatDraw(&UI_shoot_line[7], "sl7", UI_Graph_ADD, 7, UI_Color_Green, 18, 2, 2, 850, 440, 26000);
UIGraphRefresh(&referee_recv_info->referee_id,1, UI_shoot_line[7]);
UIFloatDraw(&UI_shoot_line[7], "sl7", UI_Graph_ADD, 7, UI_Color_Green, 18, 2, 2, 850, 400, 26000);
UILineDraw(&UI_shoot_line[8], "sl8", UI_Graph_ADD, 7, UI_Color_Yellow, 1, shoot_line_location[6], 200, shoot_line_location[6], 800);
UILineDraw(&UI_shoot_line[9], "sl9", UI_Graph_ADD, 7, UI_Color_Yellow, 1, 810, shoot_line_location[7], 1110, shoot_line_location[7]);
UILineDraw(&UI_shoot_line[10], "sl10", UI_Graph_ADD, 7, UI_Color_White, 1, 810, shoot_line_location[8], 1110, shoot_line_location[8]);
UIGraphRefresh(&referee_recv_info->referee_id,5, UI_shoot_line[7],UI_shoot_line[8],UI_shoot_line[9],UI_shoot_line[10]);
// 绘制车辆状态标志指示
UICharDraw(&UI_State_sta[0], "ss0", UI_Graph_ADD, 8, UI_Color_Main, 15, 2, 150, 750, "chassis:");
@ -270,7 +273,7 @@ static void MyUIRefresh(referee_info_t *referee_recv_info, Referee_Interactive_i
//motor_speed
if (_Interactive_data->Referee_Interactive_Flag.MotorSpeed_flag == 1)
{
UIFloatDraw(&UI_shoot_line[6], "sl6", UI_Graph_Change, 7, UI_Color_Green, 18, 2, 2, 650, 440, _Interactive_data->Chassis_Power_Data.motor_speed * 1000);
UIFloatDraw(&UI_shoot_line[6], "sl6", UI_Graph_Change, 7, UI_Color_Green, 18, 2, 2, 650, 400, _Interactive_data->Chassis_Power_Data.motor_speed * 1000);
UIGraphRefresh(&referee_recv_info->referee_id, 1, UI_shoot_line[6]);
_Interactive_data->Referee_Interactive_Flag.MotorSpeed_flag = 0;
}