Commit 8217937d authored by 付飞凡's avatar 付飞凡

feat(QYC检测台):

1.触控盖板触控功能检测:触控检测到显示1,检测不到显示0; 2.检测顺序从左往右; 3.需要rest检测功能功能;
parent 9198172f
......@@ -3461,11 +3461,11 @@ void MSG_CKB_ON_PROCESS_b2(canlib_uint8_t CopyData[])
u32ScreenKeyValueMem[8]= u32ScreenKeyValue[8];
if (u32ScreenKeyValueMem[8] == 0)
{
u32ScreenKeyCount[16]++;
u32ScreenKeyCount[16] = 0;
}
if (u32ScreenKeyValueMem[8] == 1)
{
u32ScreenKeyCount[17]++;
u32ScreenKeyCount[16] = 1;
}
}
}
......@@ -3489,11 +3489,11 @@ void MSG_CKB_ON_PROCESS_b3(canlib_uint8_t CopyData[])
u32ScreenKeyValueMem[i]= u32ScreenKeyValue[i];
if (u32ScreenKeyValueMem[i] == 0)
{
u32ScreenKeyCount[i*2]++;
u32ScreenKeyCount[i*2] = 0;
}
if (u32ScreenKeyValueMem[i] == 1)
{
u32ScreenKeyCount[i*2+1]++;
u32ScreenKeyCount[i*2] = 1;
}
}
}
......@@ -3510,31 +3510,31 @@ void MSG_Display(void)
if (u32ScreenKeyCount_Back[i] != u32ScreenKeyCount[i] )
{
GUI_General_Digit_Display(u32ScreenKeyCount[0], Num_15, 4, 3, left, 110);//110
GUI_General_Digit_Display(u32ScreenKeyCount[1], Num_15, 4, 3, right, 110);
//GUI_General_Digit_Display(u32ScreenKeyCount[1], Num_15, 4, 3, right, 110);
GUI_General_Digit_Display(u32ScreenKeyCount[2], Num_15, 4, 3, left, 90);
GUI_General_Digit_Display(u32ScreenKeyCount[3], Num_15, 4, 3, right, 90);
//GUI_General_Digit_Display(u32ScreenKeyCount[3], Num_15, 4, 3, right, 90);
GUI_General_Digit_Display(u32ScreenKeyCount[4], Num_15, 4, 3, left, 230);//230
GUI_General_Digit_Display(u32ScreenKeyCount[5], Num_15, 4, 3, right, 230);
//GUI_General_Digit_Display(u32ScreenKeyCount[5], Num_15, 4, 3, right, 230);
GUI_General_Digit_Display(u32ScreenKeyCount[6], Num_15, 4, 3, left, 210);//210
GUI_General_Digit_Display(u32ScreenKeyCount[7], Num_15, 4, 3, right, 210);
//GUI_General_Digit_Display(u32ScreenKeyCount[7], Num_15, 4, 3, right, 210);
GUI_General_Digit_Display(u32ScreenKeyCount[8], Num_15, 4, 3, left, 190);//190
GUI_General_Digit_Display(u32ScreenKeyCount[9], Num_15, 4, 3, right, 190);
//GUI_General_Digit_Display(u32ScreenKeyCount[9], Num_15, 4, 3, right, 190);
GUI_General_Digit_Display(u32ScreenKeyCount[10], Num_15, 4, 3, left, 170);
GUI_General_Digit_Display(u32ScreenKeyCount[11], Num_15, 4, 3, right, 170);
//GUI_General_Digit_Display(u32ScreenKeyCount[11], Num_15, 4, 3, right, 170);
GUI_General_Digit_Display(u32ScreenKeyCount[12], Num_15, 4, 3, left, 150);//150
GUI_General_Digit_Display(u32ScreenKeyCount[13], Num_15, 4, 3, right, 150);
//GUI_General_Digit_Display(u32ScreenKeyCount[13], Num_15, 4, 3, right, 150);
GUI_General_Digit_Display(u32ScreenKeyCount[14], Num_15, 4, 3, left, 130);//130
GUI_General_Digit_Display(u32ScreenKeyCount[15], Num_15, 4, 3, right, 130);
//GUI_General_Digit_Display(u32ScreenKeyCount[15], Num_15, 4, 3, right, 130);
GUI_General_Digit_Display(u32ScreenKeyCount[16], Num_15, 4, 3, left, 70);//70
GUI_General_Digit_Display(u32ScreenKeyCount[17], Num_15, 4, 3, right, 70);
//GUI_General_Digit_Display(u32ScreenKeyCount[17], Num_15, 4, 3, right, 70);
for ( i = 0; i < 18; i++)
{
......@@ -3557,24 +3557,24 @@ uint8_t timer_HL;
void Disp_HL_detection(void)
{
u32ScreenKeyValue[9] = GPIO_IN_PORT10_PIN15;
u32ScreenKeyValue[9] = GPIO_IN_PORT11_PIN00;
// if(timer_HL >= 20)
// {
if (u32ScreenKeyValueMem[9] != u32ScreenKeyValue[9])
{
if(u32ScreenKeyValue[9] == 1)
{
u32ScreenKeyCount[19]++;
u32ScreenKeyCount[18] = 0;
}
else
{
u32ScreenKeyCount[18]++;
u32ScreenKeyCount[18] = 1;
}
u32ScreenKeyValueMem[9] = u32ScreenKeyValue[9];
}
// }
GUI_General_Digit_Display(u32ScreenKeyCount[18], Num_15, 4, 3, left, 250);
GUI_General_Digit_Display(u32ScreenKeyCount[19], Num_15, 4, 3, right, 250);
//GUI_General_Digit_Display(u32ScreenKeyCount[19], Num_15, 4, 3, right, 250);
}
//TFT_LCD_Draw_Box(115, 70, 165, 100, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
......@@ -71,16 +71,16 @@ void RTE_GPIO_Init(void)
GPIO_Init(GPIO_WAKEUP_MODE);
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_10;
gpio_temp.enGPIOPIN = GPIO_PIN_15;
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_0;
gpio_temp.enGPIOPIN = GPIO_PIN_13;
gpio_temp.enGPIOMode = GPIO_MODE_PORT;
gpio_temp.enGPIODir = GPIO_DIR_IN;
gpio_temp.enGPIODir = GPIO_DIR_OUT;
gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
GPIO_Config(&gpio_temp);//Pin0-13 燃油引脚
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_8;
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_8;
gpio_temp.enGPIOPIN = GPIO_PIN_10;
gpio_temp.enGPIOMode = GPIO_MODE_PORT;
gpio_temp.enGPIODir = GPIO_DIR_OUT;
......@@ -257,4 +257,9 @@ void RTE_GPIO_Init(void)
gpio_temp.enGPIODir = GPIO_DIR_OUT;
GPIO_Config(&gpio_temp);//--燃油4
gpio_temp.enGPIOPort = GPIO_PORT_GROUP_11;
gpio_temp.enGPIOPIN = GPIO_PIN_0;
gpio_temp.enGPIODir = GPIO_DIR_IN;
GPIO_Config(&gpio_temp);
}
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