Commit 5c2eb35f authored by hu's avatar hu

调整胎压指示灯功能

parent 585b7d54
No preview for this file type
This diff is collapsed.
project .intvect 1536 project .intvect 1536
project .text 324972 project .text 325980
project .rodata 411127 project .rodata 411127
project .secinfo 120 project .secinfo 120
project .syscall 6 project .syscall 6
project .romdata 9021 project .romdata 8805
project .ROM.ramfunc 208 project .ROM.ramfunc 208
project .ramfunc 208 project .ramfunc 208
...@@ -3,112 +3,63 @@ ...@@ -3,112 +3,63 @@
#include "TYW_stdint.h" #include "TYW_stdint.h"
/****************************************************************************** #define FirstLOutID 0x12u
VC66对应关系 #define FirstROutID 0x13u
#define SecondLInID 0x22u
[] [] No1 #define SecondRInID 0x23u
#define ThirdLOutID 0x31u
[] [] No2 #define ThirdLInID 0x32u
#define ThirdRInID 0x33u
[] [] [] [] No3 #define ThirdROutID 0x34u
#define FourthLOutID 0x41u
[] [] [] [] No4 #define FourthLInID 0x42u
#define FourthRInID 0x43u
#define FourthROutID 0x44u
TPMS FirstLOutID 左前轮(No1)
FirstROutID 右前轮(No1) #define TYRETEMP_OFFSET_VALUE (128u) /*胎温数据偏移量*/
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
#define SecondRInID 0x23u
#define ThirdLOutID 0x31u
#define ThirdLInID 0x32u
#define ThirdRInID 0x33u
#define ThirdROutID 0x34u
#define FourthLOutID 0x41u
#define FourthLInID 0x42u
#define FourthRInID 0x43u
#define FourthROutID 0x44u
#define TYRETEMP_OFFSET_VALUE (273u) /*胎温数据偏移量*/
typedef enum typedef enum
{ {
FirstLOut = 0 , FirstLOut = 0,
FirstROut , FirstROut,
SecondLIn , SecondLIn,
SecondRIn , SecondRIn,
ThirdLOut , ThirdLOut,
ThirdLIn , ThirdLIn,
ThirdRIn , ThirdRIn,
ThirdROut , ThirdROut,
FourthLOut , FourthLOut,
FourthLIn , FourthLIn,
FourthRIn , FourthRIn,
FourthROut , FourthROut,
TPMSNumMax , TPMSNumMax,
} TPMSNUM_t; } TPMSNUM_t;
typedef enum typedef enum
{ {
SOLID_GRAY = 0 , SOLID_GRAY = 0,
WHITEBOX_GRAY , WHITEBOX_GRAY,
YELLOW_FLASH , YELLOW_FLASH,
SOLID_GREEN , SOLID_GREEN,
} en_TPMSGUI; } en_TPMSGUI;
typedef struct typedef struct
{ {
uint8_t TPMSTyreID ; /*轮胎位置 */ uint8_t TPMSTyreID; /*轮胎位置*/
uint16_t TPMSPressure ; /*轮胎气压 */ uint16_t TPMSPressure; /*轮胎气压*/
uint8_t TPMSTemp ; /*轮胎温度 */ uint8_t TPMSTempSign; /*轮胎温度正负*/
uint8_t TPMSTempSign ; /*轮胎温度正负 */ uint8_t TPMSTemp; /*轮胎温度*/
uint8_t TPMSLowpressure ; /*低气压报警 */ uint8_t TPMSLowpressure; /*低气压报警*/
uint8_t TPMSHighpressure ; /*高气压报警 */ uint8_t TPMSHighpressure; /*高气压报警*/
uint8_t TPMSHightemperature ; /*高温报警 */ uint8_t TPMSHightemperature; /*高温报警*/
uint8_t TPMSRapidleakage ; /*快速漏气报警 */ uint8_t TPMSRapidleakage; /*快速漏气报警*/
uint8_t TPMSLowvoltage ; /*低电压报警 */ uint8_t TPMSLowvoltage; /*低电压报警*/
uint8_t TPMSNosignal ; /*无信号报警 */ uint8_t TPMSNosignal; /*无信号报警*/
uint8_t TPMSSensorfault ; /*传感器故障信息 */ uint8_t TPMSDataupdating; /*数据更新*/
uint8_t TPMSDatainvalid; /*数据无效*/
uint8_t TPMSPressureThresholdDetection ; /*压力检测 */ uint8_t TPMSSensorfault; /*传感器故障信息*/
uint8_t TPMSStandarTempSetSts ; /*轮胎标准温度设置状态 */ uint16_t TPMSDataInvalidTime; /*数据无效计时器*/
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*/
} _USER_TPMS; } _USER_TPMS;
extern _USER_TPMS TPMS_Out[TPMSNumMax]; extern _USER_TPMS TPMS_Out[TPMSNumMax];
...@@ -120,7 +71,7 @@ void Get_Data_TPMS_Value(TPMSNUM_t TPMSTyreID); ...@@ -120,7 +71,7 @@ void Get_Data_TPMS_Value(TPMSNUM_t TPMSTyreID);
void Get_Data_TPMS_Status(TPMSNUM_t TPMSTyreID); void Get_Data_TPMS_Status(TPMSNUM_t TPMSTyreID);
void Get_Data_TPMS_Pair(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_Value(TPMSNUM_t TPMSTyreID);
uint16_t Get_DataTPMS_Pressure_Sta(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); ...@@ -131,16 +82,12 @@ uint16_t Get_DataTPMS_Temp_Sta(TPMSNUM_t TPMSTyreID);
uint8_t Get_DataTPMS_Temp_FLashSta(TPMSNUM_t TPMSTyreID); uint8_t Get_DataTPMS_Temp_FLashSta(TPMSNUM_t TPMSTyreID);
uint16_t Get_DataTPMS_Leakrate_Value(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_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_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_RapidLeakWarningSig_Value(TPMSNUM_t TPMSTyreID);
uint8_t Get_DataTPMS_TyreTempWarningSig_Value(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSLowvoltage_Sta(TPMSNUM_t TPMSTyreID);
uint8_t Get_DataTPMS_TemporaryNoSignal_Value(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSHigTemp_Sta(TPMSNUM_t TPMSTyreID);
uint8_t Get_TPMSLowpressure_Sta(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSLowpressure_Sta(TPMSNUM_t TPMSTyreID);
uint8_t Get_TPMSHighpressure_Sta(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSHighpressure_Sta(TPMSNUM_t TPMSTyreID);
...@@ -150,22 +97,13 @@ uint8_t Get_TPMSPresure_Alarm(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_Red_Sta(TPMSNUM_t TPMSTyreID);
uint8_t Get_DataTPMS_Tyre_FLASH_Sta(TPMSNUM_t TPMSTyreID); uint8_t Get_DataTPMS_Tyre_FLASH_Sta(TPMSNUM_t TPMSTyreID);
/*key 调用*/
extern void ChooseKey_TPMS_Event(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSLow_Presure_Sta(void);
extern void EnterKey_TPMS_Event(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSHigh_Presure_Sta(void);
extern void ReturnKey_TPMS_Event(TPMSNUM_t TPMSTyreID); uint8_t Get_TPMSHigh_Temperature_Sta(void);
uint8_t Get_TPMSFast_air_leakage (void);
/*Gui 调用*/ uint8_t Get_TPMSLow_Voltage_Sta(void);
/*轮子的式样 uint8_t Get_TPMSNo_signal_Sta(void);
SOLID_GRAY - 全灰色 uint8_t Get_TPMSSensor_fault_Sta(void);
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);
#endif #endif
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "Maintenance.h" #include "Maintenance.h"
#include "Line_in.h" #include "Line_in.h"
#include "IS31FL3236.h" #include "IS31FL3236.h"
#include "Service_TPMS.h"
#include "Data_AirPressure.h" #include "Data_AirPressure.h"
...@@ -42,7 +42,7 @@ const LED_Attribute_st LED_Attribute[LED_Max] = ...@@ -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_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_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_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 , NoSelfCheck , 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_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_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 }, { 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) ...@@ -1189,25 +1189,27 @@ void LED_RR_DIFF_LOCK_L_Execution(uint8_t led_status)
uint8_t LED_TPMS_L_Judgement(void) uint8_t LED_TPMS_L_Judgement(void)
{ {
uint8_t u8Result = 0u; uint8_t u8Result = 0u;
uint8_t m_Condition1 = 0u; uint8_t CanStatus1 = 0x00u;
uint8_t m_Condition2 = 0u; uint8_t Low_Presure = 0u;
uint8_t m_Condition3 = 0u; uint8_t High_Presure = 0u;
uint8_t m_Condition4 = 0u; uint8_t High_Temperature = 0u;
uint8_t m_Condition5 = 0u; uint8_t No_signal = 0u;
uint8_t Sensor_fault = 0u;
m_Condition1 = (uint8_t)Get_ID_18011733_Sig_Low_Presure_Alarm();
m_Condition2 = (uint8_t)Get_ID_18011733_Sig_High_Presure_Alarm(); Low_Presure = (uint8_t)Get_TPMSLow_Presure_Sta();
m_Condition3 = (uint8_t)Get_ID_18011733_Sig_High_Temperature_Alarm(); High_Presure = (uint8_t)Get_TPMSHigh_Presure_Sta();
m_Condition4 = (uint8_t)Get_ID_18011733_Sig_No_signal_Alarm(); High_Temperature = (uint8_t)Get_TPMSHigh_Temperature_Sta();
m_Condition5 = (uint8_t)Get_ID_18011733_Sig_Sensor_fault_information(); 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 (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; 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; u8Result = FLASH_SYNC_1Hz;
} }
...@@ -1353,7 +1355,7 @@ uint8_t LED_EVSC_L_Judgement(void) ...@@ -1353,7 +1355,7 @@ uint8_t LED_EVSC_L_Judgement(void)
} }
if ( 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_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)) (((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) ...@@ -1619,7 +1621,7 @@ uint8_t LED_BRAKE_AIR_or_EBS_RED_R_Judgement(void)
CanStatus = CAN_MSG_Status(ID_CanMsg18F0010B_Msg_Count); 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)))) ((K_Line_Set.K_Line_LID21 == 0x01u) && ((m_Condition3 == 1u) || (CanStatus == CAN_SIG_LOST))))
{ {
u8Result = 1u; u8Result = 1u;
...@@ -2118,4 +2120,15 @@ void LED_Fuel_Execution(uint8_t led_status) ...@@ -2118,4 +2120,15 @@ void LED_Fuel_Execution(uint8_t led_status)
FUEL_LED_Y_MCU = 0U ; FUEL_LED_Y_MCU = 0U ;
FUEL_W_LED_OUT = 1U ; FUEL_W_LED_OUT = 1U ;
} }
}
/******************************************************************************
Fuel
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t Common_Get_L12_Air_Sta(void)
{
return L12_Air_Sta ;
} }
\ No newline at end of file
...@@ -8,5 +8,6 @@ void Write_LED_RGIHT_G_Judgement(uint8_t led_status); ...@@ -8,5 +8,6 @@ void Write_LED_RGIHT_G_Judgement(uint8_t led_status);
void Write_LED_LEFT_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_RIGHT_G_Judgement(void);
uint8_t GET_LED_LEFT_G_Judgement(void); uint8_t GET_LED_LEFT_G_Judgement(void);
uint8_t Common_Get_L12_Air_Sta(void);
#endif #endif
...@@ -3062,18 +3062,18 @@ void GUI_BG_TPMS_TempPIC_Display(uint8_t Mode) ...@@ -3062,18 +3062,18 @@ void GUI_BG_TPMS_TempPIC_Display(uint8_t Mode)
if (Mode == GUI_DISP_MODE_NORMAL) if (Mode == GUI_DISP_MODE_NORMAL)
{ {
/*高温报警*/ /*高温报警*/
User_Tpms12 = Get_DataTPMS_TyreTempWarningSig_Value(FirstLOut); User_Tpms12 = Get_TPMSHigTemp_Sta(FirstLOut);
User_Tpms13 = Get_DataTPMS_TyreTempWarningSig_Value(FirstROut); User_Tpms13 = Get_TPMSHigTemp_Sta(FirstROut);
User_Tpms22 = Get_DataTPMS_TyreTempWarningSig_Value(SecondLIn); User_Tpms22 = Get_TPMSHigTemp_Sta(SecondLIn);
User_Tpms23 = Get_DataTPMS_TyreTempWarningSig_Value(SecondRIn); User_Tpms23 = Get_TPMSHigTemp_Sta(SecondRIn);
User_Tpms31 = Get_DataTPMS_TyreTempWarningSig_Value(ThirdLOut); User_Tpms31 = Get_TPMSHigTemp_Sta(ThirdLOut);
User_Tpms32 = Get_DataTPMS_TyreTempWarningSig_Value(ThirdLIn); User_Tpms32 = Get_TPMSHigTemp_Sta(ThirdLIn);
User_Tpms33 = Get_DataTPMS_TyreTempWarningSig_Value(ThirdRIn); User_Tpms33 = Get_TPMSHigTemp_Sta(ThirdRIn);
User_Tpms34 = Get_DataTPMS_TyreTempWarningSig_Value(ThirdROut); User_Tpms34 = Get_TPMSHigTemp_Sta(ThirdROut);
User_Tpms41 = Get_DataTPMS_TyreTempWarningSig_Value(FourthLOut); User_Tpms41 = Get_TPMSHigTemp_Sta(FourthLOut);
User_Tpms42 = Get_DataTPMS_TyreTempWarningSig_Value(FourthLIn); User_Tpms42 = Get_TPMSHigTemp_Sta(FourthLIn);
User_Tpms43 = Get_DataTPMS_TyreTempWarningSig_Value(FourthRIn); User_Tpms43 = Get_TPMSHigTemp_Sta(FourthRIn);
User_Tpms44 = Get_DataTPMS_TyreTempWarningSig_Value(FourthROut); User_Tpms44 = Get_TPMSHigTemp_Sta(FourthROut);
/*显示*/ /*显示*/
GUI_General_Display(MENU_Sprite, CN_User_Menu3_04_che, GUI_BLENDMODE_SRC_OVER); /*车*/ GUI_General_Display(MENU_Sprite, CN_User_Menu3_04_che, GUI_BLENDMODE_SRC_OVER); /*车*/
......
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