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
dc9948d0
Commit
dc9948d0
authored
Jul 31, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'CHENJIALE' into 'dev'
Chenjiale See merge request
!57
parents
816950cb
f8ad87c1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
213 additions
and
62 deletions
+213
-62
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+1
-8
Can_App.h
Firmware/Source/Application/CAN_User/Can_App.h
+1
-0
Can_User.c
Firmware/Source/Application/CAN_User/Can_User.c
+11
-3
Data_TPMS.c
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
+79
-32
Data_Fuel.c
Firmware/Source/Application/Fuel/Data_Fuel.c
+3
-3
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+104
-9
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+2
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+12
-6
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
dc9948d0
...
@@ -28,14 +28,7 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[])
...
@@ -28,14 +28,7 @@ void Can_Set_Buff_220(canlib_uint8_t CopyData[])
p220
->
Sig
.
CheckSum
=
(
Get_Dis_Tcs_Val
()
==
1
)
?
8
:
0
;
p220
->
Sig
.
CheckSum
=
(
Get_Dis_Tcs_Val
()
==
1
)
?
8
:
0
;
}
}
if
(
AliveCountTimer
<
7
)
{
AliveCountTimer
++
;
}
else
{
AliveCountTimer
=
0
;
}
}
}
void
Can_Set_Buff_6EE
(
canlib_uint8_t
CopyData
[])
void
Can_Set_Buff_6EE
(
canlib_uint8_t
CopyData
[])
...
...
Firmware/Source/Application/CAN_User/Can_App.h
View file @
dc9948d0
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include "Application.h"
#include "Application.h"
#include "Components.h"
#include "Components.h"
extern
uint16_t
AliveCountTimer
;
typedef
union
typedef
union
{
{
...
...
Firmware/Source/Application/CAN_User/Can_User.c
View file @
dc9948d0
...
@@ -242,7 +242,7 @@ void COM_CAN_Init(void)
...
@@ -242,7 +242,7 @@ void COM_CAN_Init(void)
memset
(
pTXBuff
,
0
,
sizeof
(
pTXBuff
));
memset
(
pTXBuff
,
0
,
sizeof
(
pTXBuff
));
CAN_CH0_CanMsgTxOp
.
CanMsg
=
(
st_CAN_SendOperation
*
)
pTXBuff
;
CAN_CH0_CanMsgTxOp
.
CanMsg
=
(
st_CAN_SendOperation
*
)
pTXBuff
;
Can_TX_BuffInit
(
&
CAN_CH0_CanMsgTxOp
,
CAN_CH0_CANSendAttr
,
CAN_CH0_ID_SEND_TOTAL
,
COM_APP_Process
);
Can_TX_BuffInit
(
&
CAN_CH0_CanMsgTxOp
,
CAN_CH0_CANSendAttr
,
CAN_CH0_ID_SEND_TOTAL
,
COM_APP_Process
);
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_
En
able
);
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_
Dis
able
);
}
}
...
@@ -341,7 +341,7 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
...
@@ -341,7 +341,7 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
break
;
break
;
case
0x450
:
case
0x450
:
if
(
Can_341_Flg
==
1
||
Common_GetIgnOnTime
()
>
2000
)
//
if(Can_341_Flg == 1 || Common_GetIgnOnTime() > 2000)
{
{
CAN_result
=
CAN_Transmit
(
CAN0MSG13
,
&
CAN_SendMsg
);
CAN_result
=
CAN_Transmit
(
CAN0MSG13
,
&
CAN_SendMsg
);
}
}
...
@@ -349,10 +349,18 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
...
@@ -349,10 +349,18 @@ uint8_t COM_APP_Process(st_CAN_Msg *Msg)
break
;
break
;
case
0x220
:
case
0x220
:
CAN_result
=
CAN_Transmit
(
CAN0MSG10
,
&
CAN_SendMsg
);
CAN_result
=
CAN_Transmit
(
CAN0MSG10
,
&
CAN_SendMsg
);
if
(
AliveCountTimer
<
7
)
{
AliveCountTimer
++
;
}
else
{
AliveCountTimer
=
0
;
}
break
;
break
;
#if (IC_Current == TY200_080000b_ty)
#if (IC_Current == TY200_080000b_ty)
case
0x580
:
case
0x580
:
if
(
Get_Tpms_TX_Flag
()
==
1
||
Get_Tpms_TX_Flag
()
==
2
)
if
(
Get_Tpms_TX_Flag
()
!=
0
)
{
{
CAN_result
=
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
CAN_result
=
CAN_Transmit
(
CAN0MSG14
,
&
CAN_SendMsg
);
}
}
...
...
Firmware/Source/Application/Data_TPMS/Data_TPMS.c
View file @
dc9948d0
...
@@ -11,7 +11,7 @@ void Data_TPMS_KL30_Init ( void )
...
@@ -11,7 +11,7 @@ void Data_TPMS_KL30_Init ( void )
Data_User_EEPROM_Read
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
Data_User_EEPROM_Read
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
MenuData
.
TPMS_Front_Learn
=
TPMS_L
[
0
];
MenuData
.
TPMS_Front_Learn
=
TPMS_L
[
0
];
MenuData
.
TPMS_Rear_Learn
=
TPMS_L
[
1
];
MenuData
.
TPMS_Rear_Learn
=
TPMS_L
[
1
];
//MenuData.TPMS_Front_FirstLearn_Flag = TPMS_L[2];
//MenuData.TPMS_Front_FirstLearn_Flag = TPMS_L[2];
//MenuData.TPMS_Rear_FirstLearn_Flag = TPMS_L[3];
//MenuData.TPMS_Rear_FirstLearn_Flag = TPMS_L[3];
TPMS
.
Front_Press_Value
=
0
;
TPMS
.
Front_Press_Value
=
0
;
TPMS
.
Rear_Press_Value
=
0
;
TPMS
.
Rear_Press_Value
=
0
;
...
@@ -26,8 +26,8 @@ void Data_TPMS_KL30_Init ( void )
...
@@ -26,8 +26,8 @@ void Data_TPMS_KL30_Init ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_LOST
=
0
;
TPMS
.
TPMS_LOST
=
0
;
LearnTime_Count
=
6001
;
LearnTime_Count
=
0
;
//
6001;
LearnTime_Count1
=
6001
;
LearnTime_Count1
=
0
;
//
6001;
Can_341_Flg
=
0
;
Can_341_Flg
=
0
;
}
}
...
@@ -45,10 +45,10 @@ void Data_TPMS_KL15_WAKE_UP_Init ( void )
...
@@ -45,10 +45,10 @@ void Data_TPMS_KL15_WAKE_UP_Init ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
MenuData
.
TPMS_Rear_FirstLearn_Flag
;
TPMS
.
TPMS_LOST
=
0
;
TPMS
.
TPMS_LOST
=
0
;
LearnTime_Count
=
6001
;
LearnTime_Count
=
0
;
//
6001;
LearnTime_Count1
=
6001
;
LearnTime_Count1
=
0
;
//
6001;
Can_341_Flg
=
0
;
Can_341_Flg
=
0
;
}
}
void
Can_341_Receive
(
void
)
void
Can_341_Receive
(
void
)
...
@@ -74,6 +74,35 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -74,6 +74,35 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Rear_Learn
=
MenuData
.
TPMS_Rear_Learn
;
TPMS
.
TPMS_Rear_Learn
=
MenuData
.
TPMS_Rear_Learn
;
TPMS
.
TPMS_LOST
=
0
;
TPMS
.
TPMS_LOST
=
0
;
}
}
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x373_Msg_Count
)
!=
CAN_SIG_LOST
)
{
if
((
Get_CAN_CH0_ID_373_Sig_Rear_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Rear_id
()
!=
0xFFFFFFFF
))
{
TPMS
.
TPMS_Rear_ID_Value
=
1
;
//TPMS.TPMS_Rear_Learn = LearningCompletion;
}
else
{
TPMS
.
TPMS_Rear_ID_Value
=
0
;
}
if
((
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0xFFFFFFFF
))
{
TPMS
.
TPMS_Front_ID_Value
=
1
;
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
else
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
}
}
else
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
TPMS
.
TPMS_Rear_ID_Value
=
0
;
}
if
(
TPMS
.
TPMS_Front_Learn
==
0x0
)
if
(
TPMS
.
TPMS_Front_Learn
==
0x0
)
...
@@ -112,6 +141,16 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -112,6 +141,16 @@ void Data_TPMS_Processing_Service ( void )
}
}
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x1
)
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x1
)
{
{
//if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
//{
// TPMS.TPMS_Front_ID_Value = 1;
// //TPMS.TPMS_Front_Learn = LearningCompletion;
//}
//else
//{
// TPMS.TPMS_Front_ID_Value = 0;
//}
if
(
TPMS
.
TPMS_Front_Timeclean
==
0
)
if
(
TPMS
.
TPMS_Front_Timeclean
==
0
)
{
{
LearnTime_Count
=
0
;
LearnTime_Count
=
0
;
...
@@ -144,15 +183,15 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -144,15 +183,15 @@ void Data_TPMS_Processing_Service ( void )
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x2
)
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x2
)
{
{
LearnTime_Count
=
0
;
LearnTime_Count
=
0
;
if
((
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0
)
&&
(
Get_CAN_CH0_ID_373_Sig_Front_id
()
!=
0xFFFFFFFF
))
//
if((Get_CAN_CH0_ID_373_Sig_Front_id() != 0) && (Get_CAN_CH0_ID_373_Sig_Front_id() != 0xFFFFFFFF))
{
//
{
TPMS
.
TPMS_Front_ID_Value
=
1
;
//
TPMS.TPMS_Front_ID_Value = 1;
//TPMS.TPMS_Front_Learn = LearningCompletion;
//
//TPMS.TPMS_Front_Learn = LearningCompletion;
}
//
}
else
//
else
{
//
{
TPMS
.
TPMS_Front_ID_Value
=
0
;
//
TPMS.TPMS_Front_ID_Value = 0;
}
//
}
}
}
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x3
)
else
if
(
TPMS
.
TPMS_Front_Learn
==
0x3
)
...
@@ -170,7 +209,7 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -170,7 +209,7 @@ void Data_TPMS_Processing_Service ( void )
{
{
if
(
LearnTime_Count1
<=
6000
)
if
(
LearnTime_Count1
<=
6000
)
{
{
LearnTime_Count1
=
0
;
LearnTime_Count1
++
;
//
= 0;
TPMS
.
TPMS_Rear_Learn
=
Unstudied
;
TPMS
.
TPMS_Rear_Learn
=
Unstudied
;
}
}
else
else
...
@@ -199,6 +238,12 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -199,6 +238,12 @@ void Data_TPMS_Processing_Service ( void )
}
}
else
if
(
TPMS
.
TPMS_Rear_Learn
==
0x1
)
else
if
(
TPMS
.
TPMS_Rear_Learn
==
0x1
)
{
{
if
(
TPMS
.
TPMS_Rear_Timeclean
==
0
)
{
LearnTime_Count1
=
0
;
}
TPMS
.
TPMS_Rear_Timeclean
=
1
;
if
(
LearnTime_Count1
<=
6000
)
if
(
LearnTime_Count1
<=
6000
)
{
{
LearnTime_Count1
++
;
LearnTime_Count1
++
;
...
@@ -206,11 +251,7 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -206,11 +251,7 @@ void Data_TPMS_Processing_Service ( void )
}
}
else
else
{
{
if
(
TPMS
.
TPMS_Rear_Timeclean
==
0
)
{
LearnTime_Count1
=
0
;
}
TPMS
.
TPMS_Rear_Timeclean
=
1
;
if
((
MenuData
.
TPMS_Rear_Learn
!=
0x2
)
&&
(
MenuData
.
TPMS_Rear_Learn
!=
0x3
)
)
if
((
MenuData
.
TPMS_Rear_Learn
!=
0x2
)
&&
(
MenuData
.
TPMS_Rear_Learn
!=
0x3
)
)
{
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x341_Msg_Count
)
!=
CAN_SIG_LOST
)
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x341_Msg_Count
)
!=
CAN_SIG_LOST
)
...
@@ -265,23 +306,26 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -265,23 +306,26 @@ void Data_TPMS_Processing_Service ( void )
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
1
;
TPMS
.
TPMS_Rear_FirstLearn_Flag
=
1
;
}
}
if
((
TPMS
.
TPMS_Front_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Front_Learn
==
0x3
))
//
if((TPMS.TPMS_Front_Learn == 0x2) || (TPMS.TPMS_Front_Learn == 0x3))
{
//
{
MenuData
.
TPMS_Front_Learn
=
TPMS
.
TPMS_Front_Learn
;
//
MenuData.TPMS_Front_Learn = TPMS.TPMS_Front_Learn;
}
//
}
if
((
TPMS
.
TPMS_Rear_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Rear_Learn
==
0x3
))
//
if((TPMS.TPMS_Rear_Learn == 0x2) || (TPMS.TPMS_Rear_Learn == 0x3))
{
//
{
MenuData
.
TPMS_Rear_Learn
=
TPMS
.
TPMS_Rear_Learn
;
//
MenuData.TPMS_Rear_Learn = TPMS.TPMS_Rear_Learn;
}
//
}
if
(((
TPMS
.
TPMS_Front_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Front_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Front_Learn
!=
MenuData
.
TPMS_Front_Learn
))
if
(((
TPMS
.
TPMS_Front_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Front_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Front_Learn
!=
MenuData
.
TPMS_Front_Learn
))
{
{
MenuData
.
TPMS_Front_Learn
=
TPMS
.
TPMS_Front_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
}
}
if
(
((
TPMS
.
TPMS_Rear_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Rear_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Rear_Learn
!=
MenuData
.
TPMS_Rear_Learn
))
if
(
((
TPMS
.
TPMS_Rear_Learn
==
0x2
)
||
(
TPMS
.
TPMS_Rear_Learn
==
0x3
))
&&
(
TPMS
.
TPMS_Rear_Learn
!=
MenuData
.
TPMS_Rear_Learn
))
{
{
MenuData
.
TPMS_Rear_Learn
=
TPMS
.
TPMS_Rear_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
TPMS_L
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
(
uint32_t
*
)
TPMS_L
,
1u
);
...
@@ -320,7 +364,8 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -320,7 +364,8 @@ void Data_TPMS_Processing_Service ( void )
{
{
TPMS
.
Rear_Press_Value
=
9900
;
TPMS
.
Rear_Press_Value
=
9900
;
}
}
if
(((
TPMS
.
Rear_Press_Value
+
50
)
<
1700
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
>
2500
))
//if(((TPMS.Rear_Press_Value + 50)< 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
if
((
Get_Rear_TPMS_Sig_Value
()
<
17
)
||
(
Get_Rear_TPMS_Sig_Value
()
>
25
))
{
{
TPMS
.
TPMS_Warning
=
1
;
TPMS
.
TPMS_Warning
=
1
;
}
}
...
@@ -340,7 +385,8 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -340,7 +385,8 @@ void Data_TPMS_Processing_Service ( void )
{
{
TPMS
.
Front_Press_Value
=
9900
;
TPMS
.
Front_Press_Value
=
9900
;
}
}
if
(((
TPMS
.
Front_Press_Value
+
50
)
<
1700
)
||
((
TPMS
.
Front_Press_Value
+
50
)
>
2300
))
//if(((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300))
if
((
Get_Front_TPMS_Sig_Value
()
<
17
)
||
(
Get_Front_TPMS_Sig_Value
()
>
25
))
{
{
TPMS
.
TPMS_Warning
=
1
;
TPMS
.
TPMS_Warning
=
1
;
}
}
...
@@ -375,7 +421,8 @@ void Data_TPMS_Processing_Service ( void )
...
@@ -375,7 +421,8 @@ void Data_TPMS_Processing_Service ( void )
{
{
TPMS
.
Rear_Press_Value
=
9900
;
TPMS
.
Rear_Press_Value
=
9900
;
}
}
if
(((
TPMS
.
Front_Press_Value
+
50
)
<
1700
)
||
((
TPMS
.
Front_Press_Value
+
50
)
>
2300
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
<
1700
)
||
((
TPMS
.
Rear_Press_Value
+
50
)
>
2500
))
//if (((TPMS.Front_Press_Value + 50) < 1700) || ((TPMS.Front_Press_Value + 50) > 2300) || ((TPMS.Rear_Press_Value + 50) < 1700) || ((TPMS.Rear_Press_Value + 50) > 2500))
if
((
Get_Front_TPMS_Sig_Value
()
<
17
)
||
(
Get_Front_TPMS_Sig_Value
()
>
25
)
||
(
Get_Rear_TPMS_Sig_Value
()
<
17
)
||
(
Get_Rear_TPMS_Sig_Value
()
>
25
))
{
{
TPMS
.
TPMS_Warning
=
1
;
TPMS
.
TPMS_Warning
=
1
;
}
}
...
...
Firmware/Source/Application/Fuel/Data_Fuel.c
View file @
dc9948d0
...
@@ -35,7 +35,7 @@ void Fuel_KL30_Init(void)
...
@@ -35,7 +35,7 @@ void Fuel_KL30_Init(void)
FuelInitFlag
=
1u
;
FuelInitFlag
=
1u
;
FuelStateInitFlag
=
1u
;
FuelStateInitFlag
=
1u
;
FuelDir
=
FUEL_SEG_UP
;
FuelDir
=
FUEL_SEG_UP
;
FuelSensorState
=
FuelSensorNormal
;
FuelSensorState
=
FuelSensor
ShortCircuit
;
//FuelSensor
Normal;
FuelSensorNormalTime
=
0u
;
FuelSensorNormalTime
=
0u
;
FuelSensorShortTime
=
0u
;
FuelSensorShortTime
=
0u
;
FuelSensorOpenTime
=
0u
;
FuelSensorOpenTime
=
0u
;
...
@@ -51,7 +51,7 @@ void Fuel_KL15_Init(void)
...
@@ -51,7 +51,7 @@ void Fuel_KL15_Init(void)
FuelInitFlag
=
1u
;
FuelInitFlag
=
1u
;
FuelStateInitFlag
=
1u
;
FuelStateInitFlag
=
1u
;
FuelDir
=
FUEL_SEG_UP
;
FuelDir
=
FUEL_SEG_UP
;
FuelSensorState
=
FuelSensorNormal
;
FuelSensorState
=
FuelSensor
ShortCircuit
;
//FuelSensor
Normal;
FuelSensorNormalTime
=
0u
;
FuelSensorNormalTime
=
0u
;
FuelSensorShortTime
=
0u
;
FuelSensorShortTime
=
0u
;
FuelSensorOpenTime
=
0u
;
FuelSensorOpenTime
=
0u
;
...
@@ -384,7 +384,7 @@ uint16_t Get_Fuel_RES(void)
...
@@ -384,7 +384,7 @@ uint16_t Get_Fuel_RES(void)
uint16_t
Fuel_Res
=
0
;
uint16_t
Fuel_Res
=
0
;
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorShortCircuit
)
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorShortCircuit
)
{
{
Fuel_Res
=
3
;
Fuel_Res
=
0
;
}
}
else
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorOpenCircuit
)
else
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorOpenCircuit
)
{
{
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
dc9948d0
...
@@ -2724,9 +2724,34 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1, uint8_t m_valid1
...
@@ -2724,9 +2724,34 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1, uint8_t m_valid1
}
}
else
if
(
learnflag
==
3
)
else
if
(
learnflag
==
3
)
{
{
//if (FLASH_SYNC_1Hz)
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_SEG143
=
IC_SEG_OFF
;
IC2_SEG141
=
IC_SEG_OFF
;
IC2_SEG139
=
IC_SEG_OFF
;
IC2_SEG146
=
IC_SEG_OFF
;
IC2_SEG145
=
IC_SEG_OFF
;
IC2_SEG144
=
IC_SEG_OFF
;
IC2_SEG135
=
IC_SEG_OFF
;
IC2_SEG134
=
IC_SEG_OFF
;
IC2_SEG132
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
else
{
IC2_SEG138
=
IC_SEG_ON
;
IC2_SEG138
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
IC2_SEG140
=
IC_SEG_ON
;
...
@@ -2745,6 +2770,28 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1, uint8_t m_valid1
...
@@ -2745,6 +2770,28 @@ void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1, uint8_t m_valid1
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG131
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG137
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
IC2_SEG136
=
IC_SEG_OFF
;
}
//if (FLASH_SYNC_1Hz)
//{
// IC2_SEG138 = IC_SEG_ON;
//
// IC2_SEG140 = IC_SEG_ON;
// IC2_SEG133 = IC_SEG_ON;
//
// IC2_SEG143 = IC_SEG_OFF;
// IC2_SEG141 = IC_SEG_OFF;
// IC2_SEG139 = IC_SEG_OFF;
// IC2_SEG146 = IC_SEG_OFF;
// IC2_SEG145 = IC_SEG_OFF;
// IC2_SEG144 = IC_SEG_OFF;
//
// IC2_SEG135 = IC_SEG_OFF;
// IC2_SEG134 = IC_SEG_OFF;
// IC2_SEG132 = IC_SEG_OFF;
// IC2_SEG131 = IC_SEG_OFF;
// IC2_SEG137 = IC_SEG_OFF;
// IC2_SEG136 = IC_SEG_OFF;
//}
//}
//else
//else
//{
//{
...
@@ -3180,12 +3227,34 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2, uint8_t m_valid2)
...
@@ -3180,12 +3227,34 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2, uint8_t m_valid2)
}
}
else
if
(
learnflag
==
3
)
else
if
(
learnflag
==
3
)
{
{
//IC2_SEG118 = IC_SEG_ON;
if
(
Get_Current_PageType
()
==
Page_Rear_Tpms
)
//IC2_SEG120 = IC_SEG_ON;
{
//IC2_SEG113 = IC_SEG_ON;
if
(
FLASH_SYNC_1Hz
)
{
//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_SEG123
=
IC_SEG_OFF
;
IC2_SEG121
=
IC_SEG_OFF
;
IC2_SEG119
=
IC_SEG_OFF
;
IC2_SEG126
=
IC_SEG_OFF
;
IC2_SEG125
=
IC_SEG_OFF
;
IC2_SEG124
=
IC_SEG_OFF
;
IC2_SEG115
=
IC_SEG_OFF
;
IC2_SEG114
=
IC_SEG_OFF
;
IC2_SEG112
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
else
{
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG120
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
IC2_SEG113
=
IC_SEG_ON
;
...
@@ -3205,6 +3274,32 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2, uint8_t m_valid2)
...
@@ -3205,6 +3274,32 @@ void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2, uint8_t m_valid2)
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG111
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG117
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
IC2_SEG116
=
IC_SEG_OFF
;
}
//IC2_SEG118 = IC_SEG_ON;
//IC2_SEG120 = IC_SEG_ON;
//IC2_SEG113 = IC_SEG_ON;
//if (FLASH_SYNC_1Hz)
//{
// IC2_SEG120 = IC_SEG_ON;
// IC2_SEG113 = IC_SEG_ON;
//
// IC2_SEG118 = IC_SEG_ON;
//
//
// IC2_SEG123 = IC_SEG_OFF;
// IC2_SEG121 = IC_SEG_OFF;
// IC2_SEG119 = IC_SEG_OFF;
// IC2_SEG126 = IC_SEG_OFF;
// IC2_SEG125 = IC_SEG_OFF;
// IC2_SEG124 = IC_SEG_OFF;
//
// IC2_SEG115 = IC_SEG_OFF;
// IC2_SEG114 = IC_SEG_OFF;
// IC2_SEG112 = IC_SEG_OFF;
// IC2_SEG111 = IC_SEG_OFF;
// IC2_SEG117 = IC_SEG_OFF;
// IC2_SEG116 = IC_SEG_OFF;
//}
//}
//else
//else
//{
//{
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
dc9948d0
...
@@ -49,7 +49,7 @@ static void Power_KL30_Init(void)
...
@@ -49,7 +49,7 @@ static void Power_KL30_Init(void)
Gpio_Init
(
Gpio_KL30_Init
);
Gpio_Init
(
Gpio_KL30_Init
);
eeprom_StoreInfo_Init
();
eeprom_StoreInfo_Init
();
Can_Init
();
Can_Init
();
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
DFlash_init
();
DFlash_init
();
Data_Read_DiagPara
();
Data_Read_DiagPara
();
Analog_Signal_Conv_Init
();
Analog_Signal_Conv_Init
();
...
@@ -94,6 +94,7 @@ static void Power_KL30_Init(void)
...
@@ -94,6 +94,7 @@ static void Power_KL30_Init(void)
FaultCode_Init
();
FaultCode_Init
();
CAN_TX_Count_Init
();
CAN_TX_Count_Init
();
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
}
}
extern
uint32_t
PowerIgnOffTimeLine
;
extern
uint32_t
PowerIgnOffTimeLine
;
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
dc9948d0
...
@@ -36,15 +36,19 @@ void Sys_2ms_Tasks(void)
...
@@ -36,15 +36,19 @@ void Sys_2ms_Tasks(void)
void
Sys_5ms_Tasks
(
void
)
void
Sys_5ms_Tasks
(
void
)
{
{
Flash_Sync_Signal_Generation_Service
();
Flash_Sync_Signal_Generation_Service
();
}
}
//uint8_t ljs_buf[200] = {0};
//uint8_t ljs_buf[200] = {0};
void
Sys_10ms_Tasks
(
void
)
void
Sys_10ms_Tasks
(
void
)
{
{
//memset(ljs_buf, 0x55, 200);
//memset(ljs_buf, 0x55, 200);
Line_In_Debounce_Service
(
10u
);
Line_In_Debounce_Service
(
10u
);
Key_Service
();
if
(
Common_GetIgnOnTime
()
>=
3000
)
{
Key_Service
();
}
Data_Mileage_Write_EEPROM
();
Data_Mileage_Write_EEPROM
();
Can_BusOff_Recover
(
10u
);
Can_BusOff_Recover
(
10u
);
Turn_Left_Right_Lamp
();
Turn_Left_Right_Lamp
();
...
@@ -55,7 +59,7 @@ void Sys_10ms_Tasks(void)
...
@@ -55,7 +59,7 @@ void Sys_10ms_Tasks(void)
Protocol_Send_Service
();
Protocol_Send_Service
();
//Uart0_IntSend(ljs_buf, 200) ;
//Uart0_IntSend(ljs_buf, 200) ;
FaultCode_Service
(
10u
);
FaultCode_Service
(
10u
);
}
}
void
Sys_20ms_Tasks
(
void
)
void
Sys_20ms_Tasks
(
void
)
{
{
...
@@ -66,12 +70,12 @@ void Sys_20ms_Tasks(void)
...
@@ -66,12 +70,12 @@ void Sys_20ms_Tasks(void)
Data_Coolant_Temp_Processing_Service
();
Data_Coolant_Temp_Processing_Service
();
//Data_Voltage_Processing_Service();
//Data_Voltage_Processing_Service();
BU98R10_Update_Request
();
}
}
void
Sys_50ms_Tasks
(
void
)
void
Sys_50ms_Tasks
(
void
)
{
{
BU98R10_Update_Request
();
//
BU98R10_Update_Request();
LED_Driver_Scan_Refresh
();
LED_Driver_Scan_Refresh
();
Telltales_Management
();
Telltales_Management
();
Gauge_Service
();
Gauge_Service
();
...
@@ -110,6 +114,8 @@ void Sys_100ms_Tasks(void)
...
@@ -110,6 +114,8 @@ void Sys_100ms_Tasks(void)
}
}
Clear_Navigation_St
();
Clear_Navigation_St
();
//R_test = ADC_Read_Signal(ADC_CH_FUEL1);
}
}
...
...
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