Commit c90b5f92 authored by hu's avatar hu

交样版本

parent 23358ddc
......@@ -42,9 +42,17 @@ uint8_t BackLightTestIG = 1u;
uint8_t BackLightWakeFlag = 0u;
uint8_t BackLightTPostLight = 0u;
uint16_t testBG = 500;
uint16_t BackLightOFF_TIME = 0u;
/*-------------------------------------------------------------------------
* Function Name : BL_Management_service
* Description : 100ms任务
* Input : None
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
void BL_Management_service(void)
{
uint8_t Msg;
uint8_t LED_Pos;
uint8_t LED_Left;
......@@ -68,10 +76,22 @@ void BL_Management_service(void)
if (Common_Get_IG_Sts() == COMMON_POWER_OFF)
{
BackLightWakeFlag = 1u;
if (BackLightOFF_TIME < 150u)
{
BackLightOFF_TIME++;
BackLightWakeFlag = 1u;
SEG_LCD_Window_Switch(1);
}
else
{
BackLightWakeFlag = 0u;
SEG_LCD_Window_Switch(0);
}
}
else
{
BackLightOFF_TIME = 0u;
BackLightWakeFlag = 0u;
SEG_LCD_Window_Switch(1);
}
......@@ -103,6 +123,7 @@ void SEG_LCD_Init(void)
SEGLCDBackup.Window = 0x00;
SEG0_MCU_OUT = 0;
COMM_MCU_OUT = 0;
BackLightOFF_TIME = 0u;
}
void SEG_LCD_Window_Switch(uint8_t Sw)
......@@ -124,7 +145,14 @@ void SEG_LCD_Window_Switch(uint8_t Sw)
}
}
// 10ms
/*-------------------------------------------------------------------------
* Function Name : SEG_LCD_Window_Control_Service
* Description : 10ms任务 窗口翻转
* Input : None
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
void SEG_LCD_Window_Control_Service(void)
{
if (SEGLCDBackup.Window)
......
......@@ -18,7 +18,7 @@
#include "Line_in.h"
static uint8_t User_BCM_Flag ;
static uint8_t User_BCM_Flag;
/*---------------------------------------------------------------------------
使用しない Byte、bit に関しては全て 1(B)をセットして出力すること
......@@ -135,7 +135,7 @@ void Can_Set_Buff_18FF3E17(uint8_t CopyData[])
uint8_t TURN_L_Lamp_Status = 0u;
uint8_t DstWarnVolume_Set = 0u;
CopyData[0] = (uint8_t)((Pulse_Correction_Facor) & 0xFFu); /* 1 */
CopyData[0] = (uint8_t)((Pulse_Correction_Facor)&0xFFu); /* 1 */
CopyData[1] = (uint8_t)((Pulse_Correction_Facor >> 8u) & 0xFFu); /* 2 */
CopyData[2] = (uint8_t)(((SW_PTO << 7u) & 0x80u) |
((AEBS_ON_OFF_Info << 4u) & 0x30u) |
......@@ -603,39 +603,41 @@ void Can_Set_Buff_18EF1817(uint8_t CopyData[])
{
uint8_t Trip_Type = 0u;
if (State_Flag.FState_ClearOilTx == 0x01u)
if (State_Flag.FState_ClearOilTx == 0x02u)
{
if (Trip_Type == TRAPA)
{
CopyData[0] = 0x40;
CopyData[1] = 0x50;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x40;
CopyData[1] = 0x50;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
}
else if (Trip_Type == TRAPB)
{
CopyData[0] = 0x40;
CopyData[1] = 0x60;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x40;
CopyData[1] = 0x60;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
}
User_BCM_Flag = 1u;/*从头轮询*/
User_BCM_Flag = 1u; /*从头轮询*/
State_Flag.FState_ClearOilTx = 0x00u;
State_Flag.FState_ClearOilRx = 0u;
State_Flag.FState_COilTimeOut = 0u;
}
else
{
if ((State_Flag.FState_ClearOilRx == 0u) && (State_Flag.FState_COilTimeOut != FState_COilTimeOutNum))
{
return ;
return;
}
User_BCM_Flag++;
......@@ -647,114 +649,114 @@ void Can_Set_Buff_18EF1817(uint8_t CopyData[])
switch (User_BCM_Flag)
{
case 1:
CopyData[0] = 0x01;
CopyData[1] = 0x50;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x50;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 2:
CopyData[0] = 0x01;
CopyData[1] = 0x51;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x51;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 3:
CopyData[0] = 0x01;
CopyData[1] = 0x52;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x52;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 4:
CopyData[0] = 0x01;
CopyData[1] = 0x53;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x53;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 5:
CopyData[0] = 0x01;
CopyData[1] = 0x54;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x54;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 6:
CopyData[0] = 0x01;
CopyData[1] = 0x60;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x60;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 7:
CopyData[0] = 0x01;
CopyData[1] = 0x61;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x61;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 8:
CopyData[0] = 0x01;
CopyData[1] = 0x62;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x62;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 9:
CopyData[0] = 0x01;
CopyData[1] = 0x63;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x63;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 10:
CopyData[0] = 0x01;
CopyData[1] = 0x64;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x64;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
case 11:
CopyData[0] = 0x01;
CopyData[1] = 0x22;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
CopyData[0] = 0x01;
CopyData[1] = 0x22;
CopyData[2] = 0x00;
CopyData[3] = 0x00;
CopyData[4] = 0x00;
CopyData[5] = 0x00;
CopyData[6] = 0xFF;
CopyData[7] = 0xFF;
break;
default:
break;
......@@ -762,11 +764,14 @@ void Can_Set_Buff_18EF1817(uint8_t CopyData[])
}
}
void Id18ef1817_Send_Service(void)
void Id18EF1817_Send_Service(void)
{
if (State_Flag.FState_COilTimeOut == 1u)
/*准备事件型*/
if (State_Flag.FState_ClearOilTx == 1u)
{
Can_Msg_Tx_Overwrite(MSGID_18EF1817, 1u, 100 * 1000);
/*事件型复制*/
State_Flag.FState_ClearOilTx = 2u;
}
else
{
......
......@@ -5,49 +5,48 @@
typedef struct
{
uint32_t TripA_Fuel ;
uint32_t TripA_Average_Speed ;
uint32_t TripA_Fuel_Consume ;
uint32_t TripA_Idling ;
uint32_t TripA_Runing ;
uint32_t TripB_Fuel ;
uint32_t TripB_Average_Speed ;
uint32_t TripB_Fuel_Consume ;
uint32_t TripB_Idling ;
uint32_t TripB_Runing ;
uint32_t Engine_Surplus ;
uint32_t TripA_Fuel;
uint32_t TripA_Average_Speed;
uint32_t TripA_Fuel_Consume;
uint32_t TripA_Idling;
uint32_t TripA_Runing;
uint32_t TripB_Fuel;
uint32_t TripB_Average_Speed;
uint32_t TripB_Fuel_Consume;
uint32_t TripB_Idling;
uint32_t TripB_Runing;
uint32_t Engine_Surplus;
} USER_ECU;
extern USER_ECU User_ECU;
extern USER_ECU User_ECU;
extern void Can_Set_Buff_18FEAE17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FEAE17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FF3E17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FF3E17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FED917(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FED917(uint8_t CopyData[]);
extern void Can_Set_Buff_18FEE617(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FEE617(uint8_t CopyData[]);
extern void Can_Set_Buff_18EF1817(uint8_t CopyData []) ;
extern void Can_Set_Buff_18EF1817(uint8_t CopyData[]);
extern void Can_Set_Buff_18FEE017(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FEE017(uint8_t CopyData[]);
extern void Can_Set_Buff_18FEFC17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FEFC17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FF2517(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FF2517(uint8_t CopyData[]);
extern void Can_Set_Buff_18FF2A17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FF2A17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FF9D17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FF9D17(uint8_t CopyData[]);
extern void Can_Set_Buff_18FFE517(uint8_t CopyData []) ;
extern void Can_Set_Buff_18FFE517(uint8_t CopyData[]);
extern void Can_Set_Buff_18EF2D17(uint8_t CopyData []) ;
extern void Can_Set_Buff_18EF2D17(uint8_t CopyData[]);
extern void Can_Set_Buff_18033317(uint8_t CopyData []) ;
extern void Can_Set_Buff_180433A2(uint8_t CopyData []) ;
extern void Can_Set_Buff_18033317(uint8_t CopyData[]);
extern void Can_Set_Buff_180433A2(uint8_t CopyData[]);
void Drive_Info_IC1_STATUS_Rx(void);
......@@ -56,4 +55,6 @@ uint32_t Common_Data_Get_TripA_Average_Speed(void);
uint32_t Common_Data_Get_TripB_Fuel(void);
uint32_t Common_Data_Get_TripB_Average_Speed(void);
void Id18EF1817_Send_Service(void);
#endif
\ No newline at end of file
......@@ -14,6 +14,10 @@
#define FState_COilTimeOutNum 60u /*3S*/
#define SystemSupplierECUHardwareVersionNumberApp ((uint16_t)(10000)) /*硬件版本号01.00.00*/
#define SystemSupplierECUSoftwareInformationApp ((uint16_t)(10100)) /*软件版本号01.01.00*/
#define systemSupplierECUFlashInformationApp ((uint16_t)(8)) /*FLASH版本号FV00.08*/
typedef struct
{
uint8_t FState_GZM; /*故障码*/
......@@ -73,7 +77,7 @@ typedef struct
uint8_t FState_ClearOilTx;
uint8_t FState_ClearOilRx;
uint8_t FState_COilTimeOut;
uint16_t FState_COilTimeOut;
} _Display_State_Flag;
......
......@@ -125,6 +125,7 @@ void Sys_Run_Mode_2ms_Tasks(void)
void Sys_Run_Mode_5ms_Tasks(void)
{
COM_RX_Process();
Id18EF1817_Send_Service();
Flash_Sync_Signal_Generation_Service();
}
......
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