|
@@ -632,25 +632,19 @@ static uint8_t *partial_right1_quick(Machine_info_t *info)
|
|
|
{
|
|
|
case 0:
|
|
|
break;
|
|
|
- case 1 ... 24:
|
|
|
+ case 1 ... 25:
|
|
|
Paint_DrawRectangle(433 - BAT_X_OFFSET, 27, 439 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
break;
|
|
|
- case 25 ... 49:
|
|
|
+ case 26 ... 50:
|
|
|
Paint_DrawRectangle(433 - BAT_X_OFFSET, 27, 439 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
Paint_DrawRectangle(441 - BAT_X_OFFSET, 27, 447 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
break;
|
|
|
- case 50 ... 74:
|
|
|
+ case 51 ... 75:
|
|
|
Paint_DrawRectangle(433 - BAT_X_OFFSET, 27, 439 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
Paint_DrawRectangle(441 - BAT_X_OFFSET, 27, 447 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
Paint_DrawRectangle(449 - BAT_X_OFFSET, 27, 455 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
break;
|
|
|
- case 75 ... 99:
|
|
|
- Paint_DrawRectangle(433 - BAT_X_OFFSET, 27, 439 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
- Paint_DrawRectangle(441 - BAT_X_OFFSET, 27, 447 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
- Paint_DrawRectangle(449 - BAT_X_OFFSET, 27, 455 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
- Paint_DrawRectangle(457 - BAT_X_OFFSET, 27, 462 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
- break;
|
|
|
- case 100:
|
|
|
+ case 76 ... 100:
|
|
|
Paint_DrawRectangle(433 - BAT_X_OFFSET, 27, 439 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
Paint_DrawRectangle(441 - BAT_X_OFFSET, 27, 447 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
|
Paint_DrawRectangle(449 - BAT_X_OFFSET, 27, 455 - BAT_X_OFFSET, 41, WHITE, 1, 1);
|
|
@@ -910,26 +904,27 @@ static uint8_t *partial_right3_quick(void)
|
|
|
Paint_DrawString_EN(300 + x, 70, (char *)arr_string, &ascii_type_16x32, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
|
|
|
uint32_t tmp = 0;
|
|
|
- for (i = 0; i < 5; i++)
|
|
|
+ memset(arr_string, 0, 20);
|
|
|
+ sprintf(arr_string, "%lu", num_max);
|
|
|
+ Paint_DrawString_EN(10, 48, (char *)arr_string, &ascii_type_5x7, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
+ for (i = 1; i < 5; i++)
|
|
|
{
|
|
|
memset(arr_string, 0, 20); // 140 5
|
|
|
tmp = (num_max / 5) * (5 - i);
|
|
|
- // strcpy(arr_string,tmp);
|
|
|
- // itoa(tmp,arr_string,10);//这里导致数值错误
|
|
|
sprintf(arr_string, "%lu", tmp);
|
|
|
// ESP_LOGW(LOG_TAG,"%s",arr_string);
|
|
|
- Paint_DrawString_EN(10, 48 + i * 30, (char *)arr_string, &ascii_type_5x7, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
+ Paint_DrawString_EN(10, 48 + i * 38, (char *)arr_string, &ascii_type_5x7, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
// Paint_DrawString_EN(20,40+i*28,(char*)arr_string, &ascii_type_8x16,FONT_FOREGROUND,FONT_BACKGROUND );
|
|
|
}
|
|
|
|
|
|
- for (i = 0; i < 5; i++) // ur yr y坐标
|
|
|
+ for (i = 0; i < 4; i++) // ur yr y坐标
|
|
|
{
|
|
|
memset(arr_string, 0, 20);
|
|
|
- tmp = (100 / 5) * (5 - i);
|
|
|
+ tmp = (100 / 4) * (4 - i);
|
|
|
// strcpy(arr_string,tmp);
|
|
|
itoa(tmp, arr_string, 10);
|
|
|
strcat(arr_string, ".00%");
|
|
|
- Paint_DrawString_EN(60 + 200, 48 + i * 30, (char *)arr_string, &ascii_type_5x7, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
+ Paint_DrawString_EN(60 + 200, 48 + i * 38, (char *)arr_string, &ascii_type_5x7, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
}
|
|
|
|
|
|
char str_ur[8] = {0xbc, 0xda, 0xb6, 0xaf, 0xc2, 0xca, 0x00, 0x00};
|
|
@@ -1386,7 +1381,9 @@ static void dis_right_sms(void)
|
|
|
memset((uint8_t *)tmp_paint_buf, 0, DISPLAY_BUFFER_SIZE /*sizeof(tmp_paint_buf)*/);
|
|
|
Paint_NewImage((uint8_t *)tmp_paint_buf, 648, 480, ROTATE_270, WHITE);
|
|
|
Paint_DrawBitMap_Paste(gImage_right_instruction, 0, 0, 480, 648, 1);
|
|
|
-
|
|
|
+ //关机显示工站名称
|
|
|
+ int x = center_align(Machine_info.station_name, 480, 16, 32);
|
|
|
+ Paint_DrawString_CN(x, 25, &Machine_info.station_name, &chinese_type_32, FONT_FOREGROUND, FONT_BACKGROUND);
|
|
|
if (!decection_state_0()) // 判断充电中逻辑
|
|
|
{
|
|
|
|
|
@@ -1444,6 +1441,7 @@ static void dis_right_sms(void)
|
|
|
if (read_battery_voltage() < 10)
|
|
|
{
|
|
|
Paint_DrawBitMap_Paste(gImage_low_batt, 30, 428, 420, 154, 1); // 低电量请充电
|
|
|
+ Paint_DrawRectangle(30, 428+154, 420, 640, BLACK, 1, 1);
|
|
|
}
|
|
|
}
|
|
|
|