Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISUZU
VC66_7C
Commits
5c2eb35f
Commit
5c2eb35f
authored
Dec 09, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整胎压指示灯功能
parent
585b7d54
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22977 additions
and
23046 deletions
+22977
-23046
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+22606
-22581
project.siz
ghs/project.siz
+2
-2
Service_TPMS.c
source/Application/APP/Data_TPMS/Service_TPMS.c
+269
-315
Service_TPMS.h
source/Application/APP/Data_TPMS/Service_TPMS.h
+57
-119
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+30
-17
Telltales_user.h
source/Application/APP/Telltales/Telltales_user.h
+1
-0
GUI.c
source/Application/Graphic/GUI/GUI.c
+12
-12
No files found.
ghs/project
View file @
5c2eb35f
No preview for this file type
ghs/project.hex
View file @
5c2eb35f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ghs/project.siz
View file @
5c2eb35f
project .intvect 1536
project .text 32
4972
project .text 32
5980
project .rodata 411127
project .secinfo 120
project .syscall 6
project .romdata
9021
project .romdata
8805
project .ROM.ramfunc 208
project .ramfunc 208
source/Application/APP/Data_TPMS/Service_TPMS.c
View file @
5c2eb35f
...
...
@@ -2,7 +2,6 @@
#include "CAN_Communication_Matrix.h"
#include "Flash_synchronizer.h"
/*** TPMS ***/
_USER_TPMS
TPMS_Out
[
TPMSNumMax
]
=
{
0
};
...
...
@@ -14,22 +13,21 @@ _USER_TPMS TPMS_Out[TPMSNumMax] = {0};
******************************************************************************/
void
Data_TPMS_KL30_Init
(
void
)
{
TPMS_Out
[
FirstLOut
].
TPMSTyreID
=
FirstLOutID
;
TPMS_Out
[
FirstROut
].
TPMSTyreID
=
FirstROutID
;
TPMS_Out
[
SecondLIn
].
TPMSTyreID
=
SecondLInID
;
TPMS_Out
[
SecondRIn
].
TPMSTyreID
=
SecondRInID
;
TPMS_Out
[
FirstLOut
].
TPMSTyreID
=
FirstLOutID
;
TPMS_Out
[
FirstROut
].
TPMSTyreID
=
FirstROutID
;
TPMS_Out
[
ThirdLOut
].
TPMSTyreID
=
ThirdLOutID
;
TPMS_Out
[
ThirdLIn
].
TPMSTyreID
=
ThirdLInID
;
TPMS_Out
[
ThirdROut
].
TPMSTyreID
=
ThirdROutID
;
TPMS_Out
[
ThirdRIn
].
TPMSTyreID
=
ThirdRInID
;
TPMS_Out
[
SecondLIn
].
TPMSTyreID
=
SecondLInID
;
TPMS_Out
[
SecondRIn
].
TPMSTyreID
=
SecondRInID
;
TPMS_Out
[
FourthLOut
].
TPMSTyreID
=
FourthLOutID
;
TPMS_Out
[
FourthLIn
].
TPMSTyreID
=
FourthLInID
;
TPMS_Out
[
FourthROut
].
TPMSTyreID
=
FourthROutID
;
TPMS_Out
[
FourthRIn
].
TPMSTyreID
=
FourthRInID
;
TPMS_Out
[
ThirdLOut
].
TPMSTyreID
=
ThirdLOutID
;
TPMS_Out
[
ThirdLIn
].
TPMSTyreID
=
ThirdLInID
;
TPMS_Out
[
ThirdROut
].
TPMSTyreID
=
ThirdROutID
;
TPMS_Out
[
ThirdRIn
].
TPMSTyreID
=
ThirdRInID
;
TPMS_Out
[
FourthLOut
].
TPMSTyreID
=
FourthLOutID
;
TPMS_Out
[
FourthLIn
].
TPMSTyreID
=
FourthLInID
;
TPMS_Out
[
FourthROut
].
TPMSTyreID
=
FourthROutID
;
TPMS_Out
[
FourthRIn
].
TPMSTyreID
=
FourthRInID
;
TPMS_Out
[
FirstLOut
].
TPMSDataInvalidTime
=
600u
;
TPMS_Out
[
FirstROut
].
TPMSDataInvalidTime
=
600u
;
...
...
@@ -46,23 +44,6 @@ void Data_TPMS_KL30_Init(void)
TPMS_Out
[
FourthLIn
].
TPMSDataInvalidTime
=
600u
;
TPMS_Out
[
FourthROut
].
TPMSDataInvalidTime
=
600u
;
TPMS_Out
[
FourthRIn
].
TPMSDataInvalidTime
=
600u
;
TPMS_Out
[
FirstLOut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
FirstROut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
SecondLIn
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
SecondRIn
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
ThirdLOut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
ThirdLIn
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
ThirdROut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
ThirdRIn
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
FourthLOut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
FourthLIn
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
FourthROut
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
FourthRIn
].
TPMSGuiSta
=
SOLID_GRAY
;
}
/******************************************************************************
Function:Data_TPMS_KL15_ON_Init
...
...
@@ -72,7 +53,6 @@ void Data_TPMS_KL30_Init(void)
******************************************************************************/
void
Data_TPMS_KL15_ON_Init
(
void
)
{
}
/******************************************************************************
Function:Data_TPMS_Value_Processing
...
...
@@ -125,8 +105,9 @@ void Data_TPMS_Value_Processing(void)
******************************************************************************/
void
Get_Data_TPMS_Value
(
TPMSNUM_t
TPMSTyreID
)
{
uint16_t
TyrePressure
=
0u
;
uint16_t
TyrePressure
=
0u
;
uint32_t
TyreTemp
=
0ul
;
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSTyreID
==
Get_ID_18011733_Sig_Tire_Index
())
{
/*胎压 数据处理*/
...
...
@@ -135,18 +116,17 @@ void Get_Data_TPMS_Value(TPMSNUM_t TPMSTyreID)
/*胎温数据处理*/
TPMS_Out
[
TPMSTyreID
].
TPMSTempSign
=
Get_ID_18011733_Sig_Tire_Temperature_Sign
();
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSign
)
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSign
==
0x01u
)
{
//' - '
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
=
128
-
(
Get_ID_18011733_Sig_Tire_Temperature
()
&
0x7F
)
;
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
=
(
uint8_t
)(
TYRETEMP_OFFSET_VALUE
-
(
Get_ID_18011733_Sig_Tire_Temperature
()
&
0x7F
))
;
}
else
{
//' + '
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
=
Get_ID_18011733_Sig_Tire_Temperature
()
;
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
=
Get_ID_18011733_Sig_Tire_Temperature
();
}
/*数据掉线计时器*/
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
=
0u
;
}
...
...
@@ -154,7 +134,7 @@ void Get_Data_TPMS_Value(TPMSNUM_t TPMSTyreID)
{
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
<
0xFFFFu
)
{
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
++
;
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
++
;
}
else
{
...
...
@@ -189,43 +169,16 @@ void Get_Data_TPMS_Status(TPMSNUM_t TPMSTyreID)
TPMS_Out
[
TPMSTyreID
].
TPMSSensorfault
=
Get_ID_18011733_Sig_Sensor_fault_information
();
}
}
/******************************************************************************
Function:Get_Data_TPMS_Pair
Description:胎压配对获取
Input:输入枚举编号
Output:
******************************************************************************/
void
Get_Data_TPMS_Pair
(
TPMSNUM_t
TPMSTyreID
)
{
if
(
TPMS_Out
[
TPMSTyreID
].
CurPoxID
)
{
if
(
TPMS_Out
[
TPMSTyreID
].
PairEn
)
{
TPMS_Out
[
TPMSTyreID
].
PairTimer
++
;
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
=
YELLOW_FLASH
;
if
(
Get_ID_18021733_Sig_Setup_cmd
()
==
0x61u
)
{
TPMS_Out
[
TPMSTyreID
].
PairSuccess
=
1u
;
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
=
SOLID_GREEN
;
TPMS_Out
[
TPMSTyreID
].
PairEn
=
0
;
}
else
if
(
Get_ID_18021733_Sig_Setup_cmd
()
==
0xffu
)
{
TPMS_Out
[
TPMSTyreID
].
PairSuccess
=
0u
;
}
}
}
}
/******************************************************************************
Function: Get_DataTPMS_Pressure_Value
Description:获取某个编号轮胎胎压
Description:获取某个编号轮胎胎压
数据
Input:输入枚举编号
Output:
对应轮胎位置的胎压数据
Output:
******************************************************************************/
uint16_t
Get_DataTPMS_Pressure_Value
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint16_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSPressure
;
return
TPMS_Out
[
TPMSTyreID
].
TPMSPressure
;
}
/******************************************************************************
...
...
@@ -238,20 +191,20 @@ uint16_t Get_DataTPMS_Pressure_Sta(TPMSNUM_t TPMSTyreID)
{
uint16_t
Pressure_Sta
=
0u
;
if
(
(
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
)
>=
600u
)
/*数据超时 掉线或轮刷超时*/
if
(
(
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
)
>=
600u
)
/*数据超时 掉线或轮刷超时*/
{
Pressure_Sta
=
(
uint16_t
)
STATUS_TIMEOUT
;
}
else
if
((
TPMS_Out
[
TPMSTyreID
].
TPMSPressure
)
>=
0xFAu
)
/*超出最大范围*/
else
if
((
TPMS_Out
[
TPMSTyreID
].
TPMSPressure
)
>=
0xFAu
)
/*超出最大范围*/
{
Pressure_Sta
=
(
uint16_t
)
STATUS_UNSUPPORTED
;
Pressure_Sta
=
(
uint16_t
)
STATUS_UNSUPPORTED
;
}
else
{
Pressure_Sta
=
(
uint16_t
)
STATUS_SUCCESS
;
Pressure_Sta
=
(
uint16_t
)
STATUS_SUCCESS
;
}
return
Pressure_Sta
;
return
Pressure_Sta
;
}
/******************************************************************************
Function: Get_DataTPMS_Pressure_FLashSta
...
...
@@ -261,17 +214,17 @@ uint16_t Get_DataTPMS_Pressure_Sta(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint8_t
Get_DataTPMS_Pressure_FLashSta
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
Pressure_Sta
=
0u
;
uint8_t
Pressure_Sta
=
0u
;
uint16_t
Get_Pressure_Sta
=
0u
;
Get_Pressure_Sta
=
Get_DataTPMS_Pressure_Sta
(
TPMSTyreID
)
;
Get_Pressure_Sta
=
Get_DataTPMS_Pressure_Sta
(
TPMSTyreID
);
if
(
Get_Pressure_Sta
==
STATUS_TIMEOUT
)
if
(
Get_Pressure_Sta
==
STATUS_TIMEOUT
)
{
Pressure_Sta
=
FLASH_SYNC_1Hz
;
Pressure_Sta
=
FLASH_SYNC_1Hz
;
}
return
(
uint8_t
)
Pressure_Sta
;
return
(
uint8_t
)
Pressure_Sta
;
}
/******************************************************************************
...
...
@@ -282,7 +235,7 @@ uint8_t Get_DataTPMS_Pressure_FLashSta(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint16_t
Get_DataTPMS_Temp_Value
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint16_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
;
return
(
uint16_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSTemp
;
}
/******************************************************************************
...
...
@@ -296,27 +249,27 @@ uint16_t Get_DataTPMS_Temp_Sta(TPMSNUM_t TPMSTyreID)
uint16_t
Temp_Value
=
0u
;
uint16_t
Get_Temp_Value
=
0u
;
Get_Temp_Value
=
Get_DataTPMS_Temp_Value
(
TPMSTyreID
)
;
Get_Temp_Value
=
Get_DataTPMS_Temp_Value
(
TPMSTyreID
);
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
>=
600u
)
/*数据超时 掉线或轮刷超时*/
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSDataInvalidTime
>=
600u
)
/*数据超时 掉线或轮刷超时*/
{
Temp_Value
=
(
uint16_t
)
STATUS_TIMEOUT
;
}
else
if
(
Get_Temp_Value
>=
0xFFFFu
)
/*超出最大范围*/
else
if
(
Get_Temp_Value
>=
0xFFFFu
)
/*超出最大范围*/
{
Temp_Value
=
(
uint16_t
)
STATUS_UNSUPPORTED
;
Temp_Value
=
(
uint16_t
)
STATUS_UNSUPPORTED
;
}
else
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSigStat
==
1u
)
/*正数 零
返回状态*/
else
if
(
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSign
)
==
0x01u
)
/*负数
返回状态*/
{
Temp_Value
=
(
uint16_t
)
STATUS_N
ONN
EGATIVE
;
Temp_Value
=
(
uint16_t
)
STATUS_NEGATIVE
;
}
else
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSigStat
==
0u
)
/*负数
返回状态*/
else
if
(
(
TPMS_Out
[
TPMSTyreID
].
TPMSTempSign
)
==
0x00u
)
/*正数 零
返回状态*/
{
Temp_Value
=
(
uint16_t
)
STATUS_NEGATIVE
;
Temp_Value
=
(
uint16_t
)
STATUS_N
ONN
EGATIVE
;
}
else
{
Temp_Value
=
(
uint16_t
)
STATUS_SUCCESS
;
Temp_Value
=
(
uint16_t
)
STATUS_SUCCESS
;
}
return
(
uint16_t
)
Temp_Value
;
}
...
...
@@ -329,237 +282,50 @@ uint16_t Get_DataTPMS_Temp_Sta(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint8_t
Get_DataTPMS_Temp_FLashSta
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
TEMP_Sta
=
0u
;
uint8_t
TEMP_Sta
=
0u
;
uint16_t
Get_Temp_Sta
=
0u
;
Get_Temp_Sta
=
Get_DataTPMS_Temp_Sta
(
TPMSTyreID
)
;
Get_Temp_Sta
=
Get_DataTPMS_Temp_Sta
(
TPMSTyreID
);
if
(
Get_Temp_Sta
==
(
uint16_t
)
STATUS_TIMEOUT
)
if
(
Get_Temp_Sta
==
(
uint16_t
)
STATUS_TIMEOUT
)
{
TEMP_Sta
=
FlashSync1Hz
;
TEMP_Sta
=
FlashSync1Hz
;
}
return
(
uint8_t
)
TEMP_Sta
;
}
/******************************************************************************
Function:Get_DataTPMS_TPMSHighpressure_Value
Description:获取某个编号轮胎气压高
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_Highpressure_Value
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
Highpressure_Value
=
0u
;
uint8_t
Get_Highpressure_Value
=
0u
;
/*0 极限高压 1 高压 2 正常压力 3 欠压 4 极限欠压 5 无定义 6 错误 7 无效*/
Get_Highpressure_Value
=
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSPressureThresholdDetection
;
if
(
Get_Highpressure_Value
==
1u
)
{
Highpressure_Value
=
1u
;
}
else
if
(
Get_Highpressure_Value
==
0u
)
{
Highpressure_Value
=
2u
;
}
else
{
Highpressure_Value
=
0u
;
}
return
(
uint8_t
)
Highpressure_Value
;
}
/******************************************************************************
Function:Get_DataTPMS_Lowpressure_Value
Description:获取某个编号轮胎气压低
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_Lowpressure_Value
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
Lowpressure_Value
=
0u
;
uint8_t
Get_Lowpressure_Value
=
0u
;
/*0 极限高压 1 高压 2 正常压力 3 欠压 4 极限欠压 5 无定义 6 错误 7 无效*/
Get_Lowpressure_Value
=
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSPressureThresholdDetection
;
if
(
Get_Lowpressure_Value
==
3u
)
{
Lowpressure_Value
=
1u
;
}
else
if
(
Get_Lowpressure_Value
==
4u
)
{
Lowpressure_Value
=
2u
;
}
else
{
Lowpressure_Value
=
0u
;
}
return
(
uint8_t
)
Lowpressure_Value
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎轮胎被盗报警信号
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_TyresLostWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
)
{
//return (uint8_t)TPMS_Out[TPMSTyreID].TPMSLostWarningSig ;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎标准温度设置状态
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_TireStandarTemperatureSettingSts_Value
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSStandarTempSetSts
;
return
(
uint8_t
)
TEMP_Sta
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎短时无信号
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_TemporaryNoSignal_Value
(
TPMSNUM_t
TPMSTyreID
)
{
//return (uint8_t)TPMS_Out[TPMSTyreID].TPMSTemporaryNoSignal ;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎是否换色
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_DataTPMS_Tyre_Red_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
TPMS_Tyre_Status
=
0u
;
return
(
uint8_t
)
TPMS_Tyre_Status
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎闪烁状态
Input:输入枚举编号
Output: 0--不显示;1--闪烁
******************************************************************************/
uint8_t
Get_DataTPMS_Tyre_FLASH_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
TPMS_Tyre_Status
=
0u
;
TPMS_Tyre_Status
=
FLASH_SYNC_1Hz
;
return
(
uint8_t
)
TPMS_Tyre_Status
;
}
/******************************************************************************
Function:按键切换 选择轮胎
Description:选择某个轮胎
Input:输入枚举编号
Output:
UP/DOWN 按键
******************************************************************************/
void
ChooseKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
)
{
uint8_t
i
=
0
;
for
(
i
=
0
;
i
<
TPMSNumMax
;
i
++
)
{
if
(
TPMS_Out
[
i
].
TPMSGuiSta
==
WHITEBOX_GRAY
)
{
TPMS_Out
[
i
].
TPMSGuiSta
=
SOLID_GRAY
;
TPMS_Out
[
i
].
CurPoxID
=
0
;
}
}
if
(
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
==
SOLID_GRAY
)
{
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
=
WHITEBOX_GRAY
;
}
TPMS_Out
[
TPMSTyreID
].
CurPoxID
=
1
;
}
/******************************************************************************
Function:配对轮胎
Description:选择某个轮胎
Input:输入枚举编号
Output:
ENTER 按键
******************************************************************************/
void
EnterKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
)
{
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
=
YELLOW_FLASH
;
TPMS_Out
[
TPMSTyreID
].
PairCmd
=
0x61
;
TPMS_Out
[
TPMSTyreID
].
TireNumber
=
TPMS_Out
[
TPMSTyreID
].
TPMSTyreID
;
TPMS_Out
[
TPMSTyreID
].
PairEn
=
1
;
TPMS_Out
[
TPMSTyreID
].
PairTimer
=
0
;
}
/******************************************************************************
Function:退出配对
Description:选择某个轮胎
Input:输入枚举编号
Output:
RETURN 按键
******************************************************************************/
void
ReturnKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
)
{
TPMS_Out
[
TPMSTyreID
].
PairCmd
=
0x91
;
TPMS_Out
[
TPMSTyreID
].
PairEn
=
0
;
TPMS_Out
[
TPMSTyreID
].
PairTimer
=
0
;
}
/******************************************************************************
Function:Get_TPMSSetGui_Sta
Description:胎压设定界面:某个轮胎的式样
Description:获取某个编号轮胎低气压报警
Input:输入枚举编号
Output:
RETURN 按键
******************************************************************************/
en_TPMSGUI
Get_TPMSSetGui_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
TPMS_Out
[
TPMSTyreID
].
TPMSGuiSta
;
}
/******************************************************************************
Function:Get_PairSuccess
Description:配对是否成功
Input:输入枚举编号
Output: 0 - 失败 1 - 成功
******************************************************************************/
uint8_t
Get_PairSuccess
(
TPMSNUM_t
TPMSTyreID
)
uint8_t
Get_TPMSLowpressure_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
TPMS_Out
[
TPMSTyreID
].
PairSuccess
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSLowpressure
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎
低
气压报警
Description:获取某个编号轮胎
高
气压报警
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_TPMS
Low
pressure_Sta
(
TPMSNUM_t
TPMSTyreID
)
uint8_t
Get_TPMS
High
pressure_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMS
Lowpressure
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMS
Highpressure
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎高
气压
报警
Description:获取某个编号轮胎高
温
报警
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_TPMSHig
hpressure
_Sta
(
TPMSNUM_t
TPMSTyreID
)
uint8_t
Get_TPMSHig
Temp
_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSHigh
pressure
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSHigh
temperature
;
}
/******************************************************************************
...
...
@@ -570,18 +336,18 @@ uint8_t Get_TPMSHighpressure_Sta(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint8_t
Get_DataTPMS_RapidLeakWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSRapidleakage
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSRapidleakage
;
}
/******************************************************************************
Function:
Description:获取某个编号轮胎
高温
报警
Function:
Get_TPMSLowvoltage_Sta
Description:获取某个编号轮胎
低电压
报警
Input:输入枚举编号
Output:
******************************************************************************/
uint8_t
Get_
DataTPMS_TyreTempWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
)
uint8_t
Get_
TPMSLowvoltage_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMS
Hightemperature
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMS
Lowvoltage
;
}
/******************************************************************************
...
...
@@ -592,7 +358,7 @@ uint8_t Get_DataTPMS_TyreTempWarningSig_Value(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint8_t
Get_TPMSNosignal_Sta
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSNosignal
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSNosignal
;
}
/******************************************************************************
...
...
@@ -603,7 +369,7 @@ uint8_t Get_TPMSNosignal_Sta(TPMSNUM_t TPMSTyreID)
******************************************************************************/
uint8_t
Get_DataTPMS_SensorErrorWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
)
{
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSSensorfault
;
return
(
uint8_t
)
TPMS_Out
[
TPMSTyreID
].
TPMSSensorfault
;
}
/******************************************************************************
...
...
@@ -631,7 +397,195 @@ uint8_t Get_TPMSPresure_Alarm(TPMSNUM_t TPMSTyreID)
{
Ret
=
0u
;
}
return
Ret
;
return
Ret
;
}
uint8_t
Get_TPMSLow_Presure_Sta
(
void
)
{
uint8_t
Low_Presure
=
0u
;
if
((
Get_TPMSLowpressure_Sta
(
FirstLOut
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
FirstROut
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
SecondLIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
SecondRIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
ThirdLOut
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
ThirdLIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
ThirdRIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
ThirdROut
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
FourthLOut
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
FourthLIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
FourthRIn
)
==
0x01u
)
||
(
Get_TPMSLowpressure_Sta
(
FourthROut
)
==
0x01u
))
{
Low_Presure
=
0x01u
;
}
else
{
Low_Presure
=
0x00u
;
}
return
Low_Presure
;
}
uint8_t
Get_TPMSHigh_Presure_Sta
(
void
)
{
uint8_t
High_Presure
=
8u
;
if
((
Get_TPMSHighpressure_Sta
(
FirstLOut
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
FirstROut
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
SecondLIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
SecondRIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
ThirdLOut
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
ThirdLIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
ThirdRIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
ThirdROut
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
FourthLOut
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
FourthLIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
FourthRIn
)
==
0x01u
)
||
(
Get_TPMSHighpressure_Sta
(
FourthROut
)
==
0x01u
))
{
High_Presure
=
0x01u
;
}
else
{
High_Presure
=
0x00u
;
}
return
High_Presure
;
}
uint8_t
Get_TPMSHigh_Temperature_Sta
(
void
)
{
uint8_t
High_Temperature
=
0u
;
if
((
Get_TPMSHigTemp_Sta
(
FirstLOut
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
FirstROut
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
SecondLIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
SecondRIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
ThirdLOut
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
ThirdLIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
ThirdRIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
ThirdROut
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
FourthLOut
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
FourthLIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
FourthRIn
)
==
0x01u
)
||
(
Get_TPMSHigTemp_Sta
(
FourthROut
)
==
0x01u
))
{
High_Temperature
=
0x01u
;
}
else
{
High_Temperature
=
0x00u
;
}
return
High_Temperature
;
}
uint8_t
Get_TPMSFast_air_leakage
(
void
)
{
uint8_t
Fast_air_leakage
=
0u
;
if
((
Get_DataTPMS_RapidLeakWarningSig_Value
(
FirstLOut
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
FirstROut
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
SecondLIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
SecondRIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
ThirdLOut
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
ThirdLIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
ThirdRIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
ThirdROut
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
FourthLOut
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
FourthLIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
FourthRIn
)
==
0x01u
)
||
(
Get_DataTPMS_RapidLeakWarningSig_Value
(
FourthROut
)
==
0x01u
))
{
Fast_air_leakage
=
0x01u
;
}
else
{
Fast_air_leakage
=
0x00u
;
}
return
Fast_air_leakage
;
}
uint8_t
Get_TPMSLow_Voltage_Sta
(
void
)
{
uint8_t
Low_Voltage
=
0x00u
;
if
((
Get_TPMSLowvoltage_Sta
(
FirstLOut
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
FirstROut
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
SecondLIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
SecondRIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
ThirdLOut
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
ThirdLIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
ThirdRIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
ThirdROut
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
FourthLOut
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
FourthLIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
FourthRIn
)
==
0x01u
)
||
(
Get_TPMSLowvoltage_Sta
(
FourthROut
)
==
0x01u
))
{
Low_Voltage
=
0x01u
;
}
else
{
Low_Voltage
=
0x00u
;
}
return
Low_Voltage
;
}
uint8_t
Get_TPMSNo_signal_Sta
(
void
)
{
uint8_t
No_signal
=
0x00u
;
if
((
Get_TPMSNosignal_Sta
(
FirstLOut
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
FirstROut
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
SecondLIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
SecondRIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
ThirdLOut
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
ThirdLIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
ThirdRIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
ThirdROut
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
FourthLOut
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
FourthLIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
FourthRIn
)
==
0x01u
)
||
(
Get_TPMSNosignal_Sta
(
FourthROut
)
==
0x01u
))
{
No_signal
=
0x01u
;
}
else
{
No_signal
=
0x00u
;
}
return
No_signal
;
}
uint8_t
Get_TPMSSensor_fault_Sta
(
void
)
{
uint8_t
Sensor_fault
=
0x00u
;
if
((
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstLOut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstLOut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstLOut
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstROut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstROut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FirstROut
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondLIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondLIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondLIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondRIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondRIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
SecondRIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLOut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLOut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLOut
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdLIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdRIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdRIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdRIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdROut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdROut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
ThirdROut
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLOut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLOut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLOut
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthLIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthRIn
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthRIn
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthRIn
)
==
0x09u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthROut
)
==
0x07u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthROut
)
==
0x08u
)
||
(
Get_DataTPMS_SensorErrorWarningSig_Value
(
FourthROut
)
==
0x09u
))
{
Sensor_fault
=
0x01u
;
}
else
{
Sensor_fault
=
0x00u
;
}
return
Sensor_fault
;
}
source/Application/APP/Data_TPMS/Service_TPMS.h
View file @
5c2eb35f
...
...
@@ -3,34 +3,6 @@
#include "TYW_stdint.h"
/******************************************************************************
VC66对应关系
[] [] No1
[] [] No2
[] [] [] [] No3
[] [] [] [] No4
TPMS FirstLOutID 左前轮(No1)
FirstROutID 右前轮(No1)
SecondLInID 左中前轮(No2)
SecondRInID 右中前轮(No2)
ThirdLOutID 左中后轮_外侧(No3)
ThirdLInID 左中后轮_内侧(No3)
ThirdRInID 右中后轮_内侧(No3)
ThirdROutID 右中后轮_外侧(No3)
FourthLOutID 左后轮_外侧(No4)
FourthLInID 左后轮_内侧(No4)
FourthRInID 右后轮_内侧(No4)
FourthROutID 右后轮_外侧(No4)
******************************************************************************/
#define FirstLOutID 0x12u
#define FirstROutID 0x13u
#define SecondLInID 0x22u
...
...
@@ -44,71 +16,50 @@ TPMS FirstLOutID 左前轮(No1)
#define FourthRInID 0x43u
#define FourthROutID 0x44u
#define TYRETEMP_OFFSET_VALUE (273u)
/*胎温数据偏移量*/
#define TYRETEMP_OFFSET_VALUE (128u)
/*胎温数据偏移量*/
typedef
enum
{
FirstLOut
=
0
,
FirstROut
,
SecondLIn
,
SecondRIn
,
ThirdLOut
,
ThirdLIn
,
ThirdRIn
,
ThirdROut
,
FourthLOut
,
FourthLIn
,
FourthRIn
,
FourthROut
,
TPMSNumMax
,
FirstLOut
=
0
,
FirstROut
,
SecondLIn
,
SecondRIn
,
ThirdLOut
,
ThirdLIn
,
ThirdRIn
,
ThirdROut
,
FourthLOut
,
FourthLIn
,
FourthRIn
,
FourthROut
,
TPMSNumMax
,
}
TPMSNUM_t
;
typedef
enum
{
SOLID_GRAY
=
0
,
WHITEBOX_GRAY
,
YELLOW_FLASH
,
SOLID_GREEN
,
SOLID_GRAY
=
0
,
WHITEBOX_GRAY
,
YELLOW_FLASH
,
SOLID_GREEN
,
}
en_TPMSGUI
;
typedef
struct
{
uint8_t
TPMSTyreID
;
/*轮胎位置 */
uint16_t
TPMSPressure
;
/*轮胎气压 */
uint8_t
TPMSTemp
;
/*轮胎温度 */
uint8_t
TPMSTempSign
;
/*轮胎温度正负 */
uint8_t
TPMSLowpressure
;
/*低气压报警 */
uint8_t
TPMSHighpressure
;
/*高气压报警 */
uint8_t
TPMSHightemperature
;
/*高温报警 */
uint8_t
TPMSRapidleakage
;
/*快速漏气报警 */
uint8_t
TPMSLowvoltage
;
/*低电压报警 */
uint8_t
TPMSNosignal
;
/*无信号报警 */
uint8_t
TPMSSensorfault
;
/*传感器故障信息 */
uint8_t
TPMSPressureThresholdDetection
;
/*压力检测 */
uint8_t
TPMSStandarTempSetSts
;
/*轮胎标准温度设置状态 */
uint8_t
TPMSInvaliddata
;
/*标识报警信号的有效性 */
uint8_t
TPMSDataupdating
;
/*数据有效性 */
//uint8_t TPMSLostWarningSig ; /*轮胎被盗报警信号 */
//uint8_t TPMSTemporaryNoSignal ; /*短时无信号 */
uint8_t
TPMSTempSigStat
;
/*轮胎温度符号状态 */
uint16_t
TPMSDataInvalidTime
;
/*数据无效计时器 */
//uint16_t TPMSValueSta ; /*数据返回状态 */
uint8_t
CurPoxID
;
/*当前光标位置*/
en_TPMSGUI
TPMSGuiSta
;
/*轮子显示状态*/
uint8_t
PairSuccess
;
uint8_t
PairEn
;
uint8_t
PairTimer
;
uint8_t
PairCmd
;
/*TxID 18033317 Byte1*/
uint8_t
TireNumber
;
/*TxID 18033317 Byte2*/
uint8_t
TPMSTyreID
;
/*轮胎位置*/
uint16_t
TPMSPressure
;
/*轮胎气压*/
uint8_t
TPMSTempSign
;
/*轮胎温度正负*/
uint8_t
TPMSTemp
;
/*轮胎温度*/
uint8_t
TPMSLowpressure
;
/*低气压报警*/
uint8_t
TPMSHighpressure
;
/*高气压报警*/
uint8_t
TPMSHightemperature
;
/*高温报警*/
uint8_t
TPMSRapidleakage
;
/*快速漏气报警*/
uint8_t
TPMSLowvoltage
;
/*低电压报警*/
uint8_t
TPMSNosignal
;
/*无信号报警*/
uint8_t
TPMSDataupdating
;
/*数据更新*/
uint8_t
TPMSDatainvalid
;
/*数据无效*/
uint8_t
TPMSSensorfault
;
/*传感器故障信息*/
uint16_t
TPMSDataInvalidTime
;
/*数据无效计时器*/
}
_USER_TPMS
;
extern
_USER_TPMS
TPMS_Out
[
TPMSNumMax
];
...
...
@@ -120,7 +71,7 @@ void Get_Data_TPMS_Value(TPMSNUM_t TPMSTyreID);
void
Get_Data_TPMS_Status
(
TPMSNUM_t
TPMSTyreID
);
void
Get_Data_TPMS_Pair
(
TPMSNUM_t
TPMSTyreID
);
void
Data_TPMS_Value_Processing
(
void
);
void
Data_TPMS_Value_Processing
(
void
);
uint16_t
Get_DataTPMS_Pressure_Value
(
TPMSNUM_t
TPMSTyreID
);
uint16_t
Get_DataTPMS_Pressure_Sta
(
TPMSNUM_t
TPMSTyreID
);
...
...
@@ -131,16 +82,12 @@ uint16_t Get_DataTPMS_Temp_Sta(TPMSNUM_t TPMSTyreID);
uint8_t
Get_DataTPMS_Temp_FLashSta
(
TPMSNUM_t
TPMSTyreID
);
uint16_t
Get_DataTPMS_Leakrate_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_Highpressure_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_Lowpressure_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_SensorErrorWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_TyresLostWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_TireStandarPressureSettingSts_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_TireStandarTemperatureSettingSts_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_RapidLeakWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_
DataTPMS_TyreTempWarningSig_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_
DataTPMS_TemporaryNoSignal_Value
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_
TPMSLowvoltage_Sta
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_
TPMSHigTemp_Sta
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_TPMSLowpressure_Sta
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_TPMSHighpressure_Sta
(
TPMSNUM_t
TPMSTyreID
);
...
...
@@ -150,22 +97,13 @@ uint8_t Get_TPMSPresure_Alarm(TPMSNUM_t TPMSTyreID);
uint8_t
Get_DataTPMS_Tyre_Red_Sta
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_DataTPMS_Tyre_FLASH_Sta
(
TPMSNUM_t
TPMSTyreID
);
/*key 调用*/
extern
void
ChooseKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
);
extern
void
EnterKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
);
extern
void
ReturnKey_TPMS_Event
(
TPMSNUM_t
TPMSTyreID
);
/*Gui 调用*/
/*轮子的式样
SOLID_GRAY - 全灰色
WHITEBOX_GRAY - 灰色白框
YELLOW_FLASH - 黄色闪烁
SOLID_GREEN - 绿色
*/
extern
en_TPMSGUI
Get_TPMSSetGui_Sta
(
TPMSNUM_t
TPMSTyreID
);
/*
配对状态 0 - 失败 1 - 成功
*/
extern
uint8_t
Get_PairSuccess
(
TPMSNUM_t
TPMSTyreID
);
uint8_t
Get_TPMSLow_Presure_Sta
(
void
);
uint8_t
Get_TPMSHigh_Presure_Sta
(
void
);
uint8_t
Get_TPMSHigh_Temperature_Sta
(
void
);
uint8_t
Get_TPMSFast_air_leakage
(
void
);
uint8_t
Get_TPMSLow_Voltage_Sta
(
void
);
uint8_t
Get_TPMSNo_signal_Sta
(
void
);
uint8_t
Get_TPMSSensor_fault_Sta
(
void
);
#endif
\ No newline at end of file
source/Application/APP/Telltales/Telltales_user.c
View file @
5c2eb35f
...
...
@@ -11,7 +11,7 @@
#include "Maintenance.h"
#include "Line_in.h"
#include "IS31FL3236.h"
#include "Service_TPMS.h"
#include "Data_AirPressure.h"
...
...
@@ -42,7 +42,7 @@ const LED_Attribute_st LED_Attribute[LED_Max] =
{
em_LED_CHARG_L
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_CHARG_L_Judgement
,
LED_CHARG_L_Execution
},
{
em_LED_SEAT_BELT_L
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_SEAT_BELT_L_Judgement
,
LED_SEAT_BELT_L_Execution
},
{
em_LED_RR_DIFF_LOCK_L
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_RR_DIFF_LOCK_L_Judgement
,
LED_RR_DIFF_LOCK_L_Execution
},
{
em_LED_TPMS_L
,
No
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_TPMS_L_Judgement
,
LED_TPMS_L_Execution
},
{
em_LED_TPMS_L
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_TPMS_L_Judgement
,
LED_TPMS_L_Execution
},
{
em_LED_ASR_or_EVSC_OFF_L
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_ASR_or_EVSC_OFF_L_Judgement
,
LED_ASR_or_EVSC_OFF_L_Execution
},
{
em_LED_EVSC_L
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_EVSC_L_Judgement
,
LED_EVSC_L_Execution
},
{
em_LED_eco_stop_OFF_L
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_eco_stop_OFF_L_Judgement
,
LED_eco_stop_OFF_L_Execution
},
...
...
@@ -1189,25 +1189,27 @@ void LED_RR_DIFF_LOCK_L_Execution(uint8_t led_status)
uint8_t
LED_TPMS_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
uint8_t
m_Condition3
=
0u
;
uint8_t
m_Condition4
=
0u
;
uint8_t
m_Condition5
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_18011733_Sig_Low_Presure_Alarm
();
m_Condition2
=
(
uint8_t
)
Get_ID_18011733_Sig_High_Presure_Alarm
();
m_Condition3
=
(
uint8_t
)
Get_ID_18011733_Sig_High_Temperature_Alarm
();
m_Condition4
=
(
uint8_t
)
Get_ID_18011733_Sig_No_signal_Alarm
();
m_Condition5
=
(
uint8_t
)
Get_ID_18011733_Sig_Sensor_fault_information
();
uint8_t
CanStatus1
=
0x00u
;
uint8_t
Low_Presure
=
0u
;
uint8_t
High_Presure
=
0u
;
uint8_t
High_Temperature
=
0u
;
uint8_t
No_signal
=
0u
;
uint8_t
Sensor_fault
=
0u
;
Low_Presure
=
(
uint8_t
)
Get_TPMSLow_Presure_Sta
();
High_Presure
=
(
uint8_t
)
Get_TPMSHigh_Presure_Sta
();
High_Temperature
=
(
uint8_t
)
Get_TPMSHigh_Temperature_Sta
();
No_signal
=
(
uint8_t
)
Get_TPMSNo_signal_Sta
();
Sensor_fault
=
(
uint8_t
)
Get_TPMSSensor_fault_Sta
();
CanStatus1
=
CAN_MSG_Status
(
ID_CanMsg18011733_Msg_Count
);
if
(
K_Line_Set
.
K_Line_LID3E
==
0x01u
)
{
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
1u
)
||
(
m_Condition3
==
1u
))
if
((
Low_Presure
==
1u
)
||
(
High_Presure
==
1u
)
||
(
High_Temperature
==
1u
))
{
u8Result
=
1u
;
}
else
if
((
m_Condition4
==
1u
)
||
(
m_Condition5
==
7u
)
||
(
m_Condition5
==
8u
)
||
(
m_Condition5
==
9u
))
else
if
((
No_signal
==
1u
)
||
(
Sensor_fault
==
1u
)
||
(
CanStatus1
==
CAN_SIG_LOST
))
{
u8Result
=
FLASH_SYNC_1Hz
;
}
...
...
@@ -1353,7 +1355,7 @@ uint8_t LED_EVSC_L_Judgement(void)
}
if
(
(
m_Condition1
==
1u
)
||
(
L12_Air_Sta
==
1u
)
||
(
m_Condition1
==
1u
)
||
(
Common_Get_L12_Air_Sta
()
==
1u
)
||
(((
m_Condition2
==
1u
)
||
(
CanStatus2
==
CAN_SIG_LOST
))
&&
(
K_Line_Set
.
K_Line_LID21
==
0x01u
))
||
(((
m_Condition5
==
0u
)
||
(
CanStatus1
==
CAN_SIG_LOST
))
&&
(
K_Line_Set
.
K_Line_LID22
==
0x01u
))
)
...
...
@@ -1619,7 +1621,7 @@ uint8_t LED_BRAKE_AIR_or_EBS_RED_R_Judgement(void)
CanStatus
=
CAN_MSG_Status
(
ID_CanMsg18F0010B_Msg_Count
);
if
((
m_Condition1
==
0x01u
)
||
(
L12_Air_Sta
==
0x01u
)
||
if
((
m_Condition1
==
0x01u
)
||
(
Common_Get_L12_Air_Sta
()
==
0x01u
)
||
((
K_Line_Set
.
K_Line_LID21
==
0x01u
)
&&
((
m_Condition3
==
1u
)
||
(
CanStatus
==
CAN_SIG_LOST
))))
{
u8Result
=
1u
;
...
...
@@ -2119,3 +2121,14 @@ void LED_Fuel_Execution(uint8_t led_status)
FUEL_W_LED_OUT
=
1U
;
}
}
/******************************************************************************
Fuel
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
Common_Get_L12_Air_Sta
(
void
)
{
return
L12_Air_Sta
;
}
\ No newline at end of file
source/Application/APP/Telltales/Telltales_user.h
View file @
5c2eb35f
...
...
@@ -8,5 +8,6 @@ void Write_LED_RGIHT_G_Judgement(uint8_t led_status);
void
Write_LED_LEFT_G_Judgement
(
uint8_t
led_status
);
uint8_t
GET_LED_RIGHT_G_Judgement
(
void
);
uint8_t
GET_LED_LEFT_G_Judgement
(
void
);
uint8_t
Common_Get_L12_Air_Sta
(
void
);
#endif
source/Application/Graphic/GUI/GUI.c
View file @
5c2eb35f
...
...
@@ -3062,18 +3062,18 @@ void GUI_BG_TPMS_TempPIC_Display(uint8_t Mode)
if
(
Mode
==
GUI_DISP_MODE_NORMAL
)
{
/*高温报警*/
User_Tpms12
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FirstLOut
);
User_Tpms13
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FirstROut
);
User_Tpms22
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
SecondLIn
);
User_Tpms23
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
SecondRIn
);
User_Tpms31
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
ThirdLOut
);
User_Tpms32
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
ThirdLIn
);
User_Tpms33
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
ThirdRIn
);
User_Tpms34
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
ThirdROut
);
User_Tpms41
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FourthLOut
);
User_Tpms42
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FourthLIn
);
User_Tpms43
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FourthRIn
);
User_Tpms44
=
Get_
DataTPMS_TyreTempWarningSig_Value
(
FourthROut
);
User_Tpms12
=
Get_
TPMSHigTemp_Sta
(
FirstLOut
);
User_Tpms13
=
Get_
TPMSHigTemp_Sta
(
FirstROut
);
User_Tpms22
=
Get_
TPMSHigTemp_Sta
(
SecondLIn
);
User_Tpms23
=
Get_
TPMSHigTemp_Sta
(
SecondRIn
);
User_Tpms31
=
Get_
TPMSHigTemp_Sta
(
ThirdLOut
);
User_Tpms32
=
Get_
TPMSHigTemp_Sta
(
ThirdLIn
);
User_Tpms33
=
Get_
TPMSHigTemp_Sta
(
ThirdRIn
);
User_Tpms34
=
Get_
TPMSHigTemp_Sta
(
ThirdROut
);
User_Tpms41
=
Get_
TPMSHigTemp_Sta
(
FourthLOut
);
User_Tpms42
=
Get_
TPMSHigTemp_Sta
(
FourthLIn
);
User_Tpms43
=
Get_
TPMSHigTemp_Sta
(
FourthRIn
);
User_Tpms44
=
Get_
TPMSHigTemp_Sta
(
FourthROut
);
/*显示*/
GUI_General_Display
(
MENU_Sprite
,
CN_User_Menu3_04_che
,
GUI_BLENDMODE_SRC_OVER
);
/*车*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment