Commit 6453ca2a authored by hu's avatar hu

调整TYW清总计里程功能

parent 94732bc3
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
*/ */
#include "Common_Interface.h" #include "Common_Interface.h"
#define Self_time 900u #define Self_time 450u
static const uint16_t GaugesDataInInit[GaugesTotal][3][25] = static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
{ {
......
...@@ -27,21 +27,21 @@ void Power_Management_Service ( void ) ...@@ -27,21 +27,21 @@ void Power_Management_Service ( void )
case m_IGN_OFF_Init: case m_IGN_OFF_Init:
Power_IG_OFF_Init(); Power_IG_OFF_Init();
g_Power_St = m_IGN_OFF; g_Power_St = m_IGN_OFF;
//break; //break;
case m_IGN_OFF: case m_IGN_OFF:
g_Power_St = Power_Stay_OFF(); g_Power_St = Power_Stay_OFF();
break; break;
case m_IGN_Sleep_Init: case m_IGN_Sleep_Init:
Power_Sleep_Init(); Power_Sleep_Init();
g_Power_St = m_IGN_Sleep; g_Power_St = m_IGN_Sleep;
//break; //break;
case m_IGN_Sleep: case m_IGN_Sleep:
g_Power_St = Power_Stay_Sleep(); g_Power_St = Power_Stay_Sleep();
break; break;
case m_IGN_ON_Init: case m_IGN_ON_Init:
Power_IG_ON_Init(); Power_IG_ON_Init();
g_Power_St = m_IGN_ON; g_Power_St = m_IGN_ON;
//break; //break;
case m_IGN_ON: case m_IGN_ON:
g_Power_St = Power_Stay_ON(); g_Power_St = Power_Stay_ON();
break; break;
......
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
#include "Analog_Signals.h" #include "Analog_Signals.h"
#include "BGLInterface.h" #include "BGLInterface.h"
#include "BU98R10.h" #include "BU98R10.h"
#include "RSCAN.h"
#include "RSCAN_Table.h"
#define POWER_NM_SLEEP 0U #define POWER_NM_SLEEP 0U
#define POWER_NM_WAKEUP 1U #define POWER_NM_WAKEUP 1U
...@@ -69,7 +71,7 @@ Power_Status_t Power_KL30_Init ( void ) ...@@ -69,7 +71,7 @@ Power_Status_t Power_KL30_Init ( void )
Power_Status_t u8PowerSts; Power_Status_t u8PowerSts;
RTE_RTC_KL30_Init(); RTE_RTC_KL30_Init();
CD4051B_KL15Init(); CD4051B_KL15Init();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护开始*/
ClearNoInitArea(); ClearNoInitArea();
Common_DataInit(); Common_DataInit();
Sys_KL30_Init(); Sys_KL30_Init();
...@@ -78,43 +80,30 @@ Power_Status_t Power_KL30_Init ( void ) ...@@ -78,43 +80,30 @@ Power_Status_t Power_KL30_Init ( void )
Telltales_KL30_Init(); Telltales_KL30_Init();
SEG_BUFF_Init(); SEG_BUFF_Init();
DispSch_TotalInit(); DispSch_TotalInit();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护结束*/
/*车速 转速 水温表头 初始化 田雨 维护开始*/
UserGaugeK30Init(); UserGaugeK30Init();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
/*里程 大小计部分 刘明月 胡志松 辛雨 维护开始*/
Service_OFF_Timing_KL30Init(); Service_OFF_Timing_KL30Init();
Data_User_Mileage_KL30Init(); Data_User_Mileage_KL30Init();
Data_AvgSpeed_KL30_Init(); Data_AvgSpeed_KL30_Init();
Data_Maintenance_Service_KL30_Init(); Data_Maintenance_Service_KL30_Init();
/*里程 大小计部分 刘明月 胡志松 辛雨 维护结束*/
/*室外温度 胎压部分 档位 清大计 报警 对时 胡迎秋 维护开始*/
Data_AC_Temp_KL30_Init(); Data_AC_Temp_KL30_Init();
Data_TPMS_KL30_Init(); Data_TPMS_KL30_Init();
Data_Gear_KL30_Init(); Data_Gear_KL30_Init();
Data_ODO_Clear_KL30Init(); Data_ODO_Clear_KL30Init();
/*室外温度 胎压部分 档位 清大计 报警 对时 胡迎秋 维护结束*/
/*安全带 车门部分 李茂军维护开始*/
SeatbeltInit(); SeatbeltInit();
Door_WakeUpInit(); Door_WakeUpInit();
/*安全带 车门部分 李茂军维护结束*/
/*按键部分 杨真东维护开始*/
Key_Init(); Key_Init();
LED_Driver_Init(); LED_Driver_Init();
Sound_Scheduler_Init(); Sound_Scheduler_Init();
Sound_Player_Init(); Sound_Player_Init();
RTE_PWM_Init(); RTE_PWM_Init();
/*按键部分 杨真东维护结束*/
/*报警调度初始化*/
Popup_Scheduler_Init(); Popup_Scheduler_Init();
/*报警调度初始化*/
/*5s不按按键计时清零*/ /*5s不按按键计时清零*/
//LongTimeNoKey_Operation_TimeRest(); //LongTimeNoKey_Operation_TimeRest();
...@@ -139,7 +128,7 @@ void Power_Sleep_Init(void) ...@@ -139,7 +128,7 @@ void Power_Sleep_Init(void)
/*外设*/ /*外设*/
Seg_Display_OFF(); Seg_Display_OFF();
UART_Sleep_Init(); UART_Sleep_Init();
Buzzer_Shutdown(); /*蜂鸣器*/ Buzzer_Shutdown(); /*蜂鸣器*/
TimerB_PWM_Channel_Sleep(TIMERB_0_CH15); TimerB_PWM_Channel_Sleep(TIMERB_0_CH15);
...@@ -148,6 +137,39 @@ void Power_Sleep_Init(void) ...@@ -148,6 +137,39 @@ void Power_Sleep_Init(void)
TimerB_PWM_Channel_Sleep(TIMERB_1_CH15); TimerB_PWM_Channel_Sleep(TIMERB_1_CH15);
TimerB_PWM_Channel_Sleep(TIMERB_0_CH7); TimerB_PWM_Channel_Sleep(TIMERB_0_CH7);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_0);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_1);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_2);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_3);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_4);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_5);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_6);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_7);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_8);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_9);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_10);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_11);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_12);
RSCAN0_CH0_Abort(RSCAN_CHANNEL_BUF_13);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_0);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_1);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_2);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_3);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_4);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_5);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_6);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_7);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_8);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_9);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_10);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_11);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_12);
RSCAN0_CH2_Abort(RSCAN_CHANNEL_BUF_13);
RSCAN0_CH0_Sleep_Init();
RSCAN0_CH2_Sleep_Init();
VCC12V0_OUT_EN = 0u; /*12V 电源使能*/ VCC12V0_OUT_EN = 0u; /*12V 电源使能*/
VCC05V0_OUT_EN = 0u; /*外设5V 电源使能*/ VCC05V0_OUT_EN = 0u; /*外设5V 电源使能*/
D1530_EN_MCU_OUT = 0u; /*1530 使能*/ D1530_EN_MCU_OUT = 0u; /*1530 使能*/
...@@ -166,7 +188,7 @@ Power_Status_t Power_Wakeup_Init ( void ) ...@@ -166,7 +188,7 @@ Power_Status_t Power_Wakeup_Init ( void )
Kwp2000_Init(); Kwp2000_Init();
Power_Status_t u8PowerSts; Power_Status_t u8PowerSts;
/*电源 指示灯 硬线 通用信息部分 赵建智 维护开始*/
Common_DataInit(); Common_DataInit();
Sys_WakeUp_Init(); Sys_WakeUp_Init();
Line_In_KL30_Init(); Line_In_KL30_Init();
...@@ -174,18 +196,18 @@ Power_Status_t Power_Wakeup_Init ( void ) ...@@ -174,18 +196,18 @@ Power_Status_t Power_Wakeup_Init ( void )
Telltales_KL30_Init(); Telltales_KL30_Init();
SEG_BUFF_Init(); SEG_BUFF_Init();
DispSch_TotalInit(); DispSch_TotalInit();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护结束*/
Telltales_Wakeup_Init(); Telltales_Wakeup_Init();
Data_Time_WakeUp_Init(); Data_Time_WakeUp_Init();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
UserGaugeK30Init(); UserGaugeK30Init();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
Data_User_Mileage_KL15Init(); Data_User_Mileage_KL15Init();
Maintenance_WakeUp_Init(); Maintenance_WakeUp_Init();
/*安全带 车门部分 李茂军维护开始*/
SeatbeltInit(); SeatbeltInit();
Door_WakeUpInit(); Door_WakeUpInit();
/*安全带 车门部分 李茂军维护结束*/
RTE_PWM_Init(); RTE_PWM_Init();
/*燃油新增 ----20220503----*/ /*燃油新增 ----20220503----*/
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#define TACHO_SEG_NUM_MAX 27U #define TACHO_SEG_NUM_MAX 27U
#define VEH_SEG_NUM_MAX 30U #define VEH_SEG_NUM_MAX 30U
static uint8_t GaugesTimer;
static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank, uint8_t *DigitBuf, uint8_t *Reg); static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank, uint8_t *DigitBuf, uint8_t *Reg);
static void Seg_Digit_1_Disp(uint8_t Digit); static void Seg_Digit_1_Disp(uint8_t Digit);
static void Seg_Digit_2_Disp(uint8_t Digit); static void Seg_Digit_2_Disp(uint8_t Digit);
...@@ -1018,9 +1016,6 @@ static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank ...@@ -1018,9 +1016,6 @@ static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank
} }
} }
static uint8_t wbyTestSeg = 0;
static uint16_t wbyTestNum;
static uint8_t IC_TEST = 0;
/****************************************************************************** /******************************************************************************
Seg_Display_Service 在 20MS任务中 Seg_Display_Service 在 20MS任务中
信号接口: 信号接口:
...@@ -1029,6 +1024,10 @@ Seg_Display_Service 在 20MS任务中 ...@@ -1029,6 +1024,10 @@ Seg_Display_Service 在 20MS任务中
******************************************************************************/ ******************************************************************************/
void Seg_Display_Service(void) void Seg_Display_Service(void)
{ {
static uint16_t Vspeed_Val = 0u;
static uint8_t CurrencyTimer;
static uint8_t TempTimer;
static uint8_t SpeedTimer;
uint32_t Ign_Time; uint32_t Ign_Time;
uint16_t m16_FrameCnt; uint16_t m16_FrameCnt;
...@@ -1054,21 +1053,22 @@ void Seg_Display_Service(void) ...@@ -1054,21 +1053,22 @@ void Seg_Display_Service(void)
Seg_Digit_2_Disp(12); Seg_Digit_2_Disp(12);
Seg_Digit_3_Disp(12); Seg_Digit_3_Disp(12);
GaugesTimer = 4u; CurrencyTimer = 0u;
TempTimer = 0u;
SpeedTimer = 0u;
} }
else else
{ {
SEG_A25_Disp(7u); /*左侧弧线*/ SEG_A25_Disp(7u); /*左侧弧线*/
SEG_C25_Disp(7u); /*右侧弧线*/ SEG_C25_Disp(7u); /*右侧弧线*/
if (Ign_Time < StartAnimationEnd) if (Ign_Time < PopupStart)
{ {
m16_FrameCnt = Common_GetHMI_StartAnimationFrameCnt(); m16_FrameCnt = Common_GetHMI_StartAnimationFrameCnt();
m16_FrameCnt = m16_FrameCnt / 4u; m16_FrameCnt = m16_FrameCnt / 4u;
if (m16_FrameCnt >= FRAMECNTFLAG) if (m16_FrameCnt >= FRAMECNTFLAG)
{ {
SEG_PRI_Display (GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_NORMAL, 7u); /*PRI气压格*/ SEG_PRI_Display (GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_NORMAL, 7u); /*PRI气压格*/
SEG_SEC_Display (GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_NORMAL, 7u); /*SEC气压格*/ SEG_SEC_Display (GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_NORMAL, 7u); /*SEC气压格*/
SEG_Coolant_Display (GetGaugesCurrentPos(TempGauges), GUI_DISP_MODE_NORMAL, 7u); /*水温格*/ SEG_Coolant_Display (GetGaugesCurrentPos(TempGauges), GUI_DISP_MODE_NORMAL, 7u); /*水温格*/
...@@ -1082,51 +1082,74 @@ void Seg_Display_Service(void) ...@@ -1082,51 +1082,74 @@ void Seg_Display_Service(void)
Seg_Digit_3_Disp(12); Seg_Digit_3_Disp(12);
} }
GaugesTimer = 4u; CurrencyTimer = 0u;
TempTimer = 0u;
SpeedTimer = 0u;
} }
else if (GaugesTimer == 0u) else
{ {
GaugesTimer = 4u; if (CurrencyTimer == 0u)
if (Common_Get_Air1_Valid())
{ {
SEG_PRI_Display(GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_NORMAL, 7u); // PRI气压格 CurrencyTimer = 5u;
if (Common_Get_Air1_Valid())
{
SEG_PRI_Display(GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_NORMAL, 7u); // PRI气压格
}
else
{
SEG_PRI_Display(GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_INVALID, 7u); // PRI气压格
}
if (Common_Get_Air2_Valid())
{
SEG_SEC_Display(GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_NORMAL, 7u); // SEC气压格
}
else
{
SEG_SEC_Display(GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_INVALID, 7u); // SEC气压格
}
SEG_Fuel_Display(Fuel_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //燃油格
SEG_Tacho_Display(Tacho_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //转速格
SEG_VehicleSpeed_Display(Speed_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //车速格
} }
else else
{ {
SEG_PRI_Display(GetGaugesCurrentPos(PRIGasGauges), GUI_DISP_MODE_INVALID, 7u); // PRI气压格 CurrencyTimer--;
} }
if (Common_Get_Air2_Valid()) if (TempTimer == 0)
{ {
SEG_SEC_Display(GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_NORMAL, 7u); // SEC气压格 TempTimer = 2;
if (Coolant_Get_Valid())
{
SEG_Coolant_Display(Coolant_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //水温格
}
else
{
SEG_Coolant_Display(Coolant_Get_CurSeg(), GUI_DISP_MODE_INVALID, 7u); //水温格
}
} }
else else
{ {
SEG_SEC_Display(GetGaugesCurrentPos(SECGasGauges), GUI_DISP_MODE_INVALID, 7u); // SEC气压格 TempTimer--;
} }
if (Coolant_Get_Valid()) if (SpeedTimer == 0)
{ {
SEG_Coolant_Display(Coolant_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //水温格 SpeedTimer = 10;
Vspeed_Val = Common_Get_Disp_V_Speed();
SEG_VehicleSpeed_Num(Vspeed_Val, GUI_DISP_MODE_NORMAL); //车速值
} }
else else
{ {
SEG_Coolant_Display(Coolant_Get_CurSeg(), GUI_DISP_MODE_INVALID, 7u); //水温格 SpeedTimer --;
} }
SEG_Fuel_Display(Fuel_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //燃油格
SEG_Tacho_Display(Tacho_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //转速格
SEG_VehicleSpeed_Display(Speed_Get_CurSeg(), GUI_DISP_MODE_NORMAL, 7u); //车速格
wbyTestNum = Common_Get_Disp_V_Speed();
SEG_VehicleSpeed_Num(wbyTestNum, GUI_DISP_MODE_NORMAL); //车速值
}
else
{
GaugesTimer--;
} }
} }
} }
......
...@@ -176,15 +176,8 @@ void Can_Set_Buff_18FEAE17(uint8_t CopyData[]) ...@@ -176,15 +176,8 @@ void Can_Set_Buff_18FEAE17(uint8_t CopyData[])
/*电源电压*/ /*电源电压*/
Power_Supply_Voltage = 0u; Power_Supply_Voltage = 0u;
/*驻车制动外发*/ /*驻车制动外发*//*18FEAE17 byte8 bit 8-7 要改成,悬空=00 接地=01 20230114*/
if (Line_In_Get_Status(LINE_IN_PARK_BRAKE) == 0u) Parking_Brake_Switch = Line_In_Get_Status(LINE_IN_PARK_BRAKE);
{
Parking_Brake_Switch = 1u;
}
else
{
Parking_Brake_Switch = 0u;
}
Rader_Stain_Information = 0u; Rader_Stain_Information = 0u;
SW_ECONO = 0u; SW_ECONO = 0u;
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "DisplaySch_user.h" #include "DisplaySch_user.h"
#include "DispSch.h" #include "DispSch.h"
#include "FlashCheckSum.h" #include "FlashCheckSum.h"
#include "Graphic.h"
#pragma alignvar(8) #pragma alignvar(8)
uint32_t EolNUM[10u][8u]; uint32_t EolNUM[10u][8u];
...@@ -10324,6 +10325,8 @@ void Common_Set_DTCNumTime(uint32_t Vol) ...@@ -10324,6 +10325,8 @@ void Common_Set_DTCNumTime(uint32_t Vol)
DTCDispNum = Vol; DTCDispNum = Vol;
} }
uint8_t Flash_time = 0;
uint16_t Color_Time = 0;// 20 更换一次颜色
void Gui_Display_Test(void) void Gui_Display_Test(void)
{ {
...@@ -10331,8 +10334,7 @@ void Gui_Display_Test(void) ...@@ -10331,8 +10334,7 @@ void Gui_Display_Test(void)
uint16_t Get_Data_Rev_value = 0u ; uint16_t Get_Data_Rev_value = 0u ;
uint16_t Get_Data_Veh_valueMax = 0u; uint16_t Get_Data_Veh_valueMax = 0u;
uint16_t Get_Data_Rev_valueMax = 0u; uint16_t Get_Data_Rev_valueMax = 0u;
static uint16_t Time = 0; uint32_t TmpRet = 0;
static uint16_t Flag = 0;
/*获取的是步数,与当前步数*/ /*获取的是步数,与当前步数*/
Get_Data_Veh_value = GetGaugesCurrentPos(VehGauges) ; Get_Data_Veh_value = GetGaugesCurrentPos(VehGauges) ;
...@@ -10343,62 +10345,72 @@ void Gui_Display_Test(void) ...@@ -10343,62 +10345,72 @@ void Gui_Display_Test(void)
//if (( Get_Data_Veh_value >= Get_Data_Veh_valueMax ) && ( Get_Data_Rev_value >= Get_Data_Rev_valueMax )) //if (( Get_Data_Veh_value >= Get_Data_Veh_valueMax ) && ( Get_Data_Rev_value >= Get_Data_Rev_valueMax ))
{ {
if (CheckSpiFlashCRC() == 0) while (1)
{ {
GUI_General_Display(WET_Sprite, quanping_red , GUI_BLENDMODE_SRC_OVER); WDT_Clear();
}
else
{
while (1)
{
WDT_Clear();
Time++; if (Flash_time < 30)
if (Time > 500) {
{ Flash_time++;
Time = 0; }
if (Flag <= 7) else
{ {
Flag ++; if (Color_Time >= 0 && Color_Time < 20)
}
}
if ((Flag == 0) && (Time == 1))
{ {
loc_Del_Sprite(WET_Sprite, Calendar_Sprite); //蓝色
loc_free_mem(WET_Sprite, Calendar_Sprite); Loc_Display_Red(0, 0, 0XFF);
} }
else if (Flag == 1) else if (Color_Time >= 20 && Color_Time < 40)
{ {
GUI_General_Display(WET_Sprite, quanping_white , GUI_BLENDMODE_SRC_OVER); //绿色
Loc_Display_Red(0, 0XFF, 0);
} }
else if (Flag == 2) else if (Color_Time >= 40 && Color_Time < 60)
{ {
GUI_General_Display(WET_Sprite, quanping_blue , GUI_BLENDMODE_SRC_OVER); //黄色
Loc_Display_Red(0xFF, 0XFF, 0);
} }
else if (Flag == 3) else if (Color_Time >= 60 && Color_Time < 80)
{ {
GUI_General_Display(WET_Sprite, quanping_red , GUI_BLENDMODE_SRC_OVER); //红色
Loc_Display_Red(0XFF, 0, 0);
} }
else if (Flag == 4) else if (Color_Time >= 80 && Color_Time < 100)
{ {
GUI_General_Display(WET_Sprite, quanping_green , GUI_BLENDMODE_SRC_OVER); //黑色
Loc_Display_Red(0, 0, 0);
} }
else if (Flag == 5) else if (Color_Time >= 100 && Color_Time < 120)
{ {
GUI_General_Display(WET_Sprite, quanping_black , GUI_BLENDMODE_SRC_OVER); //白色
Loc_Display_Red(0xFF, 0xFF, 0XFF);
} }
else if (Flag == 6) else if (Flash_time == 30)
{ {
GUI_General_Display(WET_Sprite, quanping_MSK , GUI_BLENDMODE_SRC_OVER); Flash_time = 250;
TmpRet = CheckSpiFlashCRC();
if (TmpRet == 0)
{
Loc_Display_Red(0XFF, 0, 0);
}
else
{
//检验正常。恢复显示正常界面
if (Color_Time == 120)
{
Loc_Display_Red(1, 1, 1);
Flash_time = 0;
Color_Time = 0;
break;
}
}
} }
else if (Flag == 7)
{
HMI_Clear_KEY_CONFIRM();
GUI_General_Display(WET_Sprite, ditu_2, GUI_BLENDMODE_CUSTOM);
loc_enable_mem(WET_Sprite, Calendar_Sprite);
break; if (Color_Time < 120)
{
Color_Time++;
} }
} }
} }
......
...@@ -25,7 +25,7 @@ uint8_t BG_display_flag; ...@@ -25,7 +25,7 @@ uint8_t BG_display_flag;
uint16_t HMI_StartAnimationFrameCnt; uint16_t HMI_StartAnimationFrameCnt;
uint8_t backgroundOFFFlag; uint8_t backgroundOFFFlag;
uint32_t BackOdoFlagSta; uint8_t BackOdoFlagSta;
static void switch_branch(void); static void switch_branch(void);
...@@ -183,16 +183,20 @@ void DisplayServices(void) ...@@ -183,16 +183,20 @@ void DisplayServices(void)
{ {
HMI_Clear_KEY_CONFIRM(); HMI_Clear_KEY_CONFIRM();
} }
/*确认超长 5 S*/ /*确认超长 3S*/
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SUPER_LONG_PRESS) else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SUPER_LONG_PRESS)
{ {
//HMI_Clear_KEY_CONFIRM(); HMI_Clear_KEY_CONFIRM();
/*TYW总计清零*/ if (BackOdoFlagSta == 0)
TYW_Data_ODO_Clear(); {
HMI_Clear_KEY_CONFIRM();
Gui_Display_Test();
/*TYW总计清零*/
//if (Data_ODO_Read() != 0) BackOdoFlagSta = 1 ;
BackOdoFlagSta++; TYW_Data_ODO_Clear();
//Gui_Display_Test(); }
} }
/*返回短*/ /*返回短*/
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_SHORT_PRESS) else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_SHORT_PRESS)
......
...@@ -265,7 +265,35 @@ static void Common_Set_Act_E_Speed(uint16_t Val) ...@@ -265,7 +265,35 @@ static void Common_Set_Act_E_Speed(uint16_t Val)
} }
static void Common_Set_Disp_V_Speed(uint16_t Val) static void Common_Set_Disp_V_Speed(uint16_t Val)
{ {
Disp_V_Speed = Val; static uint16_t Vspeed_ReflashTime = 0;
static uint16_t Vspeed_Val = 0;
if ((Vspeed_ReflashTime > 0) && (Vspeed_Val != Val))
{
Vspeed_ReflashTime--;
}
if (Vspeed_ReflashTime == 0)
{
if (Vspeed_Val < Val)
{
Vspeed_ReflashTime = 50 / (Val - Vspeed_Val);
Vspeed_Val++;
}
else if (Vspeed_Val > Val)
{
Vspeed_ReflashTime = 50 / (Vspeed_Val - Val);
Vspeed_Val--;
}
else
{
Vspeed_ReflashTime = 500;
}
}
Disp_V_Speed = Vspeed_Val;
} }
static void Common_Set_Disp_E_Speed(uint16_t Val) static void Common_Set_Disp_E_Speed(uint16_t Val)
{ {
...@@ -341,6 +369,7 @@ void Common_Input_Para(void) ...@@ -341,6 +369,7 @@ void Common_Input_Para(void)
/*车速*/ /*车速*/
wbyTest = Speed_Get_Display_Value(); wbyTest = Speed_Get_Display_Value();
Common_Set_Disp_V_Speed(wbyTest); Common_Set_Disp_V_Speed(wbyTest);
Common_Set_Act_V_Speed(Speed_Get_ActualValue()); Common_Set_Act_V_Speed(Speed_Get_ActualValue());
......
This diff is collapsed.
...@@ -29,13 +29,13 @@ ...@@ -29,13 +29,13 @@
#define GFX_DHD_USE_PC (1U) /* Use performance counters: Set to 1 to reserve memory for performance counters */ #define GFX_DHD_USE_PC (1U) /* Use performance counters: Set to 1 to reserve memory for performance counters */
#define GFX_DHD_STATE_STORAGE (480U) /* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */ #define GFX_DHD_STATE_STORAGE (480U) /* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using /* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature! * DHD performance counter or when using DHD command list feature!
* *
* Example: Each of the 4 available performance counters requires allocation of 4 bytes. * Example: Each of the 4 available performance counters requires allocation of 4 bytes.
Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required. Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required.
*/ */
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U) #define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U) #define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U)
#define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U) #define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U)
#define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \ #define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \
...@@ -114,16 +114,16 @@ ...@@ -114,16 +114,16 @@
#define GFX_DHD_JOB_SIZE (512U) /* Jobsize: Number of bytes in one job buffer */ #define GFX_DHD_JOB_SIZE (512U) /* Jobsize: Number of bytes in one job buffer */
#define GFX_DHD_JOB_COUNT (8U) /* Jobcount: Recommended number of jobs in flight per client */ #define GFX_DHD_JOB_COUNT (8U) /* Jobcount: Recommended number of jobs in flight per client */
#define GFX_DHD_RING_SIZE (1024U) /* Ringsize: Number of bytes in ringbuffer, needs to be a power of two */ #define GFX_DHD_RING_SIZE (1024U) /* Ringsize: Number of bytes in ringbuffer, needs to be a power of two */
#define GFX_DHD_USE_PC (1U) Use performance counters: Set to 1 to reserve memory for performance counters #define GFX_DHD_USE_PC (1U) Use performance counters: Set to 1 to reserve memory for performance counters
#define GFX_DHD_STATE_STORAGE (480U) /* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */ #define GFX_DHD_STATE_STORAGE (480U) /* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using /* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature! * DHD performance counter or when using DHD command list feature!
* *
* Example: Each of the 4 available performance counters requires allocation of 4 bytes. * Example: Each of the 4 available performance counters requires allocation of 4 bytes.
Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required. Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required.
*/ */
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U) #define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U) #define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U)
#define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U) #define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U)
#define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \ #define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \
...@@ -155,19 +155,16 @@ extern void Gfx_Init(uint8_t u8Mode); ...@@ -155,19 +155,16 @@ extern void Gfx_Init(uint8_t u8Mode);
extern void Gfx_Sys_Start(void); extern void Gfx_Sys_Start(void);
extern void Gfx_Sys_Stop(void); extern void Gfx_Sys_Stop(void);
extern void Gfx_Create_Window(r_wm_WinMode_t enMode, extern void Gfx_Create_Window(r_wm_WinMode_t enMode,
uint32_t u32PosX, uint32_t u32PosX,
uint32_t u32PosY, uint32_t u32PosY,
uint32_t u32PosZ, uint32_t u32PosZ,
uint32_t u32Width, uint32_t u32Width,
uint32_t u32Height, uint32_t u32Height,
uint32_t u32Pitch, uint32_t u32Pitch,
uint32_t u32Bnumber, uint32_t u32Bnumber,
r_wm_WinColorFmt_t enColorFmt, r_wm_WinColorFmt_t enColorFmt,
r_wm_Window_t* pstWindow); r_wm_Window_t* pstWindow);
void Loc_Display_Red(uint8_t ColorR, uint8_t ColorG, uint8_t ColorB);
#endif /* GRAPHIC_H__ */ #endif /* GRAPHIC_H__ */
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