Commit bfe2a0c7 authored by huangguoqing's avatar huangguoqing

feat:更改模式切换BUG

parent 6c62f4f5
......@@ -13,6 +13,7 @@ extern const unsigned char gImage_titlex0_y0[];
uint8_t Check_Steps = 0;
uint8_t Check_Control_Mode = 2;// 1 自走模式 2 打点模式 0 默认都发0
uint16_t Check_Control_Time = 0;
uint8_t check_Control_Mode2_Flag=0;
uint8_t Vspeed = 0;
uint8_t Signal_4G = 0;
uint8_t Signal_GPS = 0;
......@@ -64,6 +65,7 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{
POWER_CTRL_KL15 = 1;
}
check_Control_Mode2_Flag = 0;
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......@@ -87,6 +89,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
Display_TFT_Clear();
Study_Flag = 1;
UIDMondel = 0;
check_Control_Mode2_Flag = 0;
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
......@@ -103,6 +106,7 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
check_Control_Mode2_Flag = 0;
Display_SUCCESS_Clear();
if(UIDMondel == 0)
{
......@@ -134,6 +138,7 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
check_Control_Mode2_Flag = 0;
if(UIDMondel)
{
Display_TFT_Clear();
......@@ -165,6 +170,7 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
check_Control_Mode2_Flag = 0;
if(UIDMondel)
{
Display_TFT_Clear();
......@@ -199,6 +205,7 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
UIDMondel = 0;
Display_TFT_Clear();
check_Control_Mode2_Flag = 1;
if(Check_Control_Mode == 1)
{
......@@ -235,6 +242,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
Display_TFT_Clear();
UIDMondel = 0;
//Display_Chaka_Model();//查卡模式:
check_Control_Mode2_Flag = 0;
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
......@@ -270,6 +278,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
TFT_LCD_Draw_Bmp(0, 220, ( uint8_t * )gImage_titlex0_y0 );
General_Number_Disp(Detecting_Set_Version, 90, 230);/*显示检测台版本号*/
//Display_Can_Receive_Data(5,50);
check_Control_Mode2_Flag = 0;
}
......@@ -290,6 +299,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
UIDMondel = 0;
check_Control_Mode2_Flag = 0;
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
......@@ -311,6 +321,7 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
{
if(Check_Control_Mode == 2)
{
check_Control_Mode2_Flag = 0;
//All_Flag.u8flag[10] == 1;
if((( All_Flag.u8flag[8] == 0) && ( All_Flag.u8flag[2] == 0)&& ( All_Flag.u8flag[7] == 0) && (( All_Flag.u8flag[6] == 1))))
{
......@@ -470,7 +481,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Check_Control_Time = 0;
Check_Steps++;
if(Check_Control_Mode == 1)
if(check_Control_Mode2_Flag == 1)
{
Display_flag(Check_Steps);
}
......
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