Commit 574989e7 authored by 李梓源's avatar 李梓源

feat:优化切换下一步的条件限制

parent 55cfa810
...@@ -591,11 +591,28 @@ void Function_Check_Ctrl(uint32_t cmd) ...@@ -591,11 +591,28 @@ void Function_Check_Ctrl(uint32_t cmd)
switch (MENU_CHECK_STEP) switch (MENU_CHECK_STEP)
{ {
case 0: case 0:
{
if(CHECK_Ctrl_delay <= 10)
{
RELAY_VBAT_MCU = 0;
RELAY_DC12V_MCU = 0;
RELAY_KEY_MCU = 0;
}
else if ( CHECK_Ctrl_delay > 10 && CHECK_Ctrl_delay <= 60)
{ {
RELAY_VBAT_MCU = 1; RELAY_VBAT_MCU = 1;
RELAY_DC12V_MCU = 1; RELAY_DC12V_MCU = 1;
RELAY_KEY_MCU = 1; RELAY_KEY_MCU = 1;
}
else if(CHECK_Ctrl_delay > 60 && CHECK_Ctrl_delay <= 65)
{
Aima_SLF(1u, 0x03, 0x1, 1u); Aima_SLF(1u, 0x03, 0x1, 1u);
}
else
{
}
break; break;
......
...@@ -4409,7 +4409,7 @@ void Display_Send_ODO(uint8_t fuel) ...@@ -4409,7 +4409,7 @@ void Display_Send_ODO(uint8_t fuel)
} }
uint8_t CHECK_Value = 1; uint8_t CHECK_Value = 0;
uint8_t DIS_VALUE = 0; uint8_t DIS_VALUE = 0;
const uint16_t Volatile[] = {90,80}; const uint16_t Volatile[] = {90,80};
void Display_Send_Vspead(uint8_t menu) void Display_Send_Vspead(uint8_t menu)
...@@ -4433,8 +4433,11 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4433,8 +4433,11 @@ void Display_Send_Vspead(uint8_t menu)
switch (menu) switch (menu)
{ {
case 0: case 0:
{
if(CHECK_Ctrl_delay >= 75)
{ {
CHECK_Value = 1; CHECK_Value = 1;
}
break; break;
} }
case 1: case 1:
...@@ -4448,8 +4451,16 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4448,8 +4451,16 @@ void Display_Send_Vspead(uint8_t menu)
{ {
if(DIS_VALUE == 1) if(DIS_VALUE == 1)
{ {
CHECK_Value = 1;
if(DIS_AD == 1)
{
DIS_VALUE = 0; DIS_VALUE = 0;
CHECK_Value = 1;
}
else
{
CHECK_Value = 0;
}
} }
// TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR); // TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
} }
...@@ -4473,27 +4484,42 @@ void Display_Send_Vspead(uint8_t menu) ...@@ -4473,27 +4484,42 @@ void Display_Send_Vspead(uint8_t menu)
{ {
if(DIS_VALUE == 1) if(DIS_VALUE == 1)
{ {
CHECK_Value = 1; if(DIS_AD == 1)
{
DIS_VALUE = 0; DIS_VALUE = 0;
CHECK_Value = 1;
}
else
{
CHECK_Value = 0;
}
} }
// TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR); // TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
} }
break; break;
case 3: case 3:
if(LOGOTY_AD == 1) if(CHECK_Ctrl_delay >= 30)
{ {
CHECK_Value = 1; CHECK_Value = 1;
}
if(LOGOTY_AD == 1)
{
// CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_13_Word0X51_Y261); TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_13_Word0X51_Y261);
} }
else else
{ {
CHECK_Value = 1; // CHECK_Value = 1;
TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR); TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
} }
break; break;
case 4: case 4:
if(CHECK_Ctrl_delay >= 30)
{
CHECK_Value = 1; CHECK_Value = 1;
}
break; break;
case 5: case 5:
ZXSW_Voltage = ADC_Read_Signal(ADC_CH_ZXSW_VOLTAGE); ZXSW_Voltage = ADC_Read_Signal(ADC_CH_ZXSW_VOLTAGE);
......
...@@ -20,8 +20,13 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) ...@@ -20,8 +20,13 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
void Key_Operation_SW4(Key_Event_en_t enKeyEvent) void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if ( MENU_CHECK_STEP != 0 )
{ {
MENU_CHECK_STEP_SUB(); MENU_CHECK_STEP_SUB();
CHECK_Ctrl_delay = 0;
CHECK_Value = 0;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
......
...@@ -324,7 +324,7 @@ uint8_t flashtime = 0; ...@@ -324,7 +324,7 @@ uint8_t flashtime = 0;
uint8_t showtime = 0; uint8_t showtime = 0;
uint8_t ACCONOFF_delay_3s; uint8_t ACCONOFF_delay_3s;
uint16_t ONE_KEY_ONOFF; uint16_t ONE_KEY_ONOFF;
uint16_t CHECK_Ctrl_delay = 200; uint16_t CHECK_Ctrl_delay = 0;
void Sys_Run_Mode_100ms_Tasks_Group(void) void Sys_Run_Mode_100ms_Tasks_Group(void)
{ {
// static uint32_t loc_timer = 0; // static uint32_t loc_timer = 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