Commit c6a5ec5b authored by 王雅楠's avatar 王雅楠

feat:新增投屏界面车速,时间,指示灯显示

parent 6dd69019
...@@ -46,6 +46,12 @@ void AMT630H_GUI_Unit_Setting(Menu_Interface_en_t select); ...@@ -46,6 +46,12 @@ void AMT630H_GUI_Unit_Setting(Menu_Interface_en_t select);
void AMT630H_GUI_Language_Setting(Menu_Interface_en_t select); /*语言设置*/ void AMT630H_GUI_Language_Setting(Menu_Interface_en_t select); /*语言设置*/
void AMT630H_GUI_Phone_Connect_Win(void); /*手机互联*/ void AMT630H_GUI_Phone_Connect_Win(void); /*手机互联*/
void AMT630H_GUI_ReadPosittion_Display(void); void AMT630H_GUI_ReadPosittion_Display(void);
/*投屏界面*/
static void AMT630H_GUI_PhoneConnect_Light();
static void AMT630H_GUI_PhoneConnect_TIME(uint16_t Hour ,uint16_t Minute);
static void AMT630H_GUI_PhoneConnect_VSpeed(uint16_t VechileSpeed);
void AMT630H_GUI_Background() void AMT630H_GUI_Background()
{ {
if (SYS_OPR_STAT_IGN_ON) if (SYS_OPR_STAT_IGN_ON)
...@@ -2717,6 +2723,18 @@ static const uint16_t NumbeList_TIME_NIGHT[] = { ...@@ -2717,6 +2723,18 @@ static const uint16_t NumbeList_TIME_NIGHT[] = {
Pic_0645_959_511, Pic_0645_959_511,
Pic_0646_953_501, Pic_0646_953_501,
}; };
static const uint16_t NumbeList_PhoneConnect_TIME[] = {
Pic_0385_357_553,
Pic_0386_367_553,
Pic_0387_358_553,
Pic_0388_359_553,
Pic_0389_356_553,
Pic_0390_358_553,
Pic_0391_358_553,
Pic_0392_357_553,
Pic_0393_357_553,
Pic_0394_358_553,
};
static const uint16_t NumbeList_Telephone[] = { static const uint16_t NumbeList_Telephone[] = {
Pic_0536_54_499, Pic_0536_54_499,
Pic_0537_55_499, Pic_0537_55_499,
...@@ -2801,6 +2819,18 @@ static const uint16_t NumbeList_VSpeed_DAY[] = { ...@@ -2801,6 +2819,18 @@ static const uint16_t NumbeList_VSpeed_DAY[] = {
Pic_0604_500_361, Pic_0604_500_361,
Pic_0605_470_308, Pic_0605_470_308,
}; };
static const uint16_t NumbeList_PhoneConnect_VSpeed[] ={
Pic_0399_484_510,
Pic_0400_502_509,
Pic_0401_485_509,
Pic_0402_486_509,
Pic_0403_481_509,
Pic_0404_485_509,
Pic_0405_485_509,
Pic_0406_483_509,
Pic_0407_484_509,
Pic_0408_485_509,
};
static const uint16_t NumbeList_VSpeed_NIGHT[] = { static const uint16_t NumbeList_VSpeed_NIGHT[] = {
Pic_0702_456_256, Pic_0702_456_256,
Pic_0703_492_255, Pic_0703_492_255,
...@@ -2874,7 +2904,12 @@ static const uint16_t PICList_Fuel_SelfCheck[] ={ ...@@ -2874,7 +2904,12 @@ static const uint16_t PICList_Fuel_SelfCheck[] ={
Pic_0561_623_473, Pic_0561_623_473,
}; };
/*指示灯*/ /*
*NAME : AMT630H_GUI_Light()
*FUNCTION : 指示灯点亮函数
*PARAMETER : NULL
*RETURN : NULL
**/
static void AMT630H_GUI_Light() static void AMT630H_GUI_Light()
{ {
if(Get_TelltalesLedSts(em_LED_Turn_Left)) if(Get_TelltalesLedSts(em_LED_Turn_Left))
...@@ -2954,9 +2989,55 @@ static void AMT630H_GUI_Light() ...@@ -2954,9 +2989,55 @@ static void AMT630H_GUI_Light()
; ;
} }
} }
static void AMT630H_GUI_PhoneConnect_Light()
{
/*时间显示函数*/ if(Get_TelltalesLedSts(em_LED_Turn_Left))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0475_30_481);
}
if(Get_TelltalesLedSts(em_LED_Turn_Right))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0467_952_481);
}
if(Get_TelltalesLedSts(em_LED_High_Beam))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0474_101_487);
}
if(Get_TelltalesLedSts(em_LED_Efi_Fault))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0469_749_487);
}
if(Get_TelltalesLedSts(em_LED_ABS))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0471_312_486);
}
if(Get_TelltalesLedSts(em_LED_Auto_Start_Stop))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0472_251_485);
}
if(Get_TelltalesLedSts(em_LED_Oil_Pressure_Alert))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0466_874_488);
}
if(Get_TelltalesLedSts(em_LED_TCS))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0473_172_490);
}
if(Get_TelltalesLedSts(em_LED_WIFI))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0465_881_487);
}
if(Get_TelltalesLedSts(em_LED_Bluetooth))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0468_819_486);
}
}
/*
*NAME : AMT630H_GUI_TIME()
*FUNCTION : 主界面时间显示函数
*PARAMETER : uint16_t Hour-小时 uint16_t Minute-分钟
*RETURN : NULL
**/
static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute) static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
{ {
if (g_u8Display_Mode == ModeDAY) if (g_u8Display_Mode == ModeDAY)
...@@ -3018,10 +3099,44 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute) ...@@ -3018,10 +3099,44 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, MinuteNumber); DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, MinuteNumber);
} }
} }
/*
*NAME : AMT630H_GUI_PhoneConnect_TIME()
*FUNCTION : 投屏界面时间显示函数
*PARAMETER : uint16_t Hour-小时 uint16_t Minute-分钟
*RETURN : NULL
**/
static void AMT630H_GUI_PhoneConnect_TIME(uint16_t Hour ,uint16_t Minute)
{
/*外部接收小时和分钟*/
if (FLASH_SYNC_1Hz)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0397_315_562); /*时间 : */
}
DISPLAY_NUM_ST DisplayNumPara;
uint16_t HourNumber;
uint16_t MinuteNumber;
HourNumber = Hour;
MinuteNumber = Minute;
/*小时显示*/
DisplayNumPara.NumList = NumbeList_PhoneConnect_TIME;
DisplayNumPara.x = 280;
DisplayNumPara.NumInterval = GROUP_PIC_DIR_LEFT | 30;
DisplayNumPara.y = GROUP_PIC_USE_PSD_Y_POS;
DisplayNumPara.DecimalNum = 0;
DisplayNumPara.MinDigits = 2;
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, HourNumber);
/*分钟显示*/
DisplayNumPara.NumList = NumbeList_PhoneConnect_TIME;
DisplayNumPara.x = 357;
DisplayNumPara.NumInterval = GROUP_PIC_DIR_LEFT | 30;
DisplayNumPara.y = GROUP_PIC_USE_PSD_Y_POS;
DisplayNumPara.DecimalNum = 0;
DisplayNumPara.MinDigits = 2;
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, MinuteNumber);
}
/* /*
*NAME : AMT630H_GUI_Telephone *NAME : AMT630H_GUI_Telephone
*SCOPE : 主界面 *SCOPE : 主界面来电显示
*PARAMETER : Tele_State-手机通话状态 *PARAMETER : Tele_State-手机通话状态
* Instrument_State-仪表目前状态(主界面/投屏状态) * Instrument_State-仪表目前状态(主界面/投屏状态)
*RETURN : NULL *RETURN : NULL
...@@ -3055,7 +3170,12 @@ static void AMT630H_GUI_Telephone() ...@@ -3055,7 +3170,12 @@ static void AMT630H_GUI_Telephone()
SetPageText(GRAPHICS_PAGE_0, 0x4009, 200, 200, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1)); SetPageText(GRAPHICS_PAGE_0, 0x4009, 200, 200, 200, ALIGN_LEFT, 0, TEXT_COLOR(0XFF,0XFF,0XFF,0XFF),TEXT_LINE_OFFSET(1,1));
} }
/*燃油显示函数*/ /*
*NAME : AMT630H_GUI_Fuel
*FUNCTION : 燃油显示函数
*PARAMETER : uint8_t Fuel- 燃油格数
*RETURN : NULL
*/
uint8_t g_u16_GUI_PerFuelLevel = 1; uint8_t g_u16_GUI_PerFuelLevel = 1;
static void AMT630H_GUI_Fuel(uint8_t Fuel) static void AMT630H_GUI_Fuel(uint8_t Fuel)
{ {
...@@ -3245,8 +3365,6 @@ static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel) ...@@ -3245,8 +3365,6 @@ static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel)
} }
/*电压显示函数*/ /*电压显示函数*/
static void AMT630H_GUI_Voltage(uint16_t Voltage) static void AMT630H_GUI_Voltage(uint16_t Voltage)
{ {
...@@ -3725,7 +3843,12 @@ static void AMT630H_GUI_Trip(uint32_t Trip, uint8_t Uint) ...@@ -3725,7 +3843,12 @@ static void AMT630H_GUI_Trip(uint32_t Trip, uint8_t Uint)
} }
} }
/*车速显示函数*/ /*
*NAME : AMT630H_GUI_VSpeed
*FUNCTION : 主界面车速显示
*PARAMETER : uint16_t VSpeed-车速
*RETURN : NULL
*/
static void AMT630H_GUI_VSpeed(uint16_t VSpeed) static void AMT630H_GUI_VSpeed(uint16_t VSpeed)
{ {
if (g_u8Display_Mode == ModeDAY) if (g_u8Display_Mode == ModeDAY)
...@@ -3861,6 +3984,75 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed) ...@@ -3861,6 +3984,75 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed)
} }
} }
/*
*NAME : AMT630H_GUI_PhoneConnect_VSpeed
*FUNCTION : 投屏界面车速显示
*PARAMETER : uint16_t VSpeed-车速
*RETURN : NULL
*/
static void AMT630H_GUI_PhoneConnect_VSpeed(uint16_t VSpeed)
{
if(g_u8UnitSetting == Metric)
{
//SetPagePic(GRAPHICS_PAGE_0, );/*单位 km/h */
}
else if(g_u8UnitSetting == Imperial)
{
//SetPagePic(GRAPHICS_PAGE_0, );/*单位 mph/h */
}
else
{
;
}
/*数据处理*/
DISPLAY_NUM_ST DisplayNumPara;
uint16_t VSpeedNumber;
VSpeedNumber = VSpeed;
DisplayNumPara.NumList = NumbeList_PhoneConnect_VSpeed;
if (100 <= VSpeedNumber)
{
DisplayNumPara.x = 544;
DisplayNumPara.NumInterval = GROUP_PIC_DIR_LEFT | 60;
DisplayNumPara.y = GROUP_PIC_USE_PSD_Y_POS;
DisplayNumPara.DecimalNum = 0;
DisplayNumPara.MinDigits = 3;
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, VSpeedNumber);
}
else if ((10 <= VSpeedNumber))
{
DisplayNumPara.x = 514;
DisplayNumPara.NumInterval = GROUP_PIC_DIR_LEFT | 60;
DisplayNumPara.y = GROUP_PIC_USE_PSD_Y_POS;
DisplayNumPara.DecimalNum = 0;
DisplayNumPara.MinDigits = 2;
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, VSpeedNumber);
}
else if (0 <= VSpeedNumber)
{
if (VSpeedNumber == 1)
{
DisplayNumPara.x = 484; // 1的宽度与其他数字不同 坐标没给
}
else
{
DisplayNumPara.x = 484;
}
DisplayNumPara.NumInterval = GROUP_PIC_DIR_LEFT | 60;
DisplayNumPara.y = GROUP_PIC_USE_PSD_Y_POS;
DisplayNumPara.DecimalNum = 0;
DisplayNumPara.MinDigits = 1;
DisplayNum(GRAPHICS_PAGE_0, &DisplayNumPara, VSpeedNumber);
}
else
{
;
}
}
/*转速显示函数*/ /*转速显示函数*/
static void AMT630H_GUI_ESpeed(uint16_t ESpeed) static void AMT630H_GUI_ESpeed(uint16_t ESpeed)
{ {
...@@ -4432,7 +4624,7 @@ void AMT630H_GUI_ReadPosittion_Display(void) ...@@ -4432,7 +4624,7 @@ void AMT630H_GUI_ReadPosittion_Display(void)
AMT630H_GUI_SETTING(); AMT630H_GUI_SETTING();
AMT630H_GUI_Quit(); AMT630H_GUI_Quit();
break; break;
case MENU_ITEM_PHONE_CONNECT_SET:/*28 手机互联成功*/ case MENU_ITEM_PHONE_CONNECT_SET:/*30 手机互联成功*/
AMT630H_GUI_SETTING(); AMT630H_GUI_SETTING();
AMT630H_GUI_Phone_Connect_Win(); AMT630H_GUI_Phone_Connect_Win();
break; break;
...@@ -4450,7 +4642,10 @@ void AMT630H_GUI_ReadPosittion_Display(void) ...@@ -4450,7 +4642,10 @@ void AMT630H_GUI_ReadPosittion_Display(void)
// SetPagePic(GRAPHICS_PAGE_0, Pic_0234_605_289); // SetPagePic(GRAPHICS_PAGE_0, Pic_0234_605_289);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0479_242_313); // SetPagePic(GRAPHICS_PAGE_0, Pic_0479_242_313);
// SetPagePic(GRAPHICS_PAGE_0, Pic_0411_56_533); // SetPagePic(GRAPHICS_PAGE_0, Pic_0411_56_533);
SetPagePic(GRAPHICS_PAGE_0, Pic_0382_0_0);/*背景图*/
AMT630H_GUI_PhoneConnect_Light();
AMT630H_GUI_PhoneConnect_TIME(Get_Dis_Hour_Time(), Get_Dis_Minute_Time());
AMT630H_GUI_PhoneConnect_VSpeed(VechileSpeed);
break; break;
default: default:
break; break;
......
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