Commit 8f2eb354 authored by 王金山's avatar 王金山

Merge branch 'dev' into 'master'

变更项3:增加AEBS指示灯

See merge request !28
parents 481687c9 e6a39d2e
...@@ -204,7 +204,8 @@ void Drive_Info_Export_Init(void) ...@@ -204,7 +204,8 @@ void Drive_Info_Export_Init(void)
ICM_2_STATUS |= CAN_TX_EN; //���� ICM_2_STATUS |= CAN_TX_EN; //����
ICM_3_STATUS |= CAN_TX_EN; //���� ICM_3_STATUS |= CAN_TX_EN; //����
ICM_4_STATUS |= CAN_TX_EN; //���� ICM_4_STATUS |= CAN_TX_EN; //����
ICM_5_STATUS |= CAN_TX_EN; //����
ICM_6_STATUS |= CAN_TX_EN; //����
} }
/***************************************�ⷢ����**************************************/ /***************************************�ⷢ����**************************************/
static void Drive_Info_IC1_STATUS_Tx(void) static void Drive_Info_IC1_STATUS_Tx(void)
......
...@@ -1389,6 +1389,7 @@ void Telltales_Management(void) ...@@ -1389,6 +1389,7 @@ void Telltales_Management(void)
if (STEPPER_MOTOR_0_CUR_STEP >= 520) if (STEPPER_MOTOR_0_CUR_STEP >= 520)
TelltaleLCD_Flag33 = 0; TelltaleLCD_Flag33 = 0;
} }
#if 0
//锟斤拷锟斤拷锟斤拷锟斤拷 硬锟斤拷 21 //锟斤拷锟斤拷锟斤拷锟斤拷 硬锟斤拷 21
if (LINE_IN_FILT_BLOCK_SIGNAL) if (LINE_IN_FILT_BLOCK_SIGNAL)
{ {
...@@ -1428,7 +1429,7 @@ void Telltales_Management(void) ...@@ -1428,7 +1429,7 @@ void Telltales_Management(void)
FILT_BLOCK_Count = 0; FILT_BLOCK_Count = 0;
TelltaleLCDFlag.Sig.LCD03 = 0; TelltaleLCDFlag.Sig.LCD03 = 0;
} }
#endif
//EBS EBS锟斤拷凭锟斤拷锟 42 //EBS EBS锟斤拷凭锟斤拷锟 42
if (NVM_CONFIG_EBS == 0) //20190808 if (NVM_CONFIG_EBS == 0) //20190808
{ {
...@@ -1610,7 +1611,7 @@ void Telltales_Management(void) ...@@ -1610,7 +1611,7 @@ void Telltales_Management(void)
TelltaleLCDFlag.Sig.LCD09 = 1; TelltaleLCDFlag.Sig.LCD09 = 1;
else else
TelltaleLCDFlag.Sig.LCD09 = 0; TelltaleLCDFlag.Sig.LCD09 = 0;
#if 0
//AEB 锟斤拷 44 //AEB 锟斤拷 44
if (NVM_CONFIG_AEB == 0) if (NVM_CONFIG_AEB == 0)
{ {
...@@ -1657,6 +1658,41 @@ void Telltales_Management(void) ...@@ -1657,6 +1658,41 @@ void Telltales_Management(void)
} }
else else
TelltaleLCDFlag.Sig.LCD10 = 0; TelltaleLCDFlag.Sig.LCD10 = 0;
#endif
if ((AEBS_AdvancedEmergencyBrakingSysState != 0xE) && (AEBS_AdvancedEmergencyBrakingSysState != 0x2))
{
if ((AEBS_CollisionWarningLevel == 0x1) || (AEBS_CollisionWarningLevel == 0x4))
{
Sound_Request(SND_AEB_2Hz, 1);
Sound_Delete(SND_AEB_4Hz);
Sound_Delete(SND_AEB_8Hz);
}
else if ((AEBS_CollisionWarningLevel == 0x2) || (AEBS_CollisionWarningLevel == 0x5))
{
Sound_Request(SND_AEB_4Hz, 1);
Sound_Delete(SND_AEB_2Hz);
Sound_Delete(SND_AEB_8Hz);
}
else if ((AEBS_CollisionWarningLevel == 0x3) || (AEBS_CollisionWarningLevel == 0x6))
{
Sound_Request(SND_AEB_8Hz, 1);
Sound_Delete(SND_AEB_4Hz);
Sound_Delete(SND_AEB_2Hz);
}
else
{
Sound_Delete(SND_AEB_2Hz);
Sound_Delete(SND_AEB_4Hz);
Sound_Delete(SND_AEB_8Hz);
}
}
else
{
Sound_Delete(SND_AEB_2Hz);
Sound_Delete(SND_AEB_4Hz);
Sound_Delete(SND_AEB_8Hz);
}
//小锟斤拷 KL15锟斤拷KL30 48 //小锟斤拷 KL15锟斤拷KL30 48
if (PositionLightSts == 1) if (PositionLightSts == 1)
...@@ -2388,7 +2424,9 @@ void Telltales_Management(void) ...@@ -2388,7 +2424,9 @@ void Telltales_Management(void)
Sound_Delete(SND_PTO); //PTO锟斤拷锟斤拷锟斤拷锟截憋拷 Sound_Delete(SND_PTO); //PTO锟斤拷锟斤拷锟斤拷锟截憋拷
Sound_Delete(SND_LOW_FUEL_SPEED); //燃锟斤拷液位锟酵憋拷锟斤拷锟斤拷锟截憋拷 Sound_Delete(SND_LOW_FUEL_SPEED); //燃锟斤拷液位锟酵憋拷锟斤拷锟斤拷锟截憋拷
Sound_Delete(SND_OVER_SPEED); //锟斤拷锟斤拷 Sound_Delete(SND_OVER_SPEED); //锟斤拷锟斤拷
Sound_Delete(SND_AEB); Sound_Delete(SND_AEB_2Hz);
Sound_Delete(SND_AEB_4Hz);
Sound_Delete(SND_AEB_8Hz);
Sound_Delete(SND_LOW_OIL_SPEED); Sound_Delete(SND_LOW_OIL_SPEED);
} }
else if (SYS_SELF_TEST_DISP_MODE) //锟皆硷拷 else if (SYS_SELF_TEST_DISP_MODE) //锟皆硷拷
......
...@@ -226,6 +226,15 @@ extern volatile uint8_t KeyEnterinStatus; ...@@ -226,6 +226,15 @@ extern volatile uint8_t KeyEnterinStatus;
#define LINE_IN_GEAR_SIGNAL LineInGEARStatus #define LINE_IN_GEAR_SIGNAL LineInGEARStatus
#define LINE_IN_GEAR_DEFAULT 0 #define LINE_IN_GEAR_DEFAULT 0
#endif #endif
/*** LINE_IN_AEBS_SIGNAL ***/
#if ((defined LINE_IN_AEBS) || (defined LINE_IN_AEBSn))
extern volatile uint8_t LineInAEBSStatus;
#define LINE_IN_AEBS_SIGNAL LineInAEBSStatus
#define LINE_IN_AEBS_DEFAULT 0
#endif
/****************************************************************************** /******************************************************************************
函数声明 函数声明
******************************************************************************/ ******************************************************************************/
......
...@@ -261,6 +261,66 @@ static const SndTrackStruct SndTracks[] = ...@@ -261,6 +261,66 @@ static const SndTrackStruct SndTracks[] =
/* 4 */ 0, 0, 0, 0, /* 4 */ 0, 0, 0, 0,
/*============================================================*/ /*============================================================*/
}, },
/* 2Hz */
{
/*==============================================================
音轨编号 | 总长度 | 描述
----------+--------+--------------------------------------------
012 | 498ms | 1000Hz长鸣
----------------------------------------------------------------
总音符数 | 预充电时间(ms) |
--------------------------------------------------------------*/
1, 50,
/*--------------------------------------------------------------
音符编号 | 声音频率(Hz) | 占空比(%) | 时长(ms) | 淡出时间(ms)
--------------------------------------------------------------*/
/* 1 */ 2000, 50, 248, 200,
/* 2 */ 0, 0, 0, 0,
/* 3 */ 0, 0, 0, 0,
/* 4 */ 0, 0, 0, 0,
/*============================================================*/
},
/* 4Hz */
{
/*==============================================================
音轨编号 | 总长度 | 描述
----------+--------+--------------------------------------------
013 | 248ms | 1000Hz长鸣
----------------------------------------------------------------
总音符数 | 预充电时间(ms) |
--------------------------------------------------------------*/
1, 50,
/*--------------------------------------------------------------
音符编号 | 声音频率(Hz) | 占空比(%) | 时长(ms) | 淡出时间(ms)
--------------------------------------------------------------*/
/* 1 */ 2000, 50, 123, 75,
/* 2 */ 0, 0, 0, 0,
/* 3 */ 0, 0, 0, 0,
/* 4 */ 0, 0, 0, 0,
/*============================================================*/
},
/* 8Hz */
{
/*==============================================================
音轨编号 | 总长度 | 描述
----------+--------+--------------------------------------------
014 | 123ms | 1000Hz长鸣
----------------------------------------------------------------
总音符数 | 预充电时间(ms) |
--------------------------------------------------------------*/
1, 50,
/*--------------------------------------------------------------
音符编号 | 声音频率(Hz) | 占空比(%) | 时长(ms) | 淡出时间(ms)
--------------------------------------------------------------*/
/* 1 */ 2000, 50, 60, 13,
/* 2 */ 0, 0, 0, 0,
/* 3 */ 0, 0, 0, 0,
/* 4 */ 0, 0, 0, 0,
/*============================================================*/
},
}; };
/****************************************************************************** /******************************************************************************
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
******************************************************************************/ ******************************************************************************/
#include "Line_In.h" #include "Line_In.h"
#include "CAN_Communication_Matrix.h"
uint8_t LineInEnable; uint8_t LineInEnable;
volatile uint8_t KeyLeftinStatus; volatile uint8_t KeyLeftinStatus;
...@@ -84,7 +85,7 @@ volatile uint8_t KeyEnterinStatus; ...@@ -84,7 +85,7 @@ volatile uint8_t KeyEnterinStatus;
LineInDebounceStruct LineInPTODeb; LineInDebounceStruct LineInPTODeb;
#endif #endif
#ifdef LINE_IN_FILT_BLOCK_SIGNAL // FILT_BLOCK #ifdef LINE_IN_FILT_BLOCK_SIGNAL // FILT_BLOCK,改为LDWS
volatile uint8_t LineInFILTBLOCKStatus; volatile uint8_t LineInFILTBLOCKStatus;
LineInDebounceStruct LineInFILTBLOCKDeb; LineInDebounceStruct LineInFILTBLOCKDeb;
#endif #endif
...@@ -98,6 +99,11 @@ volatile uint8_t KeyEnterinStatus; ...@@ -98,6 +99,11 @@ volatile uint8_t KeyEnterinStatus;
volatile uint8_t LineInGEARStatus; volatile uint8_t LineInGEARStatus;
LineInDebounceStruct LineInGEARDeb; LineInDebounceStruct LineInGEARDeb;
#endif #endif
#ifdef LINE_IN_AEBS_SIGNAL // AEBS
volatile uint8_t LineInAEBSStatus;
LineInDebounceStruct LineInAEBSDeb;
#endif
/****************************************************************************** /******************************************************************************
函数名:Line_In_Enable 函数名:Line_In_Enable
功 能:线路输入功能使能 功 能:线路输入功能使能
...@@ -163,6 +169,9 @@ uint8_t Line_In_Debounce (uint8_t Input, uint8_t DebCycleRise, uint16_t DebCycle ...@@ -163,6 +169,9 @@ uint8_t Line_In_Debounce (uint8_t Input, uint8_t DebCycleRise, uint16_t DebCycle
参 数:无 参 数:无
返回值:无 返回值:无
******************************************************************************/ ******************************************************************************/
uint8_t LINE_IN_FILT_BLOCK_SIGNAL_Last;
uint8_t LINE_IN_AEBS_SIGNAL_Last;
void Line_In_Status_Reset(void) void Line_In_Status_Reset(void)
{ {
#ifdef KEY_LEFT_SIGNAL // #ifdef KEY_LEFT_SIGNAL //
...@@ -232,6 +241,8 @@ void Line_In_Status_Reset(void) ...@@ -232,6 +241,8 @@ void Line_In_Status_Reset(void)
#ifdef LINE_IN_FILT_BLOCK_SIGNAL // FILT_BLOCK #ifdef LINE_IN_FILT_BLOCK_SIGNAL // FILT_BLOCK
LINE_IN_FILT_BLOCK_SIGNAL = LINE_IN_FILT_BLOCK_DEFAULT; LINE_IN_FILT_BLOCK_SIGNAL = LINE_IN_FILT_BLOCK_DEFAULT;
LINE_IN_FILT_BLOCK_SIGNAL_Last = LINE_IN_FILT_BLOCK_SIGNAL;
LDWenableCommand = 0;
LineInFILTBLOCKDeb .Timer = 0; LineInFILTBLOCKDeb .Timer = 0;
#endif #endif
...@@ -244,6 +255,13 @@ void Line_In_Status_Reset(void) ...@@ -244,6 +255,13 @@ void Line_In_Status_Reset(void)
LINE_IN_GEAR_SIGNAL = LINE_IN_GEAR_DEFAULT; LINE_IN_GEAR_SIGNAL = LINE_IN_GEAR_DEFAULT;
LineInGEARDeb .Timer = 0; LineInGEARDeb .Timer = 0;
#endif #endif
#ifdef LINE_IN_AEBS_SIGNAL // AEBS
LINE_IN_AEBS_SIGNAL = LINE_IN_AEBS_DEFAULT;
LINE_IN_AEBS_SIGNAL_Last = LINE_IN_AEBS_SIGNAL;
DriverActivationDemandForAEBS = 0;
LineInAEBSDeb .Timer = 0;
#endif
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
} }
...@@ -255,6 +273,8 @@ void Line_In_Status_Reset(void) ...@@ -255,6 +273,8 @@ void Line_In_Status_Reset(void)
****************************************************************************** ******************************************************************************
注 意:该服务函数必须每20ms被调用一次 注 意:该服务函数必须每20ms被调用一次
******************************************************************************/ ******************************************************************************/
uint8_t PowerOnSts_Last = 0;
void Line_In_Debounce_Service(void) void Line_In_Debounce_Service(void)
{ {
uint8_t LineStatus; uint8_t LineStatus;
...@@ -322,6 +342,32 @@ void Line_In_Debounce_Service(void) ...@@ -322,6 +342,32 @@ void Line_In_Debounce_Service(void)
if (LineInEnable == 0) if (LineInEnable == 0)
return; return;
if (AnalogKL15Voltage <= 8000)
{
PowerOnSts_Last = 0;
}
else
{
if (PowerOnSts_Last == 0)
{
PowerOnSts_Last = 1;
#ifdef LINE_IN_FILT_BLOCK_SIGNAL // FILT_BLOCK
LINE_IN_FILT_BLOCK_SIGNAL = LINE_IN_FILT_BLOCK_DEFAULT;
LINE_IN_FILT_BLOCK_SIGNAL_Last = LINE_IN_FILT_BLOCK_SIGNAL;
LDWenableCommand = 0;
LineInFILTBLOCKDeb .Timer = 0;
#endif
#ifdef LINE_IN_AEBS_SIGNAL // AEBS
LINE_IN_AEBS_SIGNAL = LINE_IN_AEBS_DEFAULT;
LINE_IN_AEBS_SIGNAL_Last = LINE_IN_AEBS_SIGNAL;
DriverActivationDemandForAEBS = 0;
LineInAEBSDeb .Timer = 0;
#endif
}
}
// LED_RIGHT_G // LED_RIGHT_G
#ifdef LINE_IN_RIGHT_SIGNAL #ifdef LINE_IN_RIGHT_SIGNAL
#ifdef LINE_IN_RIGHT #ifdef LINE_IN_RIGHT
...@@ -606,6 +652,18 @@ void Line_In_Debounce_Service(void) ...@@ -606,6 +652,18 @@ void Line_In_Debounce_Service(void)
LineInFILTBLOCKDeb.Timer = 0; LineInFILTBLOCKDeb.Timer = 0;
LineInFILTBLOCKDeb.Last = LineStatus; LineInFILTBLOCKDeb.Last = LineStatus;
} }
if (AnalogKL15Voltage > 8000)
{
if (LINE_IN_FILT_BLOCK_SIGNAL_Last != LINE_IN_FILT_BLOCK_SIGNAL)
{
LINE_IN_FILT_BLOCK_SIGNAL_Last = LINE_IN_FILT_BLOCK_SIGNAL;
if (LINE_IN_FILT_BLOCK_SIGNAL_Last == 1)
{
LDWenableCommand ^= 1;
}
}
}
#endif #endif
//CHARGE //CHARGE
...@@ -655,4 +713,40 @@ void Line_In_Debounce_Service(void) ...@@ -655,4 +713,40 @@ void Line_In_Debounce_Service(void)
LineInGEARDeb.Last = LineStatus; LineInGEARDeb.Last = LineStatus;
} }
#endif #endif
//AEBS
#ifdef LINE_IN_AEBS_SIGNAL
#ifdef LINE_IN_AEBS
LineStatus = LINE_IN_AEBS;
#else
LineStatus = !LINE_IN_AEBSn;
#endif
if (LineStatus == LineInAEBSDeb.Last)
{
LineInAEBSDeb.Timer++;
if (LineInAEBSDeb.Timer >= LINE_IN_DEBOUNCE_L_CNT)
{
LineInAEBSDeb.Timer = 0;
LINE_IN_AEBS_SIGNAL = LineStatus;
}
}
else
{
LineInAEBSDeb.Timer = 0;
LineInAEBSDeb.Last = LineStatus;
}
if (AnalogKL15Voltage > 8000)
{
if (LINE_IN_AEBS_SIGNAL_Last != LINE_IN_AEBS_SIGNAL)
{
LINE_IN_AEBS_SIGNAL_Last = LINE_IN_AEBS_SIGNAL;
if (LINE_IN_AEBS_SIGNAL_Last == 1)
{
DriverActivationDemandForAEBS ^= 1;
}
}
}
#endif
} }
...@@ -89,12 +89,12 @@ ...@@ -89,12 +89,12 @@
----------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------
| 名称 | 端口 | 引脚 | 方向 | 初值 | 上下拉使能 | 上/下拉 | 说明 | 名称 | 端口 | 引脚 | 方向 | 初值 | 上下拉使能 | 上/下拉 | 说明
===================================================================================================================================================*/ ===================================================================================================================================================*/
//#define N.C. PTH_PTH0 // 63 OUT 0 0 0 -- #define LINE_IN_AEBSn PTH_PTH0 // 63 IN 0 0 0 --AEBS开关信号
//#define N.C. PTH_PTH1 // 64 OUT 0 0 0 -- //#define N.C. PTH_PTH1 // 64 OUT 0 0 0 --
//#define N.C. PTH_PTH2 // 65 OUT 0 0 0 -- //#define N.C. PTH_PTH2 // 65 OUT 0 0 0 --
//#define N.C. PTH_PTH3 // 66 OUT 0 0 0 -- //#define N.C. PTH_PTH3 // 66 OUT 0 0 0 --
#define LINE_IN_CAB_LOCKn PTH_PTH4 // 75 IN 0 0 0 --驾驶室锁死 #define LINE_IN_CAB_LOCKn PTH_PTH4 // 75 IN 0 0 0 --驾驶室锁死
#define LINE_IN_FILT_BLOCKn PTH_PTH5 // 76 IN 0 0 0 --空滤器阻塞 #define LINE_IN_FILT_BLOCKn PTH_PTH5 // 76 IN 0 0 0 --空滤器阻塞,改成LDWS开关信号
#define LCD_1530EN PTH_PTH6 // 83 OUT 0 0 0 --TFT电源 #define LCD_1530EN PTH_PTH6 // 83 OUT 0 0 0 --TFT电源
//#define N.C. PTH_PTH7 // 84 OUT 0 0 0 -- //#define N.C. PTH_PTH7 // 84 OUT 0 0 0 --
/*=================================================================================================================================================== /*===================================================================================================================================================
......
...@@ -48,7 +48,7 @@ void GPIO_Init(void) ...@@ -48,7 +48,7 @@ void GPIO_Init(void)
PPSP = 0x00; //上下拉选择寄存器 PPSP = 0x00; //上下拉选择寄存器
// PORTH // PORTH
DDRH = 0xCF; //方向控制寄存器 DDRH = 0xCE; //方向控制寄存器
PTH = 0x00; //数据寄存器 PTH = 0x00; //数据寄存器
PERH = 0x00; //上下拉使能寄存器 PERH = 0x00; //上下拉使能寄存器
PPSH = 0x00; //上下拉选择寄存器 PPSH = 0x00; //上下拉选择寄存器
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "Sound_Source.h" #include "Sound_Source.h"
#define SND_TOTAL_NUMBER 32 #define SND_TOTAL_NUMBER 34
/****************************************************************************** /******************************************************************************
声音列表 声音列表
...@@ -40,9 +40,11 @@ enum SoundName ...@@ -40,9 +40,11 @@ enum SoundName
SND_LockWithKeyInCar , // 闭锁时钥匙在车内 SND_LockWithKeyInCar , // 闭锁时钥匙在车内
SND_BreakPressure , // 制动气压报警 SND_BreakPressure , // 制动气压报警
SND_OVER_SPEED , SND_OVER_SPEED ,
SND_AEB , SND_AEB_2Hz ,
SND_Break_down , SND_Break_down ,
SND_CNG_GasLeak , SND_CNG_GasLeak ,
SND_AEB_4Hz ,
SND_AEB_8Hz ,
}; };
/****************************************************************************** /******************************************************************************
...@@ -103,9 +105,11 @@ static const SoundAttributeStruct SoundList[] = ...@@ -103,9 +105,11 @@ static const SoundAttributeStruct SoundList[] =
{ /* SND_LockWithKeyInCar 26*/ SND_LockWithKeyInCar1 , SND_TYPE_NORMAL,}, { /* SND_LockWithKeyInCar 26*/ SND_LockWithKeyInCar1 , SND_TYPE_NORMAL,},
{ /* SND_BreakPressure 27*/ SND_BreakPressure1 , SND_TYPE_NORMAL,}, { /* SND_BreakPressure 27*/ SND_BreakPressure1 , SND_TYPE_NORMAL,},
{ /* SND_OVER_SPEED 28*/ SND_OVER_SPEED1 , SND_TYPE_NORMAL,}, { /* SND_OVER_SPEED 28*/ SND_OVER_SPEED1 , SND_TYPE_NORMAL,},
{ /* SND_OVER_SPEED 29*/ SND_SRC_AEB , SND_TYPE_NORMAL,}, { /* SND_AEB_2Hz 29*/ SND_SRC_AEB_2Hz , SND_TYPE_NORMAL,},
{ /* SND_Break_down 30*/ SND_SRC_Break_down , SND_TYPE_NORMAL,}, { /* SND_Break_down 30*/ SND_SRC_Break_down , SND_TYPE_NORMAL,},
{ /* SND_CNG_GasLeak 31*/ SND_SRC_CNG_GasLeak , SND_TYPE_NORMAL,}, { /* SND_CNG_GasLeak 31*/ SND_SRC_CNG_GasLeak , SND_TYPE_NORMAL,},
{ /* SND_AEB_4Hz 32*/ SND_SRC_AEB_4Hz , SND_TYPE_NORMAL,},
{ /* SND_AEB_8Hz 33*/ SND_SRC_AEB_8Hz , SND_TYPE_NORMAL,},
/*====================================================================================*/ /*====================================================================================*/
}; };
......
...@@ -860,10 +860,25 @@ void Telltale_LCD_Display(void) ...@@ -860,10 +860,25 @@ void Telltale_LCD_Display(void)
TFT_LCD_Clear_Layer(LAYER_LED09); TFT_LCD_Clear_Layer(LAYER_LED09);
#endif #endif
//AEB 灯 44 //AEB 灯 44
if (TelltaleLCDFlag.Sig.LCD10 == 1) /*if (TelltaleLCDFlag.Sig.LCD10 == 1)
TFT_LCD_Display_Sprite(LAYER_LED10, SN_zhishideng_10_png, 445, 9, 64); TFT_LCD_Display_Sprite(LAYER_LED10, SN_zhishideng_10_png, 445, 9, 64);
else else
TFT_LCD_Clear_Layer(LAYER_LED10); TFT_LCD_Clear_Layer(LAYER_LED10);
*/
if ((AEBS_AdvancedEmergencyBrakingSysState == 0xE) || (AEBS_CollisionWarningLevel == 2) || (AEBS1_STATUS & CAN_MSG_LOST) ||\
(AEBS_CollisionWarningLevel == 3) || (AEBS_CollisionWarningLevel == 5) || (AEBS_CollisionWarningLevel == 6))
{
TFT_LCD_Display_Sprite(LAYER_LED10, SN_zhishideng_10_png, 445, 9, 64);
}
else if ((AEBS_AdvancedEmergencyBrakingSysState == 0x2) ||\
(AEBS_CollisionWarningLevel == 1) || (AEBS_CollisionWarningLevel == 4))
{
TFT_LCD_Display_Sprite(LAYER_LED10, SN_zz_zhishideng_10_png, 445, 9, 64);
}
else
{
TFT_LCD_Clear_Layer(LAYER_LED10);
}
//小灯 KL15,KL30 48 //小灯 KL15,KL30 48
if (TelltaleLCDFlag.Sig.LCD11 == 1) if (TelltaleLCDFlag.Sig.LCD11 == 1)
......
...@@ -38,9 +38,12 @@ ...@@ -38,9 +38,12 @@
#define SND_LockWithKeyInCar1 0x1A // #define SND_LockWithKeyInCar1 0x1A //
#define SND_BreakPressure1 0x1B // #define SND_BreakPressure1 0x1B //
#define SND_OVER_SPEED1 0x1C // #define SND_OVER_SPEED1 0x1C //
#define SND_SRC_AEB 0x1D //转向报警 #define SND_SRC_AEB_2Hz 0x1D //AEBS报警2Hz
#define SND_SRC_Break_down 0x1E // #define SND_SRC_Break_down 0x1E //
#define SND_SRC_CNG_GasLeak 0x1F // #define SND_SRC_CNG_GasLeak 0x1F //
#define SND_SRC_AEB_4Hz 0x20 //AEBS报警4Hz
#define SND_SRC_AEB_8Hz 0x21 //AEBS报警8Hz
/****************************************************************************** /******************************************************************************
伪音源名称列表 伪音源名称列表
******************************************************************************/ ******************************************************************************/
...@@ -107,9 +110,11 @@ static const SndAttributeStruct SndAttributeTable[] = ...@@ -107,9 +110,11 @@ static const SndAttributeStruct SndAttributeTable[] =
{/* SND_LockWithKeyInCar1 27 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,}, {/* SND_LockWithKeyInCar1 27 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,},
{/* SND_BreakPressure1 28 */ 0x01, 0, 90, SND_MODE_SINGLE , 1000,}, {/* SND_BreakPressure1 28 */ 0x01, 0, 90, SND_MODE_SINGLE , 1000,},
{/* SND_OVER_SPEED1 29 */ 0x01, 0, 3, SND_MODE_SINGLE , 1000,}, {/* SND_OVER_SPEED1 29 */ 0x01, 0, 3, SND_MODE_SINGLE , 1000,},
{/* SND_SRC_AEB 30 */ 0x01, 0, 30, SND_MODE_SINGLE , 1000,}, {/* SND_SRC_AEB_2Hz 30 */ 0x0C, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 500,},
{/* SND_SRC_Break_down 31 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,}, {/* SND_SRC_Break_down 31 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,},
{/* SND_SRC_CNG_GasLeak 32 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,}, {/* SND_SRC_CNG_GasLeak 32 */ 0x01, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 1000,},
{/* SND_SRC_AEB_4Hz 33 */ 0x0D, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 250,},
{/* SND_SRC_AEB_8Hz 34 */ 0x0E, 0, SND_CYCLE_NONSTOP, SND_MODE_SINGLE , 125,},
/*==============================================================================================*/ /*==============================================================================================*/
}; };
......
...@@ -1852,8 +1852,8 @@ typedef union ...@@ -1852,8 +1852,8 @@ typedef union
uint8_t Msg[8]; uint8_t Msg[8];
struct struct
{ {
uint8_t b00_03 : 4; // AEB_State uint8_t b00_03 : 4; // AEBS_AdvancedEmergencyBrakingSysState
uint8_t b04_07 : 4; // uint8_t b04_07 : 4; // AEBS_CollisionWarningLevel
uint8_t b10_17 : 8; // uint8_t b10_17 : 8; //
uint8_t b20_27 : 8; // uint8_t b20_27 : 8; //
uint8_t b30_37 : 8; // uint8_t b30_37 : 8; //
...@@ -1870,8 +1870,8 @@ extern volatile uint8_t CANMsg0CF02F2AStatus; ...@@ -1870,8 +1870,8 @@ extern volatile uint8_t CANMsg0CF02F2AStatus;
#define AEBS1 0x0CF02F2A #define AEBS1 0x0CF02F2A
#define AEBS1_STATUS CANMsg0CF02F2AStatus #define AEBS1_STATUS CANMsg0CF02F2AStatus
#define AEB_State CANMsg0CF02F2A.Sig.b00_03 // AEB状态 #define AEBS_AdvancedEmergencyBrakingSysState CANMsg0CF02F2A.Sig.b00_03
#define AEBS_CollisionWarningLevel CANMsg0CF02F2A.Sig.b04_07
static const uint8_t CANMsg0CF02F2AInit[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static const uint8_t CANMsg0CF02F2AInit[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg0CF02F2ATimeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static const uint8_t CANMsg0CF02F2ATimeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
...@@ -2333,6 +2333,70 @@ extern volatile uint8_t CANMsg18FDC40BStatus; ...@@ -2333,6 +2333,70 @@ extern volatile uint8_t CANMsg18FDC40BStatus;
static const uint8_t CANMsg18FDC40BInit[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static const uint8_t CANMsg18FDC40BInit[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg18FDC40BTimeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static const uint8_t CANMsg18FDC40BTimeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg18FDC40BMask[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static const uint8_t CANMsg18FDC40BMask[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/******************************************************************************
ICM5
ID:0x0C0B2A17
******************************************************************************/
typedef union
{
uint8_t Msg[8];
struct
{
uint8_t b00_01 : 2; //DriverActivationDemandForAEBS
uint8_t b02_01 : 6;
uint8_t b08_15 : 8; //
uint8_t b16_23 : 8; //
uint8_t b24_31 : 8; //
uint8_t b32_39 : 8; //
uint8_t b40_47 : 8; //
uint8_t b48_55 : 8; //
uint8_t b56_63 : 8; //
} Sig;
} CANMsg0C0B2A17Union;
extern volatile CANMsg0C0B2A17Union CANMsg0C0B2A17;
extern volatile uint8_t CANMsg0C0B2A17Status;
#define ICM_5 0x0C0B2A17
#define ICM_5_STATUS CANMsg0C0B2A17Status
#define DriverActivationDemandForAEBS CANMsg0C0B2A17.Sig.b00_01
static const uint8_t CANMsg0C0B2A17Init[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg0C0B2A17Timeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg0C0B2A17Mask[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/******************************************************************************
ICM6
ID:0x18A92A17
******************************************************************************/
typedef union
{
uint8_t Msg[8];
struct
{
uint8_t b00_01 : 2; //LDWenableCommand
uint8_t b02_01 : 6;
uint8_t b08_15 : 8; //
uint8_t b16_23 : 8; //
uint8_t b24_31 : 8; //
uint8_t b32_39 : 8; //
uint8_t b40_47 : 8; //
uint8_t b48_55 : 8; //
uint8_t b56_63 : 8; //
} Sig;
} CANMsg18A92A17Union;
extern volatile CANMsg18A92A17Union CANMsg18A92A17;
extern volatile uint8_t CANMsg18A92A17Status;
#define ICM_6 0x18A92A17
#define ICM_6_STATUS CANMsg18A92A17Status
#define LDWenableCommand CANMsg18A92A17.Sig.b00_01
static const uint8_t CANMsg18A92A17Init[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg18A92A17Timeout[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static const uint8_t CANMsg18A92A17Mask[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/***************************************************************************************************************************************************************************** /*****************************************************************************************************************************************************************************
报文属性预定义 报文属性预定义
*****************************************************************************************************************************************************************************/ *****************************************************************************************************************************************************************************/
...@@ -2414,6 +2478,8 @@ static const CANMsgAttrStruct CANMsgAttrTable[] = ...@@ -2414,6 +2478,8 @@ static const CANMsgAttrStruct CANMsgAttrTable[] =
{ ICM_2, CANMsg18FEF117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 3, &CANMsg18FEF117Status, CANMsg18FEF117Init, CANMsg18FEF117Timeout, CANMsg18FEF117Mask,}, { ICM_2, CANMsg18FEF117.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 3, &CANMsg18FEF117Status, CANMsg18FEF117Init, CANMsg18FEF117Timeout, CANMsg18FEF117Mask,},
//{ ICM_3, CANMsg18FF0A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 11, &CANMsg18FF0A17Status, CANMsg18FF0A17Init, CANMsg18FF0A17Timeout, CANMsg18FF0A17Mask,}, //{ ICM_3, CANMsg18FF0A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 100, 11, &CANMsg18FF0A17Status, CANMsg18FF0A17Init, CANMsg18FF0A17Timeout, CANMsg18FF0A17Mask,},
{ ICM_4, CANMsg18FEFC17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 9, &CANMsg18FEFC17Status, CANMsg18FEFC17Init, CANMsg18FEFC17Timeout, CANMsg18FEFC17Mask,}, { ICM_4, CANMsg18FEFC17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 1000, 9, &CANMsg18FEFC17Status, CANMsg18FEFC17Init, CANMsg18FEFC17Timeout, CANMsg18FEFC17Mask,},
{ ICM_5, CANMsg0C0B2A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 50, 5, &CANMsg0C0B2A17Status, CANMsg0C0B2A17Init, CANMsg0C0B2A17Timeout, CANMsg0C0B2A17Mask,},
{ ICM_6, CANMsg18A92A17.Msg, 8, 8, CAN_MSG_Tx, CAN_MSG_CYCLE, 200, 19, &CANMsg18A92A17Status, CANMsg18A92A17Init, CANMsg18A92A17Timeout, CANMsg18A92A17Mask,},
{ NWM_TBOX, CANMsg18EFCD27.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 10000, 0, &CANMsg18EFCD27Status, CANMsg18EFCD27Init, CANMsg18EFCD27Timeout, CANMsg18EFCD27Mask,}, { NWM_TBOX, CANMsg18EFCD27.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 10000, 0, &CANMsg18EFCD27Status, CANMsg18EFCD27Init, CANMsg18EFCD27Timeout, CANMsg18EFCD27Mask,},
{ ADAS_1, CANMsg10F007E8.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 2000, 0, &CANMsg10F007E8Status, CANMsg10F007E8Init, CANMsg10F007E8Timeout, CANMsg10F007E8Mask,}, { ADAS_1, CANMsg10F007E8.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 2000, 0, &CANMsg10F007E8Status, CANMsg10F007E8Init, CANMsg10F007E8Timeout, CANMsg10F007E8Mask,},
...@@ -2457,7 +2523,7 @@ static const CANMsgAttrStruct CANMsgAttrTable[] = ...@@ -2457,7 +2523,7 @@ static const CANMsgAttrStruct CANMsgAttrTable[] =
{ EBS5, CANMsg18FDC40B.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 1000, 0, &CANMsg18FDC40BStatus, CANMsg18FDC40BInit, CANMsg18FDC40BTimeout, CANMsg18FDC40BMask,}, { EBS5, CANMsg18FDC40B.Msg, 8, 8, CAN_MSG_Rx, CAN_MSG_CYCLE, 1000, 0, &CANMsg18FDC40BStatus, CANMsg18FDC40BInit, CANMsg18FDC40BTimeout, CANMsg18FDC40BMask,},
/*==========================================================================================================================================================================*/ /*==========================================================================================================================================================================*/
}; };
#define CAN_TX_MSG_NUM 8 #define CAN_TX_MSG_NUM 10
#define CAN_RX_MSG_NUM 44 #define CAN_RX_MSG_NUM 44
#endif #endif
...@@ -236,3 +236,11 @@ volatile uint8_t CANMsg18FFEB4EStatus; ...@@ -236,3 +236,11 @@ volatile uint8_t CANMsg18FFEB4EStatus;
//EBS5 //EBS5
volatile CANMsg18FDC40BUnion CANMsg18FDC40B; volatile CANMsg18FDC40BUnion CANMsg18FDC40B;
volatile uint8_t CANMsg18FDC40BStatus; volatile uint8_t CANMsg18FDC40BStatus;
//ICM5
volatile CANMsg0C0B2A17Union CANMsg0C0B2A17;
volatile uint8_t CANMsg0C0B2A17Status;
//ICM6
volatile CANMsg18A92A17Union CANMsg18A92A17;
volatile uint8_t CANMsg18A92A17Status;
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