Commit 3363934b authored by 何锐's avatar 何锐

feat:增加轮动重上电

parent a5d58adb
......@@ -540,6 +540,30 @@ void Read_IPK_Session_Type(void)//请求仪表发送 软硬件版本号 等数
}
}
}
//重上大电
uint8_t resettime30;
void KL30_reset(void)
{
if(MENU_CHECK_STEP == 2)
{
if((resettime30 <= 10) && (delayflash == 0))
{
resettime30++;
RELAY_VBAT_MCU = 0;
}
else
{
resettime30 = 0;
delayflash = 1;
RELAY_VBAT_MCU = 1;
}
}
else
{
resettime30 = 0;
delayflash = 0;
}
}
uint8_t settingtime;
void DefenseModeSettings(void) //设防模式设置
......@@ -568,9 +592,10 @@ void DefenseModeSettings(void) //设防模式设置
}
uint8_t RotationSettime;
uint8_t delayflash;
void RotationSet(void)
{
if(MENU_CHECK_STEP == 2)
if((MENU_CHECK_STEP == 2) && (delayflash == 1))
{
RotationAlarmMode = 1;
if(RotationSettime <= 10)
......@@ -601,7 +626,6 @@ void Function_Check_Ctrl(uint32_t cmd)
uint32_t j;
static uint32_t status = 0;
static uint32_t MENU_BACK = 0xff;
static uint8_t UDS_EunD = 0;
if ( cmd == 0 )
{
......
......@@ -16,7 +16,7 @@ uint8_t Get_DID_High_Byte(uint16_t Input_DID);
uint8_t Get_DID_Low_Byte(uint16_t Input_DID);
extern void DefenseModeSettings(void);
extern void RotationSet(void);
extern void KL30_reset(void);
extern unsigned char InterNal_Version [ 128 ];
extern unsigned char SW_Version [ 128 ];
......@@ -45,7 +45,7 @@ extern unsigned char KEYBUFFER [ 4 ];
extern unsigned int CAN_Msg_Tx_Enable;
extern uint8_t loc_Type_back;
extern uint8_t LED_Waring ;
extern uint8_t delayflash;
void SET_IPK_NONE(void);
void Clear_IPK_NONE(void);
void CHECK_IPK_COUNT(void);
......
......@@ -362,6 +362,7 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
BCDD_MCU_Service();
KeyBackServic();
RotationSet();
KL30_reset();
// DefenseModeSettings();
if(CHECK_Ctrl_delay < 200)
{
......
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