Commit 86821bfe authored by 何锐's avatar 何锐

feat:车速转速最大指示灯全亮程序

parent 5143f301
...@@ -10,17 +10,17 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) ...@@ -10,17 +10,17 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{ {
// Display_Add( ); // Display_Add( );
// Display_TFT_Clear( ); // Display_TFT_Clear( );
Display_TFT_Clear_UID(); // Display_TFT_Clear_UID();
if(change > 0) // if(change > 0)
{ // {
change--; // change--;
UUIDX -= 10; // UUIDX -= 10;
} // }
else // else
{ // {
change = 13; // change = 13;
UUIDX = 197; // UUIDX = 197;
} // }
// Display_TFT_Clear(); // Display_TFT_Clear();
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
...@@ -49,14 +49,14 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent) ...@@ -49,14 +49,14 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(UIDNumber2[change] < 9) // if(UIDNumber2[change] < 9)
{ // {
UIDNumber2[change]++; // UIDNumber2[change]++;
} // }
else // else
{ // {
UIDNumber2[change] = 0; // UIDNumber2[change] = 0;
} // }
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1)) // if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// { // {
// ; // ;
...@@ -128,37 +128,37 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent) ...@@ -128,37 +128,37 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(MENU_CHECK_STEP == 0) // if(MENU_CHECK_STEP == 0)
{ // {
MENU_CHECK_STEP = 16; // MENU_CHECK_STEP = 16;
} // }
else if(MENU_CHECK_STEP == 16) // else if(MENU_CHECK_STEP == 16)
{ // {
MENU_CHECK_STEP = 1; // MENU_CHECK_STEP = 1;
} // }
else // else
{ // {
MENU_CHECK_STEP++; // MENU_CHECK_STEP++;
} // }
if((MENU_CHECK_STEP < 6) && (MENU_CHECK_STEP > 0)) // if((MENU_CHECK_STEP < 6) && (MENU_CHECK_STEP > 0))
{ // {
IG_OFF_Flag = 1; // IG_OFF_Flag = 1;
} // }
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
if ( LED_Waring == 1 || (UDS_Warning_Voltage ==1)) // if ( LED_Waring == 1 || (UDS_Warning_Voltage ==1))
{ // {
; // ;
} // }
else // else
{ // {
MENU_CHECK_STEP_ADD( ); // MENU_CHECK_STEP_ADD( );
} // }
} }
else else
{ {
...@@ -168,19 +168,19 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent) ...@@ -168,19 +168,19 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
writeflag = 1; // writeflag = 1;
zhenduanstep = 11; // zhenduanstep = 11;
UIDStep = 0; // UIDStep = 0;
writebeing = 1; // writebeing = 1;
// if(UIDNumber2[change] < 9) // // if(UIDNumber2[change] < 9)
// { // // {
// UIDNumber2[change]++; // // UIDNumber2[change]++;
// } // // }
// else // // else
// { // // {
// UIDNumber2[change] = 0; // // UIDNumber2[change] = 0;
// } // // }
Display_TFT_Clear_UID2(); // Display_TFT_Clear_UID2();
} }
else if (( enKeyEvent == KEY_EVENT_LONG_PRESS ) && (MENU_CHECK_STEP == 10)) else if (( enKeyEvent == KEY_EVENT_LONG_PRESS ) && (MENU_CHECK_STEP == 10))
{ {
......
...@@ -88,6 +88,7 @@ void Sys_Startup_Init(void) ...@@ -88,6 +88,7 @@ void Sys_Startup_Init(void)
UIDdelay = 0; UIDdelay = 0;
POWER_CTRL_KL30 = 1u; //B+ POWER_CTRL_KL30 = 1u; //B+
POWER_CTRL_KL15 = 1u; //KL15 POWER_CTRL_KL15 = 1u; //KL15
MENU_CHECK_STEP = 15;
for (int i = 0; i < 33; i++) for (int i = 0; i < 33; i++)
{ {
UIDcode1[i] = 0; UIDcode1[i] = 0;
......
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