Commit d1086d26 authored by 张金硕's avatar 张金硕

🐞 fix:修复主题模式切换时不足1.5s的问题

parent 7134ed56
......@@ -7,7 +7,8 @@
Light_uint8_t LightADCompleteFlg = 0u;
Light_uint16_t LightR = 0u;
Light_uint16_t LightR_Status = 0;
Light_uint16_t LightR_Status_Count = 0u;
Light_uint16_t LightR_Status_NCount = 0u;
Light_uint16_t LightR_Status_DCount = 0u;
Light_uint16_t NtcDataCount;
Light_uint16_t NtcData[LIGHT_DATA_NUM] = {0};
typedef struct
......@@ -495,20 +496,22 @@ void BackLight_Process(void)
if(LightR <= 200)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
LightR_Status_NCount++;
if(LightR_Status_NCount>=150)
{
LightR_Status_Count = 0;
LightR_Status_NCount = 150;
LightR_Status_DCount = 0;
LightR_Status = 0;
g_u8Display_Mode = ModeNIGHT;
}
}
else if(LightR > 200)
{
LightR_Status_Count++;
if(LightR_Status_Count>=150)
LightR_Status_DCount++;
if(LightR_Status_DCount>=150)
{
LightR_Status_Count = 0;
LightR_Status_DCount = 150;
LightR_Status_NCount = 0;
LightR_Status = 1;
g_u8Display_Mode = ModeDAY;
}
......
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