Commit 5cfe1bf4 authored by hu's avatar hu

调整界面显示

parent d8fbf34c
......@@ -7,39 +7,6 @@
.\common\TYW_stdint.h
.\UDS\APP\Common\libhello.h
.\UDS\APP\Common\libhello.a
.\Graphic\GUI_VC66\GUI_VC66_General.c
.\Graphic\GUI_VC66\GUI_VC66_General.h
.\Graphic\GUI_VC66\GUI_VC66_Include.h
.\Graphic\GUI_VC66\GUI_VC66_Usually.c
.\Graphic\GUI_VC66\GUI_VC66_Usually.h
.\Graphic\GUI_VC66\GUI_VC66_Popup.c
.\Graphic\GUI_VC66\GUI_VC66_Popup.h
.\Graphic\GUI_VC66\GUI_VC66_Menu_User.c
.\Graphic\GUI_VC66\GUI_VC66_Menu_User.h
.\Graphic\GUI_VC66\GUI_VC66_Menu_DLR.c
.\Graphic\GUI_VC66\GUI_VC66_Menu_DLR.h
.\Graphic\GUI_VC66\GUI_VC66_Menu_Fty.c
.\Graphic\GUI_VC66\GUI_VC66_Menu_Fty.h
.\Graphic\GUI_VC66\GUI_VC66_AC_AdBule.c
.\Graphic\GUI_VC66\GUI_VC66_AC_AdBule.h
.\Graphic\GUI_VC66\GUI_VC66_AC_TEMP.c
.\Graphic\GUI_VC66\GUI_VC66_AC_TEMP.h
.\Graphic\GUI_VC66\GUI_VC66_AC_WET.c
.\Graphic\GUI_VC66\GUI_VC66_AC_WET.h
.\Graphic\GUI_VC66\GUI_VC66_ADAS.c
.\Graphic\GUI_VC66\GUI_VC66_ADAS.h
.\Graphic\GUI_VC66\GUI_VC66_Date.c
.\Graphic\GUI_VC66\GUI_VC66_Date.h
.\Graphic\GUI_VC66\GUI_VC66_DrivingSupport.c
.\Graphic\GUI_VC66\GUI_VC66_DrivingSupport.h
.\Graphic\GUI_VC66\GUI_VC66_Gear.c
.\Graphic\GUI_VC66\GUI_VC66_Gear.h
.\Graphic\GUI_VC66\GUI_VC66_ODO.c
.\Graphic\GUI_VC66\GUI_VC66_ODO.h
.\Graphic\GUI_VC66\GUI_VC66_Time.c
.\Graphic\GUI_VC66\GUI_VC66_Time.h
.\Graphic\GUI_VC66\GUI_VC66_TRIPA.c
.\Graphic\GUI_VC66\GUI_VC66_TRIPA.h
.\Graphic\GUI\GUI.c
.\Graphic\GUI\GUI.h
.\Graphic\GUI\GUI_Interface.c
......
No preview for this file type
This diff is collapsed.
project .intvect 1536
project .text 291052
project .rodata 406279
project .text 290252
project .rodata 408703
project .secinfo 120
project .syscall 6
project .romdata 7717
project .romdata 9029
project .ROM.ramfunc 208
project .ramfunc 208
......@@ -12,13 +12,13 @@
static struct
{
uint8_t Number ;
en_ADBULE_Sta DisplaySta ;
}AdBuleVariable ;
uint8_t Number ;
en_ADBULE_Sta DisplaySta ;
} AdBuleVariable ;
/*-------------------------------------------------------------------------
* Function Name : AdBule_KL30_Init
* Description :
* Description :
* Input : None
* Output : None
* Return : None
......@@ -31,27 +31,27 @@ void AdBule_KL30_Init(void)
}
void AdBule_KL15_ON_Init(void)
{
AdBuleVariable.Number = 0u;
AdBuleVariable.Number = 0u;
AdBuleVariable.DisplaySta = ADBULE_LED_OFF;
}
void AdBule_KL15_OFF_Init(void)
{
AdBuleVariable.Number = 0u;
AdBuleVariable.Number = 0u;
AdBuleVariable.DisplaySta = ADBULE_LED_OFF;
}
void AdBule_Wakeup_Init(void)
{
AdBuleVariable.Number = 0u;
AdBuleVariable.Number = 0u;
AdBuleVariable.DisplaySta = ADBULE_LED_OFF;
}
void AdBule_Sleep_Init(void)
{
AdBuleVariable.Number = 0u;
AdBuleVariable.Number = 0u;
AdBuleVariable.DisplaySta = ADBULE_LED_OFF;
}
/*-------------------------------------------------------------------------
* Function Name : AdBule_Processing_Service
* Description :
* Description :
* Input : None
* Output : None
* Return : None
......@@ -59,68 +59,68 @@ void AdBule_Sleep_Init(void)
--------------------------------------------------------------------------*/
void AdBule_Processing_Service(void)
{
uint8_t Msg_Tank_Level = 0 ;
uint8_t Msg_Level_blinking = 0 ;
uint8_t u8Number = 0 ;
en_ADBULE_Sta u8DisplaySta = ADBULE_LED_OFF ;
Msg_Tank_Level = Get_ID_18FF2300_Sig_Tank_Level();
Msg_Level_blinking = Get_ID_18FF2300_Sig_Level_blinking();
//if(Get_CanFirstRecv_Event(ID_CanMsg18FF2300_Msg_Count) == 0)
//{
// u8Number = 0u;
// u8DisplaySta = ADBULE_LED_OFF;
//}
//else if (CAN_MSG_Status(ID_CanMsg18FF2300_Msg_Count) == CAN_SIG_LOST)
if (CAN_MSG_Status(ID_CanMsg18FF2300_Msg_Count) == CAN_SIG_LOST)
{
u8Number = 0u;
u8DisplaySta = ADBULE_LED_OFF;
}
else
{
if(Msg_Tank_Level == 0x3C)
{
u8Number = 5u;
}
else if(Msg_Tank_Level == 0x1C)
{
u8Number = 4u;
}
else if(Msg_Tank_Level == 0x0C)
{
u8Number = 3u;
}
else if(Msg_Tank_Level == 0x04)
{
u8Number = 2u;
}
else if(Msg_Tank_Level == 0x02)
{
u8Number = 1u;
}
else
{
u8Number = 0u;
}
if(Msg_Level_blinking == 0x03)
{
u8DisplaySta = ADBULE_LED_3HZ_FLASH ;
}
else if(Msg_Level_blinking == 0x01)
{
u8DisplaySta = ADBULE_LED_1HZ_FLASH ;
}
else
{
u8DisplaySta = ADBULE_LED_ON ;
}
}
AdBuleVariable.Number = u8Number ;
AdBuleVariable.DisplaySta = u8DisplaySta ;
uint8_t Msg_Tank_Level = 0 ;
uint8_t Msg_Level_blinking = 0 ;
uint8_t u8Number = 0 ;
en_ADBULE_Sta u8DisplaySta = ADBULE_LED_OFF ;
Msg_Tank_Level = Get_ID_18FF2300_Sig_Tank_Level();
Msg_Level_blinking = Get_ID_18FF2300_Sig_Level_blinking();
//if(Get_CanFirstRecv_Event(ID_CanMsg18FF2300_Msg_Count) == 0)
//{
// u8Number = 0u;
// u8DisplaySta = ADBULE_LED_OFF;
//}
//else if (CAN_MSG_Status(ID_CanMsg18FF2300_Msg_Count) == CAN_SIG_LOST)
if (CAN_MSG_Status(ID_CanMsg18FF2300_Msg_Count) == CAN_SIG_LOST)
{
u8Number = 0u;
u8DisplaySta = ADBULE_LED_OFF;
}
else
{
if (Msg_Tank_Level == 0x3C)
{
u8Number = 5u;
}
else if (Msg_Tank_Level == 0x1C)
{
u8Number = 4u;
}
else if (Msg_Tank_Level == 0x0C)
{
u8Number = 3u;
}
else if (Msg_Tank_Level == 0x04)
{
u8Number = 2u;
}
else if (Msg_Tank_Level == 0x02)
{
u8Number = 1u;
}
else
{
u8Number = 0u;
}
if (Msg_Level_blinking == 0x03)
{
u8DisplaySta = ADBULE_LED_3HZ_FLASH ;
}
else if (Msg_Level_blinking == 0x01)
{
u8DisplaySta = ADBULE_LED_1HZ_FLASH ;
}
else
{
u8DisplaySta = ADBULE_LED_ON ;
}
}
AdBuleVariable.Number = u8Number ;
AdBuleVariable.DisplaySta = u8DisplaySta ;
}
/*-------------------------------------------------------------------------
......@@ -150,6 +150,4 @@ en_ADBULE_Sta AdBule_Get_Display_Sta(void)
en_ADBULE_Sta u8Result = ADBULE_LED_OFF;
u8Result = AdBuleVariable.DisplaySta;
return u8Result;
}
}
\ No newline at end of file
......@@ -24,10 +24,9 @@
#define DATA_GEAR_UP_FLASH 0x03u
typedef enum
{
GEAR_MANUAL_OFF = 0 ,
GEAR_MANUAL_ON ,
}en_GEAR_Sta ;
GEAR_MANUAL_OFF = 0 ,
GEAR_MANUAL_ON ,
} en_GEAR_Sta ;
void Gear_KL30_Init(void);
void Gear_KL15_ON_Init(void);
......
This diff is collapsed.
......@@ -2,17 +2,71 @@
#ifndef GUI_H_
#define GUI_H_
#include "loc_graphics.h"
#include "images.h"
#include "TYW_stdint.h"
static const uint32_t GUIWedk[7u] = {CN_xingqiyi, CN_xingqier, CN_xingqisan, CN_xingqisi, CN_xingqiwu, CN_xingqiliu, CN_xingqiri};
static const uint32_t GUIGear[12u] = {CN_dangwei_01, CN_dangwei_02, CN_dangwei_03, CN_dangwei_04, CN_dangwei_05, CN_dangwei_06,
CN_dangwei_07, CN_dangwei_08, CN_dangwei_09, CN_dangwei_10, CN_dangwei_11, CN_dangwei_12
};
static const uint16_t GUI_DISP_AC_TEMP[2] = {229u, 216u}; /*室外温度数字显示*/
static const uint16_t GUI_DISP_Hours[2] = {370, 349};
static const uint16_t GUI_DISP_Minutes[2] = {428, 406};
static const uint16_t GUI_DISP_Year[4] = {568, 552, 538, 522};
static const uint16_t GUI_DISP_Month[2] = {617, 604};
static const uint16_t GUI_DISP_Date[2] = {669, 653};
static const uint16_t GUI_DISP_TRIPA[5] = {676, 648, 629, 610, 591};/*TRIP*/
static const uint16_t GUI_DISP_ODO[7] = {676, 657, 638, 619, 600, 581, 562};/*ODO*/
static const uint16_t GUI_DISP_DrivingSupport[3] = {481, 459, 436};/*定速巡航*/
extern void GUI_Display_KL15_ON_Init(void);
extern void GUI_Display_KL15_OFF_Init(void);
extern void GUI_Display_background(void);
extern void GUI_Display_OftenShow_Group(void);
extern void GUI_wby_test_Display(void) ;
extern void GUI_Display_background(void); /*刷底图*/
extern void GUI_OftenShow_Display(void);/*常显界面*/
extern void GUI_Dynamic_DIsplay(void);
void GUI_AC_Temp_Dispaly(uint8_t Mode);/*室外温度显示*/
void GUI_Time_Dispaly(uint8_t Mode);/*时间显示*/
void GUI_Data_Dispaly(uint8_t Mode);/*日历显示*/
void GUI_TFTTelltales_Display(uint8_t Mode);/*TFT指示灯*/
void GUI_WetGas_Dispaly(uint8_t Mode);/*wet气压*/
void GUI_AdBlue_Dispaly(uint8_t Mode);/**/
void Gui_TRIPA_Display(uint8_t Mode);
void Gui_TRIPB_Display(uint8_t Mode);
void Gui_ODO_Display(uint8_t Mode);
void Gui_ADAS_Display(uint8_t Mode);
void Gui_DrivingSupport_Display(uint8_t Mode);/*定速巡航*/
void Gui_Gear_Display(uint8_t Mode);/*挡位*/
void GUI_Test_Dispaly (uint8_t Mode);
#endif
......
#include "GUI_VC66_AC_AdBule.h"
#include "Data_AdBule.h"
/*ZH:*/
static uint8_t Logic_Processing(void);
/*尿素显示*/
void Gui_Display_AC_AdBule(void)
{
static uint8_t last_value = 5u;//上次调用本函数时的Logic_Processing()返回值。
uint8_t current_value;//本次调用本函数时的Logic_Processing()返回值。
current_value = Logic_Processing();
switch (current_value)
{
case 0u:{
;
}
break;
case 1u:{
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_01, GUI_BLENDMODE_SRC_OVER);
}
break;
case 2u:{
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_01, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_02, GUI_BLENDMODE_SRC_OVER);
}
break;
case 3u:{
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_01, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_02, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_03, GUI_BLENDMODE_SRC_OVER);
}
break;
case 4u:{
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_01, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_02, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_03, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_04, GUI_BLENDMODE_SRC_OVER);
}
break;
case 5u:{
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_01, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_02, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_03, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_04, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(AdBlue_Sprite, CN_tianlanyezouge_05, GUI_BLENDMODE_SRC_OVER);
}
break;
default:{
;
}
break;
}
GUI_General_Display(AdBlue_Sprite, CN_tianlanye, GUI_BLENDMODE_SRC_OVER);//常显的表框和图标
GUI_General_Display(AdBlue_Sprite, CN_tianlanyefuhaodeng, GUI_BLENDMODE_SRC_OVER);
if (current_value < last_value)//若本次要显示的格数小于上次显示的格数,则清空本次未刷的图。
{
GUI_General_Display(AdBlue_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
else
{
;
}
/******************************************************************************************/
last_value = current_value;//本句 尽可能 放在 本函数体 的结尾位置。
}
uint8_t Logic_Processing(void)
{
uint8_t in_1 = AdBule_Get_Number();
en_ADBULE_Sta in_2 = AdBule_Get_Display_Sta();
uint8_t out;
switch (in_2)
{
case ADBULE_LED_1HZ_FLASH :
{
if (FLASH_SYNC_1Hz)
{
out = in_1;
}
else
{
out = 0u;
}
}
break;
case ADBULE_LED_3HZ_FLASH :
{
if (FLASH_SYNC_2Hz)
{
out = in_1;
}
else
{
out = 0u;
}
}
break;
case ADBULE_LED_ON :
{
out = in_1;
}
break;
case ADBULE_LED_OFF :
{
out = 0u;
}
break;
default :
{
out = 0u;
}
break;
}
return out;
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_AC_ADBULE_H
#define GUI_VC66_AC_ADBULE_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_AC_AdBule(void);
/*:ZH*/
#endif
#include "GUI_VC66_AC_TEMP.h"
/*ZH:*/
/*外温 显示*/
static const uint16_t GUI_DISP_AC_TEMP[2] = {229, 216};
void Gui_Display_AC_TEMP(void)
{
uint8_t AC_TEMP_value = 0u;
AC_TEMP_value = 17u;
GUI_General_Display(Temp_Sprite, CN_xiaotianqi, GUI_BLENDMODE_SRC_OVER); //显示 天气图标
GUI_General_Display(Temp_Sprite, CN_shiwaiwendu, GUI_BLENDMODE_SRC_OVER); //显示文字 “ 室外温度 ”
GUI_General_Display(Temp_Sprite, CN_wendudanwei, GUI_BLENDMODE_SRC_OVER); //显示 温度单位
if (1u)
{
GUI_Translate_Display(Temp_Sprite, Nb_12_heng, 207u, 58u, GUI_BLENDMODE_SRC_OVER); //显示 负号
}
/*显示 外温 的数值*/
GUI_General_Digit_Display(Temp_Sprite, AC_TEMP_value, Nb_12_0, 2u, 1u, GUI_DISP_AC_TEMP, 48, GUI_BLENDMODE_SRC_OVER);
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_AC_TEMP_H
#define GUI_VC66_AC_TEMP_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_AC_TEMP(void);
/*:ZH*/
#endif
#include "GUI_VC66_AC_WET.h"
/*ZH:*/
const uint16_t wet_picture[17] =
{
CN_qiyazouge_01,
CN_qiyazouge_02,
CN_qiyazouge_03,
CN_qiyazouge_04,
CN_qiyazouge_05,
CN_qiyazouge_06,
CN_qiyazouge_07,
CN_qiyazouge_08,
CN_qiyazouge_09,
CN_qiyazouge_10,
CN_qiyazouge_11,
CN_qiyazouge_12,
CN_qiyazouge_13,
CN_qiyazouge_14,
CN_qiyazouge_15,
CN_qiyazouge_16,
CN_qiyazouge_17,
}; // 建立数组存储17个气压格的图片枚举。
static uint8_t Logic_Processing(void);
/*气压 显示*/
void Gui_Display_AC_WET(void)
{
static uint8_t last_value = 18u;//上次调用本函数时的Logic_Processing()返回值。
uint8_t current_value;//本次调用本函数时的Logic_Processing()返回值。
uint8_t i;
current_value = Logic_Processing();
GUI_General_Display(WET_Sprite, CN_qiyafuhaodeng, GUI_BLENDMODE_SRC_OVER); // 刷气压符号灯。
if (current_value > 17u)
{
;//上层数据大于17时,不显示长条的气压表框。
}
else
{
GUI_General_Display(WET_Sprite, CN_qiya, GUI_BLENDMODE_SRC_OVER); // 刷长条的气压表框。
for (i = 0; i < current_value; i++)
{
GUI_General_Display(WET_Sprite, wet_picture[i], GUI_BLENDMODE_SRC_OVER); // current_value 为几,就显示几格气压。
}
}
if (current_value < last_value)//若本次要显示的格数小于上次显示的格数,则清空本次未刷的图。
{
GUI_General_Display(WET_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
else if (current_value > 17u)//若本次要显示的格数 大于或等于18,则清空本次未刷的图。
{
GUI_General_Display(WET_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
else
{
;
}
/******************************************************************************************/
last_value = current_value;//本句 尽可能 放在 本函数体 的结尾位置。
}
uint8_t Logic_Processing(void)
{
uint8_t in_1 = 123u;
uint8_t in_2 = 123u;
uint8_t out;
out = 10u;
return out;
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_AC_WET_H
#define GUI_VC66_AC_WET_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_AC_WET(void);
/*:ZH*/
#endif
#include "GUI_VC66_ADAS.h"
#include "Data_ADAS.h"
/*************************************/
uint8_t zh_processed_value_L = 0u;
/********************************/
/*ZH:*/
/*ADAS显示*/
void Gui_Display_ADAS(void)
{
static uint8_t last_value_M = 0u;//记录上一次的值。
uint8_t current_value_M = 0u;//本次获取的值。
uint8_t processed_value_M = 0u;//经过处理的值。
static uint8_t last_value_L= 0u;//记录上一次的值。
uint8_t current_value_L = 0u;//本次获取的值。
uint8_t processed_value_L = 0u;//经过处理的值。
static uint8_t last_value_R = 0u;//记录上一次的值。
uint8_t current_value_R = 0u;//本次获取的值。
uint8_t processed_value_R = 0u;//经过处理的值。
//刷文字“ADAS”:
GUI_General_Display(ADAS_Sprite, CN_ADAS_wenzi, GUI_BLENDMODE_SRC_OVER);
//刷4个绿色的边框框角:
GUI_General_Display(ADAS_Sprite, CN_jiao1, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_jiao2, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_jiao3, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_jiao4, GUI_BLENDMODE_SRC_OVER);
/********************************************************/
current_value_M = Gui_Get_WorkshopScope_DisplayMode();
if (current_value_M <= 3u)
{
processed_value_M = current_value_M;
last_value_M = current_value_M;
}
else
{
processed_value_M = last_value_M;
}
/********************************************************/
switch (processed_value_M)
{
case 0u:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//向缓存放入等数量的空图
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 1u:{
GUI_General_Display(ADAS_Sprite, CN_che_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road4_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road3_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road2_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road1_shanshuo, GUI_BLENDMODE_SRC_OVER);
}
break;
case 2u:{
GUI_General_Display(ADAS_Sprite, CN_che_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road4, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road3, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road2, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road1, GUI_BLENDMODE_SRC_OVER);
}
break;
case 3u:{
GUI_General_Display(ADAS_Sprite, CN_che, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road4, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road3, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road2, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_Road1, GUI_BLENDMODE_SRC_OVER);
}
break;
default:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//向缓存放入等数量的空图
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
}
/****************************************************/
current_value_L = Gui_Get_LDWS_Left_DisplayMode();
if (current_value_L <= 4u)
{
processed_value_L = current_value_L;
last_value_L = current_value_L;
}
else
{
processed_value_L = last_value_L;
}
/****************************************************/
zh_processed_value_L = processed_value_L;
switch (processed_value_L)
{
case 0u:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//向缓存放入等数量的空图
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 1u:{
if (FLASH_SYNC_1Hz)//1Hz闪烁
{
GUI_General_Display(ADAS_Sprite, CN_LeftRoad_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_RightRoad_shanshuo, GUI_BLENDMODE_SRC_OVER);
}
else
{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//向缓存放入等数量的空图
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
}
break;
case 2u:{
GUI_General_Display(ADAS_Sprite, CN_LeftRoad_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 3u:{
GUI_General_Display(ADAS_Sprite, CN_LeftRoad, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 4u:{
if (FLASH_SYNC_2Hz)//2.5Hz闪烁
{
GUI_General_Display(ADAS_Sprite, CN_LeftRoad, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_tanhao1, GUI_BLENDMODE_SRC_OVER);
}
else
{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
}
break;
default:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
}
/*************************************************/
current_value_R = Gui_Get_LDWS_Right_DisplayMode();
if (current_value_R <= 4u)
{
processed_value_R = current_value_R;
last_value_R = current_value_R;
}
else
{
processed_value_R = last_value_R;
}
/*************************************************/
switch (processed_value_R)
{
case 0u:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 1u:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 2u:{
GUI_General_Display(ADAS_Sprite, CN_RightRoad_shanshuo, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 3u:{
GUI_General_Display(ADAS_Sprite, CN_RightRoad, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 4u:{
if (FLASH_SYNC_2Hz)//2.5Hz闪烁
{
GUI_General_Display(ADAS_Sprite, CN_RightRoad, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, CN_tanhao2, GUI_BLENDMODE_SRC_OVER);
}
else
{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
}
break;
default:{
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(ADAS_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
}
}
#ifndef GUI_VC66_ADAS_H
#define GUI_VC66_ADAS_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_ADAS(void);
/*:ZH*/
#endif
#include "GUI_VC66_Date.h"
#include "RTE_TIME.h"
/*ZH:*/
/*日期和星期 显示*/
static const uint16_t GUI_DISP_Year[4] = {568, 552, 538, 522};
static const uint16_t GUI_DISP_Month[2] = {617, 604};
static const uint16_t GUI_DISP_Date[2] = {669, 653};
typedef enum
{
Monday = 1 , /*星期一*/
Tuesday , /*星期二*/
Wednesday , /*星期三*/
Thursday , /*星期四*/
Friday , /*星期五*/
Saturday , /*星期六*/
Sunday /*星期日*/
} GUI_Day;
void Gui_Display_Date(void)
{
uint16_t Year = 0u;/*年*/
uint8_t Month = 0u;/*月*/
uint8_t Date = 0u;/*日*/
uint8_t Day = 0u;/*星期*/
Year = 2000 + Get_RTC_YEAR();
Month = Get_RTC_MONTH();
Date = Get_RTC_DATE();
Day = Get_RTC_WEEK();
GUI_Translate_Display(Calendar_Sprite, Nb_14_dian, 591u, 64u, GUI_BLENDMODE_SRC_OVER); /*显示年份后面的 “ . ” */
GUI_Translate_Display(Calendar_Sprite, Nb_14_dian, 642u, 64u, GUI_BLENDMODE_SRC_OVER); /*显示月份后面的 “ . ” */
GUI_General_Digit_Display(Calendar_Sprite, Year , Nb_14_0, 4u, 0u, GUI_DISP_Year, 48, GUI_BLENDMODE_SRC_OVER);/*显示年*/
GUI_General_Digit_Display(Calendar_Sprite, Month, Nb_14_0, 2u, 0u, GUI_DISP_Month,48, GUI_BLENDMODE_SRC_OVER);/*显示月*/
GUI_General_Digit_Display(Calendar_Sprite, Date , Nb_14_0, 2u, 0u, GUI_DISP_Date, 48, GUI_BLENDMODE_SRC_OVER);/*显示日*/
switch (Day)
{
case Monday : {
GUI_General_Display(Calendar_Sprite, CN_xingqiyi,GUI_BLENDMODE_SRC_OVER);
}
break;
case Tuesday : {
GUI_General_Display(Calendar_Sprite, CN_xingqier,GUI_BLENDMODE_SRC_OVER);
}
break;
case Wednesday :{
GUI_General_Display(Calendar_Sprite, CN_xingqisan,GUI_BLENDMODE_SRC_OVER);
}
break;
case Thursday : {
GUI_General_Display(Calendar_Sprite, CN_xingqisi,GUI_BLENDMODE_SRC_OVER);
}
break;
case Friday : {
GUI_General_Display(Calendar_Sprite, CN_xingqiwu,GUI_BLENDMODE_SRC_OVER);
}
break;
case Saturday : {
GUI_General_Display(Calendar_Sprite, CN_xingqiliu,GUI_BLENDMODE_SRC_OVER);
}
break;
case Sunday : {
GUI_General_Display(Calendar_Sprite, CN_xingqiri,GUI_BLENDMODE_SRC_OVER);
}
break;
}
}
/*:ZH*/
#ifndef GUI_VC66_DATE_H
#define GUI_VC66_DATE_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_Date(void);
/*:ZH*/
#endif
//*********************************************************************************************************************************
//ZH修改2021年8月26日10:56:49
//*********************************************************************************************************************************
#include "GUI_VC66_DrivingSupport.h"
#include "Data_DrivingSupport.h"
/*ZH:*/
/*驾驶支持 显示*/
static const uint16_t GUI_DISP_DrivingSupport[3] = {481, 459, 436};
static void display(uint8_t number);//定速巡航图标显示函数,根据传入的参数,进行刷图。
void Gui_Display_DrivingSupport(void)
{
static uint8_t Sys_Run_Sta_last_value = 0u;//上一次调用本函数时,SystemRunningState的值(即SystemRunningState的历史值)
uint8_t SystemRunningState = 0u;
uint8_t settingspeed = 0u;
//*************************************************************************************************
SystemRunningState = Gui_Get_SystemRunningState_DisplayMode();//定速巡航_系统运行状态
settingspeed = Gui_Get_SetSpeed_DisplayMode();//设定车速
//*************************************************************************************************
//显示 定速巡航图标区域:
//************************************************
if (SystemRunningState == 2u)
{
display(Sys_Run_Sta_last_value);
}
else
{
display(SystemRunningState);
Sys_Run_Sta_last_value = SystemRunningState;//Gui_Get_SystemRunningState_DisplayMode()函数返回值不为2时,更新Sys_Run_Sta_last_value值。
}
/********************************************************************
显示 设定车速区域:
********************************************************************/
if (settingspeed == 0u)
{
//显示 -- km/h. :
GUI_Translate_Display(SetSpeed_Sprite, Nb_21_hengxian, 455u, 118u, GUI_BLENDMODE_SRC_OVER); //显示 第一个横
GUI_Translate_Display(SetSpeed_Sprite, Nb_21_hengxian, 470u, 118u, GUI_BLENDMODE_SRC_OVER); //显示 第二个横
GUI_General_Display(SetSpeed_Sprite, CN_dingsuxunhangdanwei, GUI_BLENDMODE_SRC_OVER); //显示文字 “ km/h ”
}
else if (settingspeed <= 250u)
{
//显示km/h,显示设定车速:
GUI_General_Digit_Display(SetSpeed_Sprite, settingspeed, Nb_21_0, 3u, 2u, GUI_DISP_DrivingSupport, 104u, GUI_BLENDMODE_SRC_OVER);/*显示 定速巡航设定车速 的数值*/
GUI_General_Display(SetSpeed_Sprite, CN_dingsuxunhangdanwei, GUI_BLENDMODE_SRC_OVER); //显示文字 “ km/h ”
}
else
{
GUI_General_Display(SetSpeed_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
}
/**************************************
函数:
***************************************/
void display(uint8_t number)
{
switch (number)
{
case 0u :
{
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
break;
case 1u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
break;
case 3u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_SET, GUI_BLENDMODE_SRC_OVER);
}
break;
case 4u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang, GUI_BLENDMODE_SRC_OVER);
if (FLASH_SYNC_1Hz)
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_SET, GUI_BLENDMODE_SRC_OVER);
}
else
{
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
}
break;
case 5u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_1, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
break;
case 6u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_1, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_STANDBY, GUI_BLENDMODE_SRC_OVER);
}
break;
case 7u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_1, GUI_BLENDMODE_SRC_OVER);
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_SET, GUI_BLENDMODE_SRC_OVER);
}
break;
case 8u :
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_1, GUI_BLENDMODE_SRC_OVER);
if (FLASH_SYNC_1Hz)
{
GUI_General_Display(Cruise_Sprite, CN_dingsuxunhang_SET, GUI_BLENDMODE_SRC_OVER);
}
else
{
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
}
break;
default :
{
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
GUI_General_Display(Cruise_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);//清图
}
break;
}
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_DRIVINGSUPPORT_H
#define GUI_VC66_DRIVINGSUPPORT_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_DrivingSupport(void);
/*:ZH*/
#endif
#include "GUI_VC66_Gear.h"
#include "Data_Gear.h"
/*ZH:*/
/*档位 显示*/
void Gui_Display_Gear(void)
{
switch (Gui_Get_Gear()) // 显示19种档位
{
case 0u :
{
GUI_General_Display(Gear_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
case 1u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_1, GUI_BLENDMODE_SRC_OVER);
}
break;
case 2u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_2, GUI_BLENDMODE_SRC_OVER);
}
break;
case 3u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_3, GUI_BLENDMODE_SRC_OVER);
}
break;
case 4u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_4, GUI_BLENDMODE_SRC_OVER);
}
break;
case 5u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_5, GUI_BLENDMODE_SRC_OVER);
}
break;
case 6u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_6, GUI_BLENDMODE_SRC_OVER);
}
break;
case 7u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_7, GUI_BLENDMODE_SRC_OVER);
}
break;
case 8u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_8, GUI_BLENDMODE_SRC_OVER);
}
break;
case 9u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_9, GUI_BLENDMODE_SRC_OVER);
}
break;
case 10u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_10, GUI_BLENDMODE_SRC_OVER);
}
break;
case 11u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_11, GUI_BLENDMODE_SRC_OVER);
}
break;
case 12u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_12, GUI_BLENDMODE_SRC_OVER);
}
break;
case 13u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_R2, GUI_BLENDMODE_SRC_OVER);//R2
}
break;
case 14u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_R1, GUI_BLENDMODE_SRC_OVER);//R1
}
break;
case 15u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_N, GUI_BLENDMODE_SRC_OVER);
}
break;
case 16u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_RM, GUI_BLENDMODE_SRC_OVER);
}
break;
case 17u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_DM, GUI_BLENDMODE_SRC_OVER);
}
break;
case 18u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_E, GUI_BLENDMODE_SRC_OVER);
}
break;
case 19u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_NE, GUI_BLENDMODE_SRC_OVER);
}
break;
case 20u :
{
GUI_General_Display(Gear_Sprite, CN_dangwei_buming, GUI_BLENDMODE_SRC_OVER);
}
break;
default :
{
GUI_General_Display(Gear_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER);
}
break;
}
if (Gui_Get_Gear_MANUAL())
{
GUI_General_Display(Gear_Sprite, CN_MANUAL, GUI_BLENDMODE_SRC_OVER); // 显示文字 “ MANUAL ”
}
else
{
GUI_General_Display(Gear_Sprite, SpriteSize, GUI_BLENDMODE_SRC_OVER); // 不显示文字 “ MANUAL ”
}
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_GEAR_H
#define GUI_VC66_GEAR_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_Gear(void);
/*:ZH*/
#endif
#ifndef GUI_VC66_GENERAL_H
#define GUI_VC66_GENERAL_H
#include "TYW_stdint.h"
#include "loc_graphics.h"
#include "images.h"
#include "GUI_Interface.h"
#include "Flash_synchronizer.h"
//=====================================================
//多国语言
//=====================================================
typedef enum
{
CHINESE = 0 ,//中文
ENGLISH ,//英文
JAPANESE ,//日文
RESERVED0 ,
RESERVED1 ,
}en_LANGUAGE ;
#endif
#ifndef GUI_VC66_INCLUDE_H
#define GUI_VC66_INCLUDE_H
/*-----------------------------------------------------------------------------
说明: 2021年7月9日11:06:07 wangboyu
包含VC66项目所有刷图功能.包含所有刷图组件头文件,上层仅调用本文件
按组件区分,每个组件完成相关刷图逻辑,逻辑来源为 APP中 Data_XXXXXX.h
每个组件不关注外部调用,默认被调用.需要的通用信息以接口形式处理,不用考虑上掉电这些问题,外部调用会处理.
GUI_VC66_General.h 为通用文件,被各组件调用
非固定通用信息接口说明:
①上电时间
②下电时间
③闪烁标志
④菜单信息
⑤多国语言接口
固定通用信息接口:
①.使能
②.
③.
接口要求:不可以传入地址,传入立即数.
每个.h文件 应该只暴露一个函数被上层使用.命名格式:Gui_Display_含义
接口顺序及命名要求:
-----------------------------------------------------------------
首位必须为使能位 1 - 正常应用 0 - 不应用,保持上次状态
-----------------------------------------------------------------
多国语言在GUI_VC66_General.h定义,不能更改.
-----------------------------------------------------------------
==============================================================================*/
//=======================================================================
//================常显信息===============================================
//=======================================================================
//---------------------------------------
//尿素
#include "GUI_VC66_AC_AdBule.h"
//=======================================
//---------------------------------------
//室外温度
#include "GUI_VC66_AC_TEMP.h"
//=======================================
//---------------------------------------
//WET空气计
#include "GUI_VC66_AC_WET.h"
//=======================================
//---------------------------------------
//ADAS
#include "GUI_VC66_ADAS.h"
//=======================================
//---------------------------------------
//日期
#include "GUI_VC66_Date.h"
//=======================================
//---------------------------------------
//驾驶支持
#include "GUI_VC66_DrivingSupport.h"
//=======================================
//---------------------------------------
//大计里程
#include "GUI_VC66_ODO.h"
//=======================================
//---------------------------------------
//TRIPA
#include "GUI_VC66_TRIPA.h"
//=======================================
//---------------------------------------
//时间
#include "GUI_VC66_Time.h"
//=======================================
//---------------------------------------
//档位
#include "GUI_VC66_Gear.h"
//=======================================
//=======================================
//=======================================================================
//================通常显示转换===========================================
//=======================================================================
#include "GUI_VC66_Usually.h"
//=======================================================================
//================弹出信息===============================================
//=======================================================================
#include "GUI_VC66_Popup.h"
//=======================================================================
//================菜单===================================================
//=======================================================================
//---------------------------------------
//用户模式
#include "GUI_VC66_Menu_User.h"
//=======================================
//---------------------------------------
//经销商模式
#include "GUI_VC66_Menu_DLR.h"
//=======================================
//---------------------------------------
//工厂模式
#include "GUI_VC66_Menu_Fty.h"
//=======================================
//---------------------------------------
//=======================================
//---------------------------------------
//=======================================
//---------------------------------------
//=======================================
//---------------------------------------
//=======================================
#endif
#include "GUI_VC66_Menu_DLR.h"
#include "GUI_VC66_Menu_DLR.h"
\ No newline at end of file
#ifndef GUI_VC66_MENU_DLR_H
#define GUI_VC66_MENU_DLR_H
#include "TYW_stdint.h"
#endif
#include "GUI_VC66_Menu_Fty.h"
#include "GUI_VC66_General.h"
\ No newline at end of file
#ifndef GUI_VC66_MENU_FTY_H
#define GUI_VC66_MENU_FTY_H
#include "TYW_stdint.h"
#endif
#ifndef GUI_VC66_MENU_USER_H
#define GUI_VC66_MENU_USER_H
#include "TYW_stdint.h"
extern void GUI_Display_Menu_Item(uint8_t Cursor, uint8_t Language);
#endif
#include "GUI_VC66_ODO.h"
#include "Services_Mileage.h"
/*ZH:*/
/*ODO 显示*/
static const uint16_t GUI_DISP_ODO[7] = {676, 657, 638, 619, 600, 581, 562};
void Gui_Display_ODO(void)
{
uint32_t ODO_value = 0u;
ODO_value = (Data_ODO_Read()/10); //此处需将ODO函数返回值赋给变量,ODO函数在其他文件中实现。
GUI_General_Display(ODO_Sprite, CN_ODO, GUI_BLENDMODE_SRC_OVER); //显示文字 “ ODO ”
GUI_General_Display(ODO_Sprite, CN_ODO_danwei, GUI_BLENDMODE_SRC_OVER); //显示文字 “ km ”
GUI_General_Digit_Display(ODO_Sprite, ODO_value, Nb_19_0, 7u, 6u, GUI_DISP_ODO, 425, GUI_BLENDMODE_SRC_OVER);/*显示ODO的数值*/
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_ODO_H
#define GUI_VC66_ODO_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_ODO(void);
/*:ZH*/
#endif
This diff is collapsed.
#ifndef GUI_VC66_POPUP_H
#define GUI_VC66_POPUP_H
#include "TYW_stdint.h"
extern void GUI_General_Popup(void) ;
#endif
#include "GUI_VC66_TRIPA.h"
#include "Services_Mileage.h"
/*ZH:*/
/*TRIP A 显示*/
static const uint16_t GUI_DISP_TRIPA[5] = {676, 648, 629, 610, 591};
void Gui_Display_TRIPA(void)
{
uint16_t TRIPA_value = 0u;
TRIPA_value = Data_Read_Trip(EM_TRIP_A);//此处TRIPA_value的值应为仪表显示的值的10倍。
GUI_General_Display(TRIP_Sprite, CN_TRIP, GUI_BLENDMODE_SRC_OVER); //显示文字 “ TRIP ”
GUI_General_Display(TRIP_Sprite, CN_TRIP_A, GUI_BLENDMODE_SRC_OVER); //显示文字 “ A ”
GUI_General_Display(TRIP_Sprite, CN_TRIP_danwei, GUI_BLENDMODE_SRC_OVER); //显示文字 “ km ”
GUI_Translate_Display(TRIP_Sprite, Nb_19_dian, 668u, 410u, GUI_BLENDMODE_SRC_OVER); /*显示 小数点*/
/*显示 TRIP A 的数值*/
GUI_General_Digit_Display(TRIP_Sprite, TRIPA_value, Nb_19_0, 5u, 3u, GUI_DISP_TRIPA, 389, GUI_BLENDMODE_SRC_OVER);
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_TRIPA_H
#define GUI_VC66_TRIPA_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_TRIPA(void);
/*:ZH*/
#endif
#include "GUI_VC66_Time.h"
#include "RTE_TIME.h"
/*ZH:*/
/*时间显示*/
static const uint16_t GUI_DISP_Hours[2] = {370, 349};
static const uint16_t GUI_DISP_Minutes[2] = {428, 406};
void Gui_Display_Time(void)
{
uint8_t Hours = 0u;
uint8_t Minutes = 0u;
//uint8_t Month = 0u;
//uint8_t Date = 0u;
//uint8_t Year = 0u;
Hours = Get_RTC_HOUR();
Minutes = Get_RTC_MINUTE();
if ((Hours <= 24u) && (Minutes < 60u))
{
GUI_Translate_Display(Time_Sprite, Nb_21_maohao, 396u, 45u, GUI_BLENDMODE_SRC_OVER); /*显示冒号*/
GUI_General_Digit_Display(Time_Sprite, Hours , Nb_21_0, 2u, 1u, GUI_DISP_Hours , 37, GUI_BLENDMODE_SRC_OVER);/*显示小时*/
GUI_General_Digit_Display(Time_Sprite, Minutes, Nb_21_0, 2u, 0u, GUI_DISP_Minutes, 37, GUI_BLENDMODE_SRC_OVER);/*显示分钟*/
}
else
{
GUI_Translate_Display(Time_Sprite, SpriteSize, 396u, 45u, GUI_BLENDMODE_SRC_OVER);/*不显示*/
}
}
/*:ZH*/
\ No newline at end of file
#ifndef GUI_VC66_TIME_H
#define GUI_VC66_TIME_H
#include "GUI_VC66_General.h"
/*ZH:*/
void Gui_Display_Time(void);
/*:ZH*/
#endif
This diff is collapsed.
#ifndef GUI_VC66_USUALLY_H
#define GUI_VC66_USUALLY_H
#include "TYW_stdint.h"
extern void GUI_Display_Usually_AvrFuelCons(uint8_t Type) ;
extern void GUI_Display_Usually_AvrSpeed(uint8_t Type) ;
extern void GUI_Display_Usually_VoltMeter(void) ;
extern void GUI_Display_Usually_TimeTable(void);
extern void GUI_Display_Usually_Calendar(void) ;
extern void GUI_Display_Usually_DPD(uint8_t Type);
#endif
......@@ -211,7 +211,7 @@ void Level1Menu_1Enter(void)
}
void Level1Menu_1Do(void)
{
GUI_Display_OftenShow_Group();
GUI_OftenShow_Display();
}
void Level1Menu_1Exit(void)
{}
......
......@@ -8,7 +8,6 @@
#include "GUI.h"
#include "Services_ODO_User.h" /*清空总计里程函数*/
#include "Menu.h"
#include "GUI_VC66_INCLUDE.h"
uint32_t EnterTimer [ 10 ];
uint8_t UE_EN [ Display_MAX ];
......
......@@ -16,6 +16,7 @@
#include "Emulated_EEPROM.h"
#include "Watchdog.h"
#include "UDS_Common.h"
/*修饰变量static*/
......@@ -317,8 +318,16 @@ int32_t SEGGER_RTT_printf(uint16_t BufferIndex, const char *sFormat, ...)
return 0;
}
/*EOL诊断配置数据转换为仪表配置数据*/
void ReadDTCEOLValue_Meter_K_LINE(void)
{
/*获取所有存储数据*/
ReadDFlashData(EEPROM_BLOCK_EOL_K_LINE, (uint32_t *)&K_Line_Set.Flag, (sizeof(K_Line_Set) / 4u), K_LINE_EOL_InitVal);
}
void K_LINE_EOL_InitVal(void)
{
K_Line_Set.Flag = 0x7AA7A55Au;
K_Line_Set.K_Line_LID20 = 0x00u; /* 00 应对ECE R13 //0:非应对、1:应对 */
K_Line_Set.K_Line_LID21 = 0x00u; /* 00 EBS/ABS //0:无、1:EBS、2:ABS(CAN应对) 3:ABS (CAN非应对) */
K_Line_Set.K_Line_LID22 = 0x00u; /* 00 EVSC //0:无、1:有 */
......@@ -327,7 +336,7 @@ void K_LINE_EOL_InitVal(void)
K_Line_Set.K_Line_LID25 = 0x00u; /* 00 AEBS //0:无、1:有 */
K_Line_Set.K_Line_LID26 = 0x00u; /* 00 ACC //0:无、1:有 */
K_Line_Set.K_Line_LID27 = 0x00u; /* 00 LDWS //0:无、1:有 */
K_Line_Set.K_Line_LID28 = 0x00u; /* 00 车辆间报警 //0:无、1:有 */
K_Line_Set.K_Line_LID28 = 0x01u; /* 01 车辆间报警 //0:无、1:有 */
K_Line_Set.K_Line_LID29 = 0x01u; /* 01 有无巡航 //0:无、1:有 /*初值1*/
K_Line_Set.K_Line_LID2A = 0x00u; /* 00 气悬 //0:Reef、1:Rear air、2:Full air */
K_Line_Set.K_Line_LID2B = 0x00u; /* 00 ISS //0:无、1: eco stop、 2:Idle Stop */
......@@ -352,7 +361,7 @@ void K_LINE_EOL_InitVal(void)
K_Line_Set.K_Line_LID3E = 0x01u; /* 01 预留 //0:胎压功能未匹配 1:匹配 */
K_Line_Set.K_Line_LID3F = 0x00u; /* -- 预留 */
K_Line_Set.K_Line_LID40 = 0x00u; /* 00 发动机种类 */
K_Line_Set.K_Line_LID41 = 0x10u; /* 10 变速器种类&控制 /*初值50*/
K_Line_Set.K_Line_LID41 = 0x13u; /* 50 变速器种类&控制 /*初值50*/
K_Line_Set.K_Line_LID42 = 0x00u; /* 00 驻车管道 /*初值 0*/
K_Line_Set.K_Line_LID43 = 0x82u; /* 82 车型 /*初值44*/
K_Line_Set.K_Line_LID44 = 0xFFu; /* FF 速度警报 /*初值FF*/
......
......@@ -8,6 +8,7 @@ K-LINE下线配置
******************************************************************************/
typedef struct
{
uint32_t Flag ; /*初始化标记位*/
// HEX
uint8_t K_Line_LID20; /* 00 应对ECE R13 //0:非应对、1:应对 */
uint8_t K_Line_LID21; /* 00 EBS/ABS //0:无、1:EBS、2:ABS(CAN应对) 3:ABS (CAN非应对) */
......@@ -125,4 +126,7 @@ void Set_Can18FF5510_FirstRecv_Event(void);
void Set_Can18FF2300_FirstRecv_Event(void);
uint8_t Get_CanFirstRecv_Event(uint8_t ID);
void ReadDTCEOLValue_Meter_K_LINE(void);
void K_LINE_EOL_InitVal(void);
#endif
This diff is collapsed.
......@@ -10,7 +10,7 @@
/* RTC default time setting */
#ifndef RTC_DEFAULT_TIME
#define RTC_DEFAULT_TIME 1U
#define RTC_DEFAULT_YEAR 13U
#define RTC_DEFAULT_YEAR 21U
#define RTC_DEFAULT_MONTH 1U
#define RTC_DEFAULT_DATE 1U
#define RTC_DEFAULT_HOUR 0U
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -27,19 +27,18 @@ typedef struct
typedef enum
{
WET_Sprite, //区域1 - 量表显示 - WET
AdBlue_Sprite, //区域1 - 量表显示 - AdBlue
TRIP_Sprite, //区域2 - TRIP显示
ODO_Sprite, //区域2 - ODO显示
WarningLight_Sprite,//区域3 - 警告灯显示
ADAS_Sprite, //区域4 - ADAS显示
MultiPurpose_Sprite,//区域5 - 多目的性显示区域
SetSpeed_Sprite, //区域6 - 设定车速显示
Cruise_Sprite, //区域6 - 巡航显示
Gear_Sprite, //区域7 - 档位显示
Temp_Sprite, //区域8 - 温度显示
Time_Sprite, //区域8 - 时间显示
Calendar_Sprite, //区域8 - 日历显示
WET_Sprite, //区域1 - 量表显示 - WET
AdBlue_Sprite, //区域1 - 量表显示 - AdBlue
TRIP_Sprite, //区域2 - TRIP显示
ODO_Sprite, //区域2 - ODO显示
WarningLight_Sprite,//区域3 - 警告灯显示
ADAS_Sprite, //区域4 - ADAS显示
MultiPurpose_Sprite,//区域5 - 多目的性显示区域
Cruise_Sprite, //区域6 - 巡航显示
Gear_Sprite, //区域7 - 档位显示
Temp_Sprite, //区域8 - 温度显示
Time_Sprite, //区域8 - 时间显示
Calendar_Sprite, //区域8 - 日历显示
Max_Sprite,
} SpriteName_t;
......@@ -70,9 +69,9 @@ typedef struct
uint8_t u8ScaleEn;
float fFactor;
uint8_t u8UnicodeEn;
uint32_t u32UnicodeColor;
uint32_t u32UnicodeColor;
uint8_t UnicodeLen;
uint16_t *pUnicode;
uint16_t *pUnicode;
} LogicLayerAttr_t;
typedef struct
......
......@@ -68,16 +68,8 @@ uint8_t MultiPurposeUpdate = 0u;
uint8_t MultiPurposeEn = 0u;
LogicLayerAttr_t MultiPurposeLogicLayerAttr[MAX_MULTIPURPOSE_SUP_LAYER];
/*区域6 定速巡航车速*/
#define MAX_SETSPEED_SUP_LAYER 5
MultiBufferSprite_t SetSpeedSpriteBuf;
uint8_t SetSpeedIndex = 0u;
uint8_t SetSpeedUpdate = 0u;
uint8_t SetSpeedEn = 0u;
LogicLayerAttr_t SetSpeedLogicLayerAttr[MAX_SETSPEED_SUP_LAYER];
/*区域6 定速巡航图标*/
#define MAX_CRUISE_SUP_LAYER 3
#define MAX_CRUISE_SUP_LAYER 6
MultiBufferSprite_t CruiseSpriteBuf;
uint8_t CruiseIndex = 0u;
uint8_t CruiseUpdate = 0u;
......@@ -125,8 +117,7 @@ static const SpritesHandler_t SpriteHandler[Max_Sprite] =
{WarningLight_Sprite, { 8, 88, 82, 264, 1}, TARGET_SDRAM, &WarningLightSpriteBuf, &WarningLightIndex, WarningLightLogicLayerAttr, MAX_WARNINGLIGHT_SUP_LAYER, &WarningLightUpdate, &WarningLightEn, R_NULL},
{ADAS_Sprite, {112, 94, 254, 260, 1}, TARGET_SDRAM, &ADASSpriteBuf, &ADASIndex, ADASLogicLayerAttr, MAX_ADAS_SUP_LAYER , &ADASUpdate, &ADASEn, R_NULL},
{MultiPurpose_Sprite, {382, 182, 410, 170, 1}, TARGET_SDRAM, &MultiPurposeSpriteBuf, &MultiPurposeIndex, MultiPurposeLogicLayerAttr, MAX_MULTIPURPOSE_SUP_LAYER, &MultiPurposeUpdate , &MultiPurposeEn, R_NULL},
{SetSpeed_Sprite, {414, 92, 112, 82, 1}, TARGET_SDRAM, &SetSpeedSpriteBuf, &SetSpeedIndex, SetSpeedLogicLayerAttr, MAX_SETSPEED_SUP_LAYER , &SetSpeedUpdate, &SetSpeedEn, R_NULL},
{Cruise_Sprite, {520, 90, 90, 87, 1}, TARGET_SDRAM, &CruiseSpriteBuf, &CruiseIndex, CruiseLogicLayerAttr, MAX_CRUISE_SUP_LAYER , &CruiseUpdate, &CruiseEn, R_NULL},
{Cruise_Sprite, {382, 84, 230, 92, 1}, TARGET_SDRAM, &CruiseSpriteBuf, &CruiseIndex, CruiseLogicLayerAttr, MAX_CRUISE_SUP_LAYER , &CruiseUpdate, &CruiseEn, R_NULL},
{Gear_Sprite, {622, 86, 170, 94, 1}, TARGET_SDRAM, &GearSpriteBuf, &GearIndex, GearLogicLayerAttr, MAX_GEAR_SUP_LAYER , &GearUpdate, &GearEn, R_NULL},
{Temp_Sprite, { 26, 12, 258, 70, 1}, TARGET_SDRAM, &TempSpriteBuf, &TempIndex, TempLogicLayerAttr, MAX_TEMP_SUP_LAYER , &TempUpdate, &TempEn, R_NULL},
{Time_Sprite, {330, 14, 140, 66, 1}, TARGET_SDRAM, &TimeSpriteBuf, &TimeIndex, TimeLogicLayerAttr, MAX_TIME_SUP_LAYER , &TimeUpdate, &TimeEn, R_NULL},
......@@ -139,7 +130,7 @@ static const r_screen_attr_t ScreenAttr =
800, 480, 896, /* JEPG Window*/
800, 480, 896, /* Loc Window*/
5, /* 刷新时间,50ms*/
13, /* 主屏幕Sprite数量*/
12, /* 主屏幕Sprite数量*/
Max_Sprite, /* 全部Sprite数量*/
SpriteSize /* 最大的图片数量*/
};
......
This diff is collapsed.
......@@ -173,6 +173,8 @@ void Write(
void Write_String(r_drw2d_Device_t Dev,int PosX, int PosY, r_drw2d_Color_t Color, char *Text);
void Write_Hanzi(r_drw2d_Device_t Dev,int PosX, int PosY, r_drw2d_Color_t Color, uint16_t a[],uint16_t count);
unsigned int Get_Unicode_Words_Width(unsigned int Unicode_16t);
#ifdef __cplusplus
}
#endif
......
......@@ -99,24 +99,29 @@ void Sys_Startup_Init(void)
RTC_Init();
Sys_Tick_Timer_Start();
/*COM_CAN_Init(); 原CAN初始化位置*/
/*COM_CAN_Init(); Ô­CAN³õʼ»¯Î»ÖÃ*/
RTE_ADC_Init();
Int_Flash_Init();
EEPROM_Init();
BU98R10_Init();
/*EOL诊断 配置数据读取 DFLASH*/
ReadAllDFlashData();
/*读取K-LINE*/
ReadDTCEOLValue_Meter_K_LINE();
d_printf("Init complete!\n");
InitSeriFlashExternReadMode();
/*30电数据初始化*/
InitSeriFlashExternReadMode();
/*30电数据初始化*/
APP_Startup_Init(Clock_Get_Startup_Mode());
/*外发要用到EEP数据,位置移动*/
/*外发要用到EEP数据,位置移动*/
COM_CAN_Init();
Gfx_Sys_Start();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment