Commit 23358ddc authored by hu's avatar hu

调整格式

parent cf97886e
...@@ -24,7 +24,6 @@ void SetBackLightOutput(uint8_t n, uint16_t val) ...@@ -24,7 +24,6 @@ void SetBackLightOutput(uint8_t n, uint16_t val)
void SetBacklightDestVal(uint8_t n, const uint16_t val) void SetBacklightDestVal(uint8_t n, const uint16_t val)
{ {
BackLightPara[n].DestBackLightDuty = val; BackLightPara[n].DestBackLightDuty = val;
} }
......
...@@ -14,198 +14,105 @@ ...@@ -14,198 +14,105 @@
typedef struct typedef struct
{ {
uint8_t Brightness; uint8_t Brightness;
uint8_t Window; uint8_t Window;
} SEGLCDBackupStruct; } SEGLCDBackupStruct;
typedef struct typedef struct
{ {
uint8_t DoorStatusBackup; uint8_t DoorStatusBackup;
uint16_t Timer; uint16_t Timer;
uint16_t BackupPwm; uint16_t BackupPwm;
} BlOFFCtrlStruct; } BlOFFCtrlStruct;
BlOFFCtrlStruct BlOFFCtrl;
SEGLCDBackupStruct SEGLCDBackup;
BlOFFCtrlStruct BlOFFCtrl; uint8_t WARNING_DOOR_STATUS;
SEGLCDBackupStruct SEGLCDBackup;
uint8_t WARNING_DOOR_STATUS ;
uint32_t Left_Right_Delay; uint32_t Left_Right_Delay;
void SEG_LCD_Window_Switch(uint8_t Sw);
void SEG_LCD_Window_Switch ( uint8_t Sw ); void BL_Init(void)
void BL_Init ( void )
{ {
SEG_LCD_Init(); SEG_LCD_Init();
} }
uint16_t BackLightVLv = 10u; uint16_t BackLightVLv = 10u;
uint8_t BackLightTestIG = 1u; uint8_t BackLightTestIG = 1u;
uint8_t BackLightWakeFlag = 0u; uint8_t BackLightWakeFlag = 0u;
uint8_t BackLightTPostLight = 0u; uint8_t BackLightTPostLight = 0u;
uint16_t testBG = 500 ; uint16_t testBG = 500;
void BL_Management_service ( void ) void BL_Management_service(void)
{ {
uint8_t Msg; uint8_t Msg;
uint8_t LED_Pos; uint8_t LED_Pos;
uint8_t LED_Left; uint8_t LED_Left;
uint8_t LED_Right; uint8_t LED_Right;
uint8_t LED_Plus; uint8_t LED_Plus;
uint8_t WARNING_PARKING_BRAKE_TEL = 0u; uint8_t WARNING_PARKING_BRAKE_TEL = 0u;
uint8_t BCM_PositionLight = 0; uint8_t BCM_PositionLight = 0;
uint8_t DutyCycle; uint8_t DutyCycle;
uint8_t ILL = 0 ; uint8_t ILL = 0;
if (Line_In_Get_Status(LINE_IN_ILLUMINATION) ) if (Line_In_Get_Status(LINE_IN_ILLUMINATION))
{ {
ILL = 2 ; ILL = 2;
} }
else else
{ {
ILL = 0 ; ILL = 0;
} }
if ( Common_Get_IG_Sts() == COMMON_POWER_OFF ) if (Common_Get_IG_Sts() == COMMON_POWER_OFF)
{ {
BackLightWakeFlag = 1u;
#if 0
LED_Pos = Get_ID_245_Sig_BCM_PosiLightSts();
LED_Left = Get_ID_245_Sig_BCM_TurnLightSts_L();
LED_Right = Get_ID_245_Sig_BCM_TurnLightSts_R();
LED_Plus = LED_Left + LED_Right ;
if (LED_Plus != 0u)
{
Left_Right_Delay = 0u;
WARNING_PARKING_BRAKE_TEL = LED_Left + LED_Right;
}
else
{
if (Left_Right_Delay <= 500ul)
{
Left_Right_Delay++;
}
if (Left_Right_Delay >= 15)
{
WARNING_PARKING_BRAKE_TEL = LED_Left + LED_Right;
}
else
{
WARNING_PARKING_BRAKE_TEL = 1;
}
}
if (( Get_Current_DispType() == Disp_Alarm ) || (WARNING_PARKING_BRAKE_TEL != 0) || (LED_Pos != 0))
{
Msg = Popup_Get_Current_Message();
//if (( Msg != POPUP_MSG_DOOR_OPEN_LOW_SPEED ) || (WARNING_PARKING_BRAKE_TEL != 0))
// BlOFFCtrl.Timer = 0;
//else
//{
// if ( ( WARNING_DOOR_STATUS != 0 ) && ( WARNING_DOOR_STATUS != BlOFFCtrl.DoorStatusBackup ) )
// BlOFFCtrl.Timer = 0;
// else
// {
// if ( BlOFFCtrl.Timer < 30 * 50 )
// BlOFFCtrl.Timer++;
// }
// BlOFFCtrl.DoorStatusBackup = WARNING_DOOR_STATUS;
//}
if ( BlOFFCtrl.Timer < 30 * 50 )
{
SEG_LCD_Window_Switch ( 1 );
BackLightWakeFlag = 1u;
}
else
{
SEG_LCD_Window_Switch ( 0 );
BackLightWakeFlag = 0u;
}
}
else
{
BlOFFCtrl.Timer = 0;
SEG_LCD_Window_Switch ( 0 );
BackLightWakeFlag = 0u;
}
#endif
} }
else else
{ {
//if ( BCM_PositionLight ) BackLightWakeFlag = 0u;
//{ SEG_LCD_Window_Switch(1);
// RTE_PWM_Set_Panel ( 47, 42, 43 );
// RTE_PWM_Set_LCD ( DutyCycle );
// RTE_PWM_Set_Point ( DutyCycle );
//}
//else
//{
// RTE_PWM_Set_Panel ( 95, 85, 86 );
// RTE_PWM_Set_LCD ( DutyCycle ); //LCD_BL = 1;
// RTE_PWM_Set_Point ( DutyCycle ); //LCD_BL = 1;
//}
SEG_LCD_Window_Switch ( 1 );
} }
/*得到主题模式可自己在枚举中定义 在BackGroundLight.c里填表*/ /*得到主题模式可自己在枚举中定义 在BackGroundLight.c里填表*/
GetBGLTheme(0); GetBGLTheme(0);
/*得到工作模式 白天 傍晚 夜晚 在枚举中已定义*/
/*得到工作模式 白天 傍晚 夜晚 在枚举中已定义*/
GetBGLType(ILL); GetBGLType(ILL);
//GetBGLType(0); // GetBGLType(0);
/*得到背光等级 可自己在枚举中定义 在BackGroundLight.c里填表*/ /*得到背光等级 可自己在枚举中定义 在BackGroundLight.c里填表*/
GetBGLLvl(BackLightVLv, LED_Pos); GetBGLLvl(BackLightVLv, LED_Pos);
/*得到热敏电阻电压参数为100倍电压值*/
/*得到热敏电阻电压参数为100倍电压值*/
GetBGLNTCVol(0); GetBGLNTCVol(0);
/*主函数中调用第一个参数电源状态 1是 ON档 2 off 第二个参数 唤醒条件 1是TTF唤醒 2 是表盘唤醒 3 是表盘和屏都有唤醒,0无唤醒*/
if (Common_Get_IG_Sts() == COMMON_POWER_ON)
{
BackLightWakeFlag = 0u;
}
else
{
BackLightWakeFlag = 1u;
}
/*主函数中调用第一个参数电源状态 1是 ON档 2 off 第二个参数 唤醒条件 1是TTF唤醒 2 是表盘唤醒 3 是表盘和屏都有唤醒,0无唤醒*/
BackLightSchedu(Common_Get_IG_Sts(), BackLightWakeFlag); BackLightSchedu(Common_Get_IG_Sts(), BackLightWakeFlag);
} }
void BL_PWM_Duty_Cycle_Capture_ISR ( void ) void BL_PWM_Duty_Cycle_Capture_ISR(void)
{ {
} }
void SEG_LCD_Init ( void )
void SEG_LCD_Init(void)
{ {
SEGLCDBackup.Brightness = 0xFF; SEGLCDBackup.Brightness = 0xFF;
SEGLCDBackup.Window = 0x00; SEGLCDBackup.Window = 0x00;
SEG0_MCU_OUT = 0; SEG0_MCU_OUT = 0;
COMM_MCU_OUT = 0; COMM_MCU_OUT = 0;
} }
void SEG_LCD_Window_Switch ( uint8_t Sw ) void SEG_LCD_Window_Switch(uint8_t Sw)
{ {
if ( Sw == SEGLCDBackup.Window ) if (Sw == SEGLCDBackup.Window)
return; return;
SEGLCDBackup.Window = Sw; SEGLCDBackup.Window = Sw;
if ( Sw ) if (Sw)
{ {
SEG0_MCU_OUT = 1; SEG0_MCU_OUT = 1;
COMM_MCU_OUT = 0; COMM_MCU_OUT = 0;
...@@ -217,12 +124,10 @@ void SEG_LCD_Window_Switch ( uint8_t Sw ) ...@@ -217,12 +124,10 @@ void SEG_LCD_Window_Switch ( uint8_t Sw )
} }
} }
// 10ms
//10ms void SEG_LCD_Window_Control_Service(void)
void SEG_LCD_Window_Control_Service ( void )
{ {
if ( SEGLCDBackup.Window ) if (SEGLCDBackup.Window)
{ {
if (SEG0_MCU_OUT == 1) if (SEG0_MCU_OUT == 1)
{ {
......
#ifndef BACK_LIGHT_APP #ifndef BACK_LIGHT_APP
#define BACK_LIGHT_APP #define BACK_LIGHT_APP
void SEG_LCD_Window_Control_Service ( void ); void SEG_LCD_Window_Control_Service(void);
void SEG_LCD_Init ( void );
void BL_Init ( void );
void BL_PWM_Duty_Cycle_Capture_ISR ( void );
void BL_Management_service ( void );
void SEG_LCD_Init(void);
void BL_Init(void);
void BL_PWM_Duty_Cycle_Capture_ISR(void);
void BL_Management_service(void);
#endif #endif
\ No newline at end of file
...@@ -18,7 +18,8 @@ DataStruct DataStrWET; ...@@ -18,7 +18,8 @@ DataStruct DataStrWET;
* onther : Table固化 斜率同时固化 * onther : Table固化 斜率同时固化
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void AirPressure_KL30_Init(void) void AirPressure_KL30_Init(void)
{} {
}
void AirPressure_KL15_ON_Init(void) void AirPressure_KL15_ON_Init(void)
{ {
uint8_t i = 0u; uint8_t i = 0u;
...@@ -56,15 +57,12 @@ void AirPressure_KL15_ON_Init(void) ...@@ -56,15 +57,12 @@ void AirPressure_KL15_ON_Init(void)
} }
void AirPressure_KL15_OFF_Init(void) void AirPressure_KL15_OFF_Init(void)
{ {
} }
void AirPressure_Wakeup_Init(void) void AirPressure_Wakeup_Init(void)
{ {
} }
void AirPressure_Sleep_Init(void) void AirPressure_Sleep_Init(void)
{ {
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* Function Name : AirPressure_Processing_Service * Function Name : AirPressure_Processing_Service
...@@ -417,4 +415,3 @@ uint16_t Common_Get_WET_Data(void) ...@@ -417,4 +415,3 @@ uint16_t Common_Get_WET_Data(void)
{ {
return DataStrWET.DataDisplay; return DataStrWET.DataDisplay;
} }
...@@ -761,7 +761,7 @@ void Popups_Polling(void) ...@@ -761,7 +761,7 @@ void Popups_Polling(void)
/*50.--4--低电压报警 显示条件:发动机启动(350r/min)后,7秒检测到23.5V时 显示消失条件:10秒检测到25V以上时*/ /*50.--4--低电压报警 显示条件:发动机启动(350r/min)后,7秒检测到23.5V时 显示消失条件:10秒检测到25V以上时*/
variable_1 = Common_Get_LOW_VOLTAGE(); variable_1 = Common_Get_LOW_VOLTAGE();
if (( variable_1 == 0x01u) && ( E_Speed > 350)) //23.5V if ((variable_1 == 0x01u) && (E_Speed > 350)) // 23.5V
{ {
Popup_Request(POPUP8_LOWVOLTAGE); Popup_Request(POPUP8_LOWVOLTAGE);
} }
...@@ -773,7 +773,7 @@ void Popups_Polling(void) ...@@ -773,7 +773,7 @@ void Popups_Polling(void)
/*51.--5--过电压报警 显示条件:发动机启动(350r/min)后,7秒检测到30.4V以上时 显示消失条件:10秒检测到29.4V以下时*/ /*51.--5--过电压报警 显示条件:发动机启动(350r/min)后,7秒检测到30.4V以上时 显示消失条件:10秒检测到29.4V以下时*/
variable_1 = Common_Get_HIGH_VOLTAGE(); variable_1 = Common_Get_HIGH_VOLTAGE();
if ((variable_1 == 0x01u) && ( E_Speed > 350)) //30.44V if ((variable_1 == 0x01u) && (E_Speed > 350)) // 30.44V
{ {
Popup_Request(POPUP8_OVERVOLTAGE); Popup_Request(POPUP8_OVERVOLTAGE);
} }
...@@ -874,7 +874,7 @@ void Popups_Polling(void) ...@@ -874,7 +874,7 @@ void Popups_Polling(void)
} }
/*59.--3--省油耗建议-请降低发动机转速*/ /*59.--3--省油耗建议-请降低发动机转速*/
variable_1 = Common_Get_OverSpeed_Status(); variable_1 = Common_Get_OverSpeed_Status();
if ((variable_1 == 1) && (User_App.User_Speed != 0xFF)) if ((variable_1 == 1) && (User_App.User_Speed != 0xFF))
{ {
......
...@@ -578,8 +578,7 @@ void Common_BlockDelay(uint16_t m_MS) ...@@ -578,8 +578,7 @@ void Common_BlockDelay(uint16_t m_MS)
Counter = 65535u - RocBackup + Counter + 1u; Counter = 65535u - RocBackup + Counter + 1u;
} }
} } while (Counter < DIMCounter);
while (Counter < DIMCounter);
} }
uint32_t Common_GetIgnOnTime(void) uint32_t Common_GetIgnOnTime(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