Commit 88c1e982 authored by 何锐's avatar 何锐

feat:增加前五步自动上下电

parent 4c1c007a
......@@ -72,6 +72,7 @@ extern Key_Real_Status_en_t enKeyLeftRealStatus;
extern Key_Real_Status_en_t enKeyRightRealStatus;
/*------------------------------------------------------------------------------------*/
extern uint8_t IG_OFF_Flag;
extern void Key_Init(void);
extern void Key_Service(void); /*10ms*/
......
......@@ -121,20 +121,12 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{
}
}
uint8_t IG_OFF_Flag;
void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
/*清零ODO*/
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
// MENU_CHECK_STEP_ADD( );
// if(MENU_CHECK_STEP >= 16)
// {
// MENU_CHECK_STEP = 0;
// }
// else
// {
// MENU_CHECK_STEP++;
// }
if(MENU_CHECK_STEP == 0)
{
......@@ -148,6 +140,11 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
MENU_CHECK_STEP++;
}
if((MENU_CHECK_STEP < 6) && (MENU_CHECK_STEP > 0))
{
IG_OFF_Flag = 1;
}
}
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
......
......@@ -171,6 +171,22 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Buzzer_Start();
Total_Check( );
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
if(IG_OFF_Flag)
{
if(delay_time < 10)
{
POWER_CTRL_KL15 = 0u; //KL15
delay_time++;
}
else
{
delay_time = 0;
IG_OFF_Flag = 0;
POWER_CTRL_KL15 = 1u; //KL15
}
}
}
/*=================================================================*/
......
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