Commit c68277e7 authored by hu's avatar hu

调整按键问题

parent ae104679
......@@ -2,9 +2,10 @@
#include "BackgroundLight.h"
#include "BGLInterface.h"
#include "GPIO.h"
#include "Data_CoolantTemperature.h"
#include "kwp2000_service.h"
#include "Telltales.h"
#include "Data_CoolantTemperature.h"
#include "Menu.h"
uint16_t IgnOffKeepMs;
uint16_t IgnOnKeepMs;
......@@ -404,7 +405,7 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara)
SetBacklightDestVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty);
/*燃油报警*/
if ((LED_Fuel_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
if (((LED_Fuel_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u)) || (MenuFlag.Menu_Popup_Flag == 4u))
{
SetBacklightDestVal(LED_FUEL, 0);
}
......
......@@ -13,7 +13,7 @@
#include "Gauges.h"
#include "GaugesInterface.h"
#define GAUGES_TOTAL_NUM 9u
#define GAUGES_INIT_TIME_MAX 2000u
#define GAUGES_INIT_TIME_MAX 3500u
uint16_t GaugesCurrentPos[GAUGES_TOTAL_NUM] ;
uint16_t BackupDestPostion[GAUGES_TOTAL_NUM];
uint16_t GaugesDisPos[GAUGES_TOTAL_NUM];
......
......@@ -308,7 +308,7 @@ void Key_Init(void)
/*按键动作时间*/
/*342 4.1 短按/长按操作的判断标准(判定时间):短按;40ms以上,未到800ms,长按;800ms以上*/
stKeyParameter.u16KeyLoosenTime = 100U;
stKeyParameter.u16KeyShortPressTime = 40U;
stKeyParameter.u16KeyShortPressTime = 80U;
stKeyParameter.u16KeyLongPressTime = 1000U;
stKeyParameter.u16KeySuperLongPressTime = 10000U;
stKeyParameter.u16KeyValidOFFTime = 200U; /*按键动作时间*/
......
......@@ -241,6 +241,8 @@ void Display_StartAnimationEnter(void)
{
HMI_StartAnimationFrameCnt = 0u;
backgroundOFFFlag = 0;
MenuFlag.Menu_Popup_Flag = 0u ;
/*硬清空所有缓存数据*/
loc_free_mem(MENU_Sprite, MENU_Sprite);
......
......@@ -124,26 +124,62 @@ void CD4051B_Debounce_Service(void)
CD4051CtrStr[comcnt][chcnt].time++;
if (CD4051B_GeneralCOM_Cache[comcnt][chcnt] == 1u)
{
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_High_CNT)
/*特殊*/
if ((comcnt == COM3) && (chcnt == Channel5))
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 1u;
if (CD4051CtrStr[comcnt][chcnt].time >= 2)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 1u;
}
else
{
;
}
}
/*一般*/
else
{
;
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_High_CNT)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 1u;
}
else
{
;
}
}
}
else
{
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_Low_CNT)
/*特殊*/
if ((comcnt == COM3) && (chcnt == Channel5))
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 0u;
if (CD4051CtrStr[comcnt][chcnt].time >= 2)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 0u;
}
else
{
;
}
}
/*一般*/
else
{
;
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_Low_CNT)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 0u;
}
else
{
;
}
}
}
}
......
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