Commit 6550d451 authored by 李梓源's avatar 李梓源

feat:上电所有灯全亮,每步完成之后才能切换下一步

parent 69310be1
......@@ -595,17 +595,27 @@ void Function_Check_Ctrl(uint32_t cmd)
RELAY_VBAT_MCU = 1;
RELAY_DC12V_MCU = 1;
RELAY_KEY_MCU = 1;
// Aima_SLF(1u, 0x04, 0x1, 1u);
Aima_SLF(1u, 0x03, 0x1, 1u);
break;
}
case 1:
{
RELAY_VBAT_MCU = 1;
RELAY_DC12V_MCU = 1;
RELAY_KEY_MCU = 0;
{
if(CHECK_Ctrl_delay <=10)
{
RELAY_VBAT_MCU = 0;
RELAY_DC12V_MCU = 0;
RELAY_KEY_MCU = 0;
}
else
{
RELAY_VBAT_MCU = 1;
RELAY_DC12V_MCU = 1;
RELAY_KEY_MCU = 0;
}
// ABC_OUT = 1;
left_turn = 0;
......
......@@ -4409,7 +4409,8 @@ void Display_Send_ODO(uint8_t fuel)
}
uint8_t CHECK_Value = 1;
uint8_t DIS_VALUE = 0;
void Display_Send_Vspead(uint8_t menu)
{
uint8_t fuel_val = 0;
......@@ -4431,22 +4432,38 @@ void Display_Send_Vspead(uint8_t menu)
if(DIS_AD == 0)
{
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_09_Word0X51_Y261);
DIS_VALUE = 1;
}
else
{
if(DIS_VALUE == 1)
{
CHECK_Value = 1;
DIS_VALUE = 0;
}
// TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
}
break;
case 2:
if(CHECK_Ctrl_delay >= 100)
{
CHECK_Value = 1;
}
else
{
CHECK_Value = 0;
}
break;
case 3:
case 3:
CHECK_Value = 1;
break;
case 4:
case 4:
CHECK_Value = 1;
break;
case 5:
if(ZXSW_AD == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_11_Word0X51_Y261);
}
else
......@@ -4457,6 +4474,7 @@ void Display_Send_Vspead(uint8_t menu)
case 6:
if(ZXSW_AD == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_11_Word0X51_Y261);
}
else
......@@ -4467,6 +4485,7 @@ void Display_Send_Vspead(uint8_t menu)
case 7:
if(Light_control_headlights == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_06_Word0X51_Y261);
}
else
......@@ -4478,16 +4497,23 @@ void Display_Send_Vspead(uint8_t menu)
case 8:
if(DIS_AD == 0)
{
DIS_VALUE = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_10_Word0X51_Y261);
}
else
{
if(DIS_VALUE == 1)
{
CHECK_Value = 1;
DIS_VALUE = 0;
}
// TFT_LCD_Draw_Box(0, 261, 239, 319, TFT_LCD_FILL_FULL, TFT_LCD_TYPE_CLR);
}
break;
case 9:
if(ZYS_A == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_08_Word0X51_Y261);
}
else
......@@ -4496,6 +4522,7 @@ void Display_Send_Vspead(uint8_t menu)
}
if(ZYS_B == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,200,( uint8_t * )gImage_gImage_ABSX6_Y165);
}
else
......@@ -4514,6 +4541,7 @@ void Display_Send_Vspead(uint8_t menu)
}
if(LOGOTY_AD == 1)
{
CHECK_Value = 1;
TFT_LCD_Draw_Bmp(51,261,( uint8_t * )gImage_Alarm_13_Word0X51_Y261);
}
else
......
......@@ -97,4 +97,6 @@ extern uint32_t loc_Current_0;
extern void Get_static_Current(void);
extern const uint8_t *Num_15[];
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
extern uint8_t CHECK_Value;
#endif
......@@ -9,11 +9,11 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS && CHECK_Ctrl_delay >= 200)
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS && CHECK_Value == 1)
{
MENU_CHECK_STEP_ADD( );
CHECK_Ctrl_delay = 0;
Check_Flag = 1;
CHECK_Value = 0;
}
}
}
......
......@@ -325,7 +325,6 @@ uint8_t showtime = 0;
uint8_t ACCONOFF_delay_3s;
uint16_t ONE_KEY_ONOFF;
uint16_t CHECK_Ctrl_delay = 200;
uint8_t Check_Flag;
void Sys_Run_Mode_100ms_Tasks_Group(void)
{
// static uint32_t loc_timer = 0;
......@@ -338,17 +337,11 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
// }
Display_PageNum();
if(Check_Flag == 1)
{
if(CHECK_Ctrl_delay < 200)
{
CHECK_Ctrl_delay++;
}
else
{
Check_Flag = 0;
}
}
if(MENU_CHECK_STEP == 9 )
......
......@@ -12,7 +12,6 @@ extern uint32_t startIGONtime;
extern uint8_t ACCONOFF_delay_3s;
extern uint16_t ONE_KEY_ONOFF;
extern uint16_t CHECK_Ctrl_delay;
extern uint8_t Check_Flag;
void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void);
void Sys_Run_Mode_2ms_Tasks_Group(void);
void Sys_Run_Mode_5ms_Tasks_Group(void);
......
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