Commit c475457e authored by hu's avatar hu

增加过压保护处理

parent 970de49c
...@@ -1737,7 +1737,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Enter(void) ...@@ -1737,7 +1737,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Enter(void)
} }
else else
{ {
if ((Key_R >= (5300 - 400)) && (Key_R <= (5300 + 400))) if ((Key_R >= (4800 - 400)) && (Key_R <= (5300 + 400)))
{ {
enKeyRealStatus = KEY_LINE_PRESS; enKeyRealStatus = KEY_LINE_PRESS;
} }
...@@ -1763,7 +1763,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Return(void) ...@@ -1763,7 +1763,7 @@ Key_Real_Status_en_t Key_Real_Status_Read_Return(void)
} }
else else
{ {
if ((Key_R >= (8900 - 400)) && (Key_R <= (8900 + 400))) if ((Key_R >= (7800 - 400)) && (Key_R <= (8900 + 400)))
{ {
enKeyRealStatus = KEY_LINE_PRESS; enKeyRealStatus = KEY_LINE_PRESS;
} }
......
...@@ -54,14 +54,14 @@ ...@@ -54,14 +54,14 @@
#include "DoCAN_ISO15765.h" #include "DoCAN_ISO15765.h"
#include "UDS_ISO14229_Server.h" #include "UDS_ISO14229_Server.h"
#include "Analog_Signals.h" #include "Analog_Signals.h"
#include "BGLInterface.h"
#include "BU98R10.h"
#define POWER_NM_SLEEP 0U #define POWER_NM_SLEEP 0U
#define POWER_NM_WAKEUP 1U #define POWER_NM_WAKEUP 1U
static uint8_t PowerGetNMStatus(void); static uint8_t PowerGetNMStatus(void);
extern void SEG_LCD_Window_Switch(uint8_t Sw);
Power_Status_t Power_KL30_Init ( void ) Power_Status_t Power_KL30_Init ( void )
{ {
...@@ -155,6 +155,7 @@ void Power_Sleep_Init(void) ...@@ -155,6 +155,7 @@ void Power_Sleep_Init(void)
TimerB_PWM_Channel_Sleep(TIMERB_2_CH1); TimerB_PWM_Channel_Sleep(TIMERB_2_CH1);
TimerB_PWM_Channel_Sleep(TIMERB_2_CH7); TimerB_PWM_Channel_Sleep(TIMERB_2_CH7);
TimerB_PWM_Channel_Sleep(TIMERB_1_CH15); TimerB_PWM_Channel_Sleep(TIMERB_1_CH15);
TimerB_PWM_Channel_Sleep(TIMERB_0_CH7);
VCC12V0_OUT_EN = 0u; /*12V 电源使能*/ VCC12V0_OUT_EN = 0u; /*12V 电源使能*/
VCC05V0_OUT_EN = 0u; /*外设5V 电源使能*/ VCC05V0_OUT_EN = 0u; /*外设5V 电源使能*/
...@@ -346,8 +347,12 @@ Power_Status_t Power_Stay_Protect(void) ...@@ -346,8 +347,12 @@ Power_Status_t Power_Stay_Protect(void)
Power_Status_t u8PowerSts = m_IGN_OFF_Init; Power_Status_t u8PowerSts = m_IGN_OFF_Init;
uint32_t Delaycnt = 0; uint32_t Delaycnt = 0;
/*关应用 123……*/ /*关应用关闭了段码,所有背光,CAN 屏幕显示没有关闭 123……*/
Seg_Display_OFF();
BackLightSchedu(0, 0);
SEG_LCD_Window_Switch(0);
BU98R10_Shutdown();
Line_In_KL15_OFF_Init();
for (;;) for (;;)
{ {
...@@ -362,6 +367,9 @@ Power_Status_t Power_Stay_Protect(void) ...@@ -362,6 +367,9 @@ Power_Status_t Power_Stay_Protect(void)
UDS_10ms_Service( ); UDS_10ms_Service( );
Analog_Signal_Conv_Service(); Analog_Signal_Conv_Service();
Sys_Status_Update_Service( ); Sys_Status_Update_Service( );
Seg_Buffer_Commit();
Delaycnt++; Delaycnt++;
if ( Delaycnt >= 5u ) if ( Delaycnt >= 5u )
{ {
...@@ -374,7 +382,10 @@ Power_Status_t Power_Stay_Protect(void) ...@@ -374,7 +382,10 @@ Power_Status_t Power_Stay_Protect(void)
if ( SYS_OPR_STAT_RUN ) if ( SYS_OPR_STAT_RUN )
{ {
CAN_TX_SetEnable(0x55); CAN_TX_SetEnable(0x55);
/*初始化需要*/ CD4051B_KL15Init();
Line_In_KL15_ON_Init();
SEG_BUFF_Init();
BU98R10_Init();
return u8PowerSts; return u8PowerSts;
} }
......
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