Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
fdc9d78d
Commit
fdc9d78d
authored
Jul 01, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:依据车厂要求,取消胎压单位转换,更改相关代码
parent
9639b3b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
77 deletions
+110
-77
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+21
-21
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-1
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+67
-36
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+20
-18
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+1
-1
No files found.
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
fdc9d78d
...
...
@@ -18,7 +18,7 @@ void Data_TPMS_KL30_Init ( void )
TPMS
.
Front_TPMS_Valid
=
0
;
TPMS
.
Rear_TPMS_Valid
=
0
;
TPMS
.
TPMS_Warning
=
0
;
TPMS
.
TPMS_Unit
=
Get_Dis_Tpms_Unit
();
//
TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
TPMS
.
TPMS_Front_Learn
=
MenuData
.
TPMS_Front_Learn
;
TPMS
.
TPMS_Rear_Learn
=
MenuData
.
TPMS_Rear_Learn
;
TPMS
.
TPMS_Front_FirstLearn_Flag
=
MenuData
.
TPMS_Front_FirstLearn_Flag
;
...
...
@@ -269,7 +269,7 @@ void Data_TPMS_Processing_Service ( void )
}
TPMS
.
TPMS_Unit
=
Get_Dis_Tpms_Unit
();
//
TPMS.TPMS_Unit = Get_Dis_Tpms_Unit();
Front_TPMS
=
Get_CAN_CH0_ID_341_Sig_Front_Pressure
();
Rear_TPMS
=
Get_CAN_CH0_ID_341_Sig_Rear_Pressure
();
...
...
@@ -457,15 +457,15 @@ uint8_t Get_Rear_TPMS_Sig_Vaild (void)
uint16_t
Get_Front_TPMS_Sig_Value
(
void
)
{
uint16_t
value
=
0
;
if
(
TPMS
.
TPMS_Unit
==
1
)
{
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Front_Press_Value
)
+
500
)
/
1000
;
if
(
value
>
99
)
{
value
=
99
;
}
}
else
//
if (TPMS.TPMS_Unit == 1)
//
{
//
value = (Data_Bar_To_Psi(TPMS.Front_Press_Value) + 500) / 1000;
//
if(value > 99)
//
{
//
value = 99;
//
}
//
}
//
else
{
value
=
TPMS
.
Front_Press_Value
+
50
;
value
=
value
/
100
;
...
...
@@ -475,16 +475,16 @@ uint16_t Get_Front_TPMS_Sig_Value (void)
uint16_t
Get_Rear_TPMS_Sig_Value
(
void
)
{
uint16_t
value
=
0
;
if
(
TPMS
.
TPMS_Unit
==
1
)
{
value
=
(
Data_Bar_To_Psi
(
TPMS
.
Rear_Press_Value
)
+
500
)
/
1000
;
if
(
value
>
99
)
{
value
=
99
;
}
}
else
//
if (TPMS.TPMS_Unit == 1)
//
{
//
value = (Data_Bar_To_Psi(TPMS.Rear_Press_Value) + 500) / 1000;
//
if(value > 99)
//
{
//
value = 99;
//
}
//
//
}
//
else
{
value
=
TPMS
.
Rear_Press_Value
+
50
;
value
=
value
/
100
;
...
...
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
fdc9d78d
...
...
@@ -122,7 +122,7 @@ void Gauge_Service(void)
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolantTempValueDisp
(),
GET_DataCollantTempSegValid
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
Get_Dis_Tpms_Unit
()
,
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
SEG_SET_TPMS_DISPLAY
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
0
,
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
#endif
SEG_SET_Navigation_STS
(
Get_Navigation_St_Dis
(),
Get_Navigation_Code_Dis
(),
Get_Navigation_Mileage_Dis
());
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
fdc9d78d
...
...
@@ -2089,40 +2089,40 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
IC2_SEG122
=
IC_SEG_ON
;
if
((
ClearODO_Flag
!=
1
)
&&
(
Common_GetIgnOnTime
()
>=
3000
))
{
if
(
Get_Current_PageType
()
==
Page_Tpms_Unit
)
{
if
(
m_Unit
==
0
)
{
IC2_SEG118
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_ON
;
}
else
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
}
}
else
{
IC2_SEG118
=
IC_SEG_OFF
;
IC2_SEG138
=
IC_SEG_OFF
;
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG109
=
IC_SEG_ON
;
IC2_SEG110
=
IC_SEG_OFF
;
}
else
{
IC2_SEG109
=
IC_SEG_OFF
;
IC2_SEG110
=
IC_SEG_OFF
;
}
}
}
else
//
if (Get_Current_PageType() == Page_Tpms_Unit)
//
{
//
if (m_Unit == 0)
//
{
//
IC2_SEG118 = IC_SEG_ON;
//
IC2_SEG138 = IC_SEG_ON;
//
if (FLASH_SYNC_1Hz)
//
{
//
IC2_SEG109 = IC_SEG_OFF;
//
IC2_SEG110 = IC_SEG_ON;
//
}
//
else
//
{
//
IC2_SEG109 = IC_SEG_OFF;
//
IC2_SEG110 = IC_SEG_OFF;
//
}
//
}
//
else
//
{
//
IC2_SEG118 = IC_SEG_OFF;
//
IC2_SEG138 = IC_SEG_OFF;
//
if (FLASH_SYNC_1Hz)
//
{
//
IC2_SEG109 = IC_SEG_ON;
//
IC2_SEG110 = IC_SEG_OFF;
//
}
//
else
//
{
//
IC2_SEG109 = IC_SEG_OFF;
//
IC2_SEG110 = IC_SEG_OFF;
//
}
//
}
//
}
//
else
{
if
(
m_Unit
==
0
)
...
...
@@ -2173,12 +2173,43 @@ void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint
}
if
(
Get_TPMS_CAN_LOST
()
==
0
)
{
if
(
Get_Current_PageType
()
==
Page_Front_Tpms
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG140
=
IC_SEG_OFF
;
IC2_SEG133
=
IC_SEG_OFF
;
}
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
}
else
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
{
if
(
FLASH_SYNC_1Hz
)
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_OFF
;
IC2_SEG113
=
IC_SEG_OFF
;
}
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
}
else
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG133
=
IC_SEG_ON
;
}
IC2_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
fdc9d78d
...
...
@@ -296,18 +296,18 @@ void Key_Left_Short_Press(void)
Unit_Convert_Service
();
}
#if (IC_Current == TY200_080000b_ty)
else
if
(
PageType
==
Page_Tpms_Unit
)
{
if
(
Get_Dis_Tpms_Unit
()
==
0
)
{
MenuData
.
Tpms_Unit
=
1
;
//psi
}
else
{
MenuData
.
Tpms_Unit
=
0
;
//bar
}
Unit_Convert_Service
();
}
//
else if(PageType == Page_Tpms_Unit)
//
{
//
if(Get_Dis_Tpms_Unit() == 0)
//
{
//
MenuData.Tpms_Unit = 1;//psi
//
}
//
else
//
{
//
MenuData.Tpms_Unit = 0;//bar
//
}
//
Unit_Convert_Service();
//
}
else
if
(
PageType
==
Page_Front_Tpms
)
{
PageType
=
Page_Rear_Tpms
;
...
...
@@ -386,12 +386,13 @@ void Key_Left_Long_Press(void)
#if (IC_Current == TY200_080000b_ty)
else
if
(
PageType
==
Page_Km_Unit
)
{
PageType
=
Page_Tpms_Unit
;
}
else
if
(
PageType
==
Page_Tpms_Unit
)
{
//PageType = Page_Tpms_Unit;
PageType
=
Page_Front_Tpms
;
}
//else if(PageType == Page_Tpms_Unit)
//{
// PageType = Page_Front_Tpms;
//}
else
if
((
PageType
==
Page_Front_Tpms
)
||
(
PageType
==
Page_Rear_Tpms
))
{
PageType
=
Page_Menu
;
...
...
@@ -466,7 +467,7 @@ void MenuData_Unit_Init(void)
uint32_t
TCS
[
1
]
=
{
0
};
Data_User_EEPROM_Read
(
EM_MenuData_Tcs_Val
,
TCS
,
1u
);
MenuData
.
KM_Unit
=
0
;
MenuData
.
Tpms_Unit
=
0
;
//
MenuData.Tpms_Unit = 0;
MenuData
.
Tcs_Val
=
TCS
[
0
];
}
...
...
@@ -537,7 +538,8 @@ uint8_t Get_Dis_KM_Unit(void)
uint8_t
Get_Dis_Tpms_Unit
(
void
)
{
return
MenuData
.
Tpms_Unit
;
//0bar,1psi
//return MenuData.Tpms_Unit; //0bar,1psi
return
0
;
}
uint8_t
Get_Dis_Tcs_Val
(
void
)
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
fdc9d78d
...
...
@@ -41,7 +41,7 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
//static void LED_Navigato_Execution(Tellib_uint16_t led_status);
Led_HighBeam_Count
HighBeam_Timer
;
//
Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t
LED_Battery_Voltage
=
0
;
Tellib_uint16_t
Battery_Voltage_valid
=
0
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
...
...
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