Commit 307d6b49 authored by 何锐's avatar 何锐

feat:增加前5步下点上电以及上电切换按钮

parent 00fd6ffb
...@@ -285,8 +285,8 @@ void can_submit(void) ...@@ -285,8 +285,8 @@ void can_submit(void)
// uint8_t data7[8] = {0, 0, 0, 0, 0, 0, 0, 0};//0x0C50FFD2 // uint8_t data7[8] = {0, 0, 0, 0, 0, 0, 0, 0};//0x0C50FFD2
// // CAN_Frame_st_t m_msg7; // // CAN_Frame_st_t m_msg7;
// // uint8_t data7[8] = {0, 0, 0, 0, 0, 0, 0, 0}; // // uint8_t data7[8] = {0, 0, 0, 0, 0, 0, 0, 0};
POWER_CTRL_KL30 = 1u; //B+ // POWER_CTRL_KL30 = 1u; //B+
POWER_CTRL_KL15 = 1u; //KL15 // POWER_CTRL_KL15 = 1u; //KL15
if((MENU_CHECK_STEP != 6) && (MENU_CHECK_STEP != 10) && (MENU_CHECK_STEP != 11)) if((MENU_CHECK_STEP != 6) && (MENU_CHECK_STEP != 10) && (MENU_CHECK_STEP != 11))
{ {
/* ABS故障指示灯 */ /* ABS故障指示灯 */
......
...@@ -72,6 +72,7 @@ extern Key_Real_Status_en_t enKeyLeftRealStatus; ...@@ -72,6 +72,7 @@ extern Key_Real_Status_en_t enKeyLeftRealStatus;
extern Key_Real_Status_en_t enKeyRightRealStatus; extern Key_Real_Status_en_t enKeyRightRealStatus;
/*------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------*/
extern uint8_t IG_OFF_Flag;
extern void Key_Init(void); extern void Key_Init(void);
extern void Key_Service(void); /*10ms*/ extern void Key_Service(void); /*10ms*/
......
...@@ -93,7 +93,14 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent) ...@@ -93,7 +93,14 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(POWER_CTRL_KL15)
{
POWER_CTRL_KL15 = 0;
}
else
{
POWER_CTRL_KL15 = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
...@@ -122,12 +129,17 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent) ...@@ -122,12 +129,17 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
{ {
} }
} }
uint8_t IG_OFF_Flag;
void Key_Operation_SW2(Key_Event_en_t enKeyEvent) void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{ {
/*清零ODO*/ /*清零ODO*/
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
MENU_CHECK_STEP_ADD( ); MENU_CHECK_STEP_ADD( );
if((MENU_CHECK_STEP < 6) && (MENU_CHECK_STEP > 0))
{
IG_OFF_Flag = 1;
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
......
...@@ -209,6 +209,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void) ...@@ -209,6 +209,7 @@ void Sys_Run_Mode_50ms_Tasks_Group(void)
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
uint16_t u16LJSText; uint16_t u16LJSText;
uint8_t time300ms; uint8_t time300ms;
uint8_t delay_time;
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;
...@@ -236,6 +237,21 @@ void Sys_Run_Mode_100ms_Tasks_Group(void) ...@@ -236,6 +237,21 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Buzzer_Start(); Buzzer_Start();
Total_Check( ); Total_Check( );
//u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH; //u16LJSText = TFT_LCD_REQ_FIFO_MAX_DEPTH;
if(IG_OFF_Flag)
{
if(delay_time < 5)
{
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