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
490dac50
Commit
490dac50
authored
Oct 21, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整指示灯
parent
0d1dff89
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
23279 additions
and
24009 deletions
+23279
-24009
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+22010
-22009
project.siz
ghs/project.siz
+2
-2
Data_CoolantTemperature.c
...ion/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
+138
-140
Data_Fuel_User.c
source/Application/APP/Data_Fuel/Data_Fuel_User.c
+342
-347
FuelConfig.h
source/Application/APP/Data_Fuel/FuelConfig.h
+115
-116
Speed_PPK_Out.c
source/Application/APP/Data_SpeedOut/Speed_PPK_Out.c
+1
-1
Data_VehicleSpeed.c
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
+4
-22
GaugesDataAnalysis.c
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
+2
-2
GaugesInterface.c
source/Application/APP/GaugesMode/GaugesInterface.c
+1
-1
Key.c
source/Application/APP/Key/Key.c
+32
-20
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+617
-746
Popup_Lib.h
source/Application/Alarm/Popup_Lib.h
+1
-1
DisplaySch.c
source/Application/Graphic/UE/DisplaySch.c
+0
-594
GPIO.h
source/Driver/GPIO/GPIO.h
+3
-2
TimerB.c
source/Driver/Timer/TimerB.c
+2
-2
init.c
source/System/init.c
+7
-3
tasks.c
source/System/tasks.c
+2
-1
No files found.
ghs/project
View file @
490dac50
No preview for this file type
ghs/project.hex
View file @
490dac50
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ghs/project.siz
View file @
490dac50
project .intvect 1536
project .text 299
276
project .text 299
324
project .rodata 412383
project .secinfo 120
project .syscall 6
project .romdata 78
61
project .romdata 78
53
project .ROM.ramfunc 208
project .ramfunc 208
source/Application/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
View file @
490dac50
...
...
@@ -11,12 +11,12 @@
//-------------------------------------------
static
struct
{
uint8_t
Value
;
uint8_t
Valid
;
uint8_t
CurSeg
;
}
CoolantVariable
;
uint8_t
Value
;
uint8_t
Valid
;
uint8_t
CurSeg
;
}
CoolantVariable
;
static
uint8_t
CalCoolant_CurSeg
(
uint8_t
Valid
,
uint8_t
Temp
);
static
uint8_t
CalCoolant_CurSeg
(
uint8_t
Valid
,
uint8_t
Temp
);
static
uint8_t
CalCoolant_TarSeg
(
uint16_t
CanMsg
);
/*-------------------------------------------------------------------------
* Function Name : Coolant_KL30_Init
...
...
@@ -28,34 +28,34 @@ static uint8_t CalCoolant_TarSeg(uint16_t CanMsg);
--------------------------------------------------------------------------*/
void
Coolant_KL30_Init
(
void
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
}
void
Coolant_KL15_ON_Init
(
void
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
}
void
Coolant_KL15_OFF_Init
(
void
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
}
void
Coolant_Wakeup_Init
(
void
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
}
void
Coolant_Sleep_Init
(
void
)
{
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0
;
CoolantVariable
.
CurSeg
=
0
;
}
/*-------------------------------------------------------------------------
* Function Name : Coolant_Processing_Service
...
...
@@ -68,56 +68,57 @@ void Coolant_Sleep_Init(void)
static
uint8_t
wbyTestSeg
=
0
;
void
Coolant_Processing_Service
(
void
)
{
static
uint8_t
Timer2s
=
0
;
static
uint8_t
Timer2s
=
0
;
uint8_t
TargetSeg
=
0
;
uint8_t
TargetSeg
=
0
;
uint8_t
Msg_CoolTemp
=
0
;
uint8_t
Msg_CoolTemp
=
0
;
if
(
CAN_MSG_Status
(
ID_CanMsg18FEEE00_Msg_Count
)
==
0x55u
)
{
//timeout
CoolantVariable
.
Valid
=
0
;
Timer2s
=
0
;
}
else
{
Msg_CoolTemp
=
Get_ID_18FEEE00_Sig_Engine_Coolant_Temperature
();
if
(
Msg_CoolTemp
>
0xFA
)
{
//if(Timer2s < 100)
//{
// Timer2s ++ ;
//}
//else
{
CoolantVariable
.
Valid
=
0
;
}
}
else
{
Timer2s
=
0
;
CoolantVariable
.
Valid
=
1
;
CoolantVariable
.
Value
=
Msg_CoolTemp
;
if
(
CAN_MSG_Status
(
ID_CanMsg18FEEE00_Msg_Count
)
==
0x55u
)
{
//timeout
CoolantVariable
.
Valid
=
0
;
Timer2s
=
0
;
}
else
{
Msg_CoolTemp
=
Get_ID_18FEEE00_Sig_Engine_Coolant_Temperature
();
TargetSeg
=
CalCoolant_TarSeg
(
Msg_CoolTemp
);
}
}
if
(
Msg_CoolTemp
>
0xFA
)
{
//if(Timer2s < 100)
//{
// Timer2s ++ ;
//}
//else
{
CoolantVariable
.
Valid
=
0
;
}
}
else
{
Timer2s
=
0
;
CoolantVariable
.
Valid
=
1
;
CoolantVariable
.
Value
=
Msg_CoolTemp
;
TargetSeg
=
CalCoolant_TarSeg
(
Msg_CoolTemp
);
}
}
if
(
Msg_CoolTemp
<
40
)
{
Msg_CoolTemp
=
0
;
}
else
{
Msg_CoolTemp
-=
40
;
}
//CoolantVariable.CurSeg = CalCoolant_CurSeg(CoolantVariable.Valid,Msg_CoolTemp);
//TargetSeg - 目标段
//CoolantVariable.Valid - 有效值
//CoolantVariable.CurSeg - 当前段
CoolantVariable
.
CurSeg
=
Coolant_Temp_Filter
(
TargetSeg
,
CoolantVariable
.
Valid
);
if
(
Msg_CoolTemp
<
40
)
{
Msg_CoolTemp
=
0
;
}
else
{
Msg_CoolTemp
-=
40
;
}
//CoolantVariable.CurSeg = CalCoolant_CurSeg(CoolantVariable.Valid,Msg_CoolTemp);
//TargetSeg - 目标段
//CoolantVariable.Valid - 有效值
//CoolantVariable.CurSeg - 当前段
CoolantVariable
.
CurSeg
=
Coolant_Temp_Filter
(
TargetSeg
,
CoolantVariable
.
Valid
);
}
/*-------------------------------------------------------------------------
* Function Name : CalCoolant_TarSeg
...
...
@@ -129,61 +130,61 @@ void Coolant_Processing_Service(void)
--------------------------------------------------------------------------*/
static
uint8_t
CalCoolant_TarSeg
(
uint16_t
CanMsg
)
{
uint8_t
TargetSeg
=
0
;
if
(
CanMsg
>=
0x00
&&
CanMsg
<=
0x59
)
{
TargetSeg
=
0
;
}
if
(
CanMsg
>=
0x5A
&&
CanMsg
<=
0x5E
)
{
TargetSeg
=
1
;
}
if
(
CanMsg
>=
0x5F
&&
CanMsg
<=
0x64
)
{
TargetSeg
=
2
;
}
if
(
CanMsg
>=
0x65
&&
CanMsg
<=
0x69
)
{
TargetSeg
=
3
;
}
if
(
CanMsg
>=
0x6A
&&
CanMsg
<=
0x6F
)
{
TargetSeg
=
4
;
}
if
(
CanMsg
>=
0x70
&&
CanMsg
<=
0x74
)
{
TargetSeg
=
5
;
}
if
(
CanMsg
>=
0x75
&&
CanMsg
<=
0x8D
)
{
TargetSeg
=
6
;
}
if
(
CanMsg
>=
0x8E
&&
CanMsg
<=
0x8F
)
{
TargetSeg
=
7
;
}
if
(
CanMsg
>=
0x90
&&
CanMsg
<=
0x91
)
{
TargetSeg
=
8
;
}
if
(
CanMsg
>=
0x92
&&
CanMsg
<=
0x93
)
{
TargetSeg
=
9
;
}
if
(
CanMsg
>=
0x94
&&
CanMsg
<=
0x95
)
{
TargetSeg
=
10
;
}
if
(
CanMsg
==
0x96
)
{
TargetSeg
=
11
;
}
if
(
CanMsg
>=
0x97
)
{
TargetSeg
=
12
;
}
uint8_t
TargetSeg
=
0
;
if
(
CanMsg
>=
0x00
&&
CanMsg
<=
0x59
)
{
TargetSeg
=
0
;
}
if
(
CanMsg
>=
0x5A
&&
CanMsg
<=
0x5E
)
{
TargetSeg
=
1
;
}
if
(
CanMsg
>=
0x5F
&&
CanMsg
<=
0x64
)
{
TargetSeg
=
2
;
}
if
(
CanMsg
>=
0x65
&&
CanMsg
<=
0x69
)
{
TargetSeg
=
3
;
}
if
(
CanMsg
>=
0x6A
&&
CanMsg
<=
0x6F
)
{
TargetSeg
=
4
;
}
if
(
CanMsg
>=
0x70
&&
CanMsg
<=
0x74
)
{
TargetSeg
=
5
;
}
if
(
CanMsg
>=
0x75
&&
CanMsg
<=
0x8D
)
{
TargetSeg
=
6
;
}
if
(
CanMsg
>=
0x8E
&&
CanMsg
<=
0x8F
)
{
TargetSeg
=
7
;
}
if
(
CanMsg
>=
0x90
&&
CanMsg
<=
0x91
)
{
TargetSeg
=
8
;
}
if
(
CanMsg
>=
0x92
&&
CanMsg
<=
0x93
)
{
TargetSeg
=
9
;
}
if
(
CanMsg
>=
0x94
&&
CanMsg
<=
0x95
)
{
TargetSeg
=
10
;
}
if
(
CanMsg
==
0x96
)
{
TargetSeg
=
11
;
}
if
(
CanMsg
>=
0x97
)
{
TargetSeg
=
12
;
}
return
TargetSeg
;
return
TargetSeg
;
}
/*-------------------------------------------------------------------------
* Function Name : CalCoolant_CurSeg
...
...
@@ -193,22 +194,22 @@ static uint8_t CalCoolant_TarSeg(uint16_t CanMsg)
* Return : None
* onther : None
--------------------------------------------------------------------------*/
static
uint8_t
CalCoolant_CurSeg
(
uint8_t
Valid
,
uint8_t
Temp
)
static
uint8_t
CalCoolant_CurSeg
(
uint8_t
Valid
,
uint8_t
Temp
)
{
uint8_t
u8Result
=
0u
;
uint8_t
u8Result
=
0u
;
if
(
Valid
)
{
SetGaugesPara
(
TempGauges
,
Temp
);
u8Result
=
GetGaugesCurrentPos
(
TempGauges
)
;
}
else
{
//范围外/CAN中断
u8Result
=
0
;
}
if
(
Valid
)
{
SetGaugesPara
(
TempGauges
,
Temp
);
u8Result
=
GetGaugesCurrentPos
(
TempGauges
)
;
}
else
{
//范围外/CAN中断
u8Result
=
0
;
}
return
u8Result
;
return
u8Result
;
}
/*-------------------------------------------------------------------------
* Function Name : Coolant_Get_ActualValue
...
...
@@ -221,12 +222,12 @@ static uint8_t CalCoolant_CurSeg(uint8_t Valid,uint8_t Temp)
uint8_t
Coolant_Get_ActualValue
(
void
)
{
uint8_t
u8Result
=
0u
;
u8Result
=
CoolantVariable
.
Value
;
u8Result
=
CoolantVariable
.
Value
;
return
u8Result
;
}
/*-------------------------------------------------------------------------
* Function Name : Coolant_Get_Valid
* Description :
* Description :
* Input : None
* Output : None
* Return : None
...
...
@@ -235,7 +236,7 @@ uint8_t Coolant_Get_ActualValue(void)
uint8_t
Coolant_Get_Valid
(
void
)
{
uint8_t
u8Result
=
0u
;
u8Result
=
CoolantVariable
.
Valid
;
u8Result
=
CoolantVariable
.
Valid
;
return
u8Result
;
}
/*-------------------------------------------------------------------------
...
...
@@ -249,9 +250,6 @@ uint8_t Coolant_Get_Valid(void)
uint8_t
Coolant_Get_CurSeg
(
void
)
{
uint8_t
u8Result
=
0u
;
u8Result
=
CoolantVariable
.
CurSeg
;
u8Result
=
CoolantVariable
.
CurSeg
;
return
u8Result
;
}
}
\ No newline at end of file
source/Application/APP/Data_Fuel/Data_Fuel_User.c
View file @
490dac50
...
...
@@ -12,20 +12,20 @@
/*----------------------------------------------------------------------------------------------------------------------
格 0 1 2 3 4 5 6 7 8 9 10 11 12
阻值(Up) - 144.5 126.5 108.1 90.9 75.7 60.6 47.3 38.2 29.1 21 15.5 9.9
step 13 23 33 43 52 61 68 73 79 83 86 90
阻值(Down) 150 137.3 119.1 100.9 84.8 69.7 54.5 43.6 34.5 25.4 18.8 13.2 -
阻值(Down) 150 137.3 119.1 100.9 84.8 69.7 54.5 43.6 34.5 25.4 18.8 13.2 -
step 0 17 27 38 47 55 64 70 76 81 84 88
*-----------------------------------------------------------------------------------------------------------------------*/
static
const
UP_TABLE
[
13U
]
=
{
10U
,
13U
,
23U
,
33U
,
43U
,
52U
,
61U
,
68U
,
73U
,
79U
,
83U
,
86U
,
90U
};
static
const
DOWN_TABLE
[
13U
]
=
{
10U
,
17U
,
27U
,
38U
,
47U
,
55U
,
64U
,
70U
,
76U
,
81U
,
84U
,
88U
,
90U
};
*-----------------------------------------------------------------------------------------------------------------------*/
static
const
UP_TABLE
[
13U
]
=
{
10U
,
13U
,
23U
,
33U
,
43U
,
52U
,
61U
,
68U
,
73U
,
79U
,
83U
,
86U
,
90U
};
static
const
DOWN_TABLE
[
13U
]
=
{
10U
,
17U
,
27U
,
38U
,
47U
,
55U
,
64U
,
70U
,
76U
,
81U
,
84U
,
88U
,
90U
};
static
uint8_t
Fuel_CurSeg
=
0
;
...
...
@@ -34,7 +34,7 @@ static uint8_t CalFuel_CurSeg(uint8_t Step);
#define BASEFUELVAL 3500 //3.0L底油
/*-------------------------------------------------------------------------
* Function Name : Fuel_User_KL30_Init
* Description :
* Description :
* Input : None
* Output : None
* Return : None
...
...
@@ -42,58 +42,53 @@ static uint8_t CalFuel_CurSeg(uint8_t Step);
--------------------------------------------------------------------------*/
void
Fuel_User_KL30_Init
(
void
)
{
FuelStruct
FuelInit
;
AFC_INIT
AFCInit
;
FuelInit
.
FuelShortCircuitR
=
30
;
FuelInit
.
FuelOpenCircuitR
=
3000
;
// //delta 1500 / 8 = 175
FuelInit
.
DisplayZoneBoundary
[
0
]
=
3000
;
// 0 step
FuelInit
.
DisplayZoneBoundary
[
1
]
=
1500
;
// 10 step
FuelInit
.
DisplayZoneBoundary
[
2
]
=
1325
;
// 20 step
FuelInit
.
DisplayZoneBoundary
[
3
]
=
1150
;
// 30 step
FuelInit
.
DisplayZoneBoundary
[
4
]
=
975
;
// 40 step
FuelInit
.
DisplayZoneBoundary
[
5
]
=
800
;
// 50 step
FuelInit
.
DisplayZoneBoundary
[
6
]
=
625
;
// 60 step
FuelInit
.
DisplayZoneBoundary
[
7
]
=
450
;
// 70 step
FuelInit
.
DisplayZoneBoundary
[
8
]
=
275
;
// 80 step
FuelInit
.
DisplayZoneBoundary
[
9
]
=
99
;
// 90 step
FuelInit
.
DisplayZoneBoundary
[
10
]
=
30
;
// 90 step
FuelInit
.
FuelCapacityBoundary
[
0
]
=
0
;
//燃油数据条初始化
FuelInit
.
FuelCapacityBoundary
[
1
]
=
3500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
2
]
=
11500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
3
]
=
19500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
4
]
=
27000
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
5
]
=
37000
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
6
]
=
44500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
7
]
=
52000
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
8
]
=
60500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
9
]
=
67500
-
BASEFUELVAL
;
FuelInit
.
FuelCapacityBoundary
[
10
]
=
70000
-
BASEFUELVAL
;
InitFuelParamter
(
&
FuelInit
);
AFCInit
.
CalcAFCMaxNum
=
50
;
AFCInit
.
AFCMin
=
30
;
AFCInit
.
AFCMax
=
199
;
AFCInit
.
AFCPreinstall
=
75
;
AFCInit
.
CurODO
=
Data_ODO_Read
()
*
100
;
AFCInit
.
MaxDRMileage
=
69900
;
InitAFC
(
&
AFCInit
);
//SetFuelSensorRecoverGroupCnt(40);
//SetFuelSensorOpenCircuitGroupCnt(40);
//SetFuelSensorShortCircuitGroupCnt(40);
SetFuelSensorRecoverGroupCnt
(
10
);
SetFuelSensorOpenCircuitGroupCnt
(
120
);
SetFuelSensorShortCircuitGroupCnt
(
120
);
FuelStruct
FuelInitPara
;
AFC_INIT
AFCInit
;
uint32_t
ODO_Value
=
0u
;
ODO_Value
=
Data_ODO_Read
();
FuelInitPara
.
FuelShortCircuitR
=
FUEL_R_MIN_VAL
;
FuelInitPara
.
FuelOpenCircuitR
=
FUEL_R_MAX_VAL
;
FuelInitPara
.
DisplayZoneBoundary
[
0
]
=
DISPLAY_BOUNDARY_ES
;
//1500
FuelInitPara
.
DisplayZoneBoundary
[
1
]
=
DISPLAY_BOUNDARY_1
;
//1500
FuelInitPara
.
DisplayZoneBoundary
[
2
]
=
DISPLAY_BOUNDARY_2
;
//1373
FuelInitPara
.
DisplayZoneBoundary
[
3
]
=
DISPLAY_BOUNDARY_3
;
//1191
FuelInitPara
.
DisplayZoneBoundary
[
4
]
=
DISPLAY_BOUNDARY_4
;
//1009
FuelInitPara
.
DisplayZoneBoundary
[
5
]
=
DISPLAY_BOUNDARY_5
;
// 848
FuelInitPara
.
DisplayZoneBoundary
[
6
]
=
DISPLAY_BOUNDARY_6
;
// 697
FuelInitPara
.
DisplayZoneBoundary
[
7
]
=
DISPLAY_BOUNDARY_7
;
// 545
FuelInitPara
.
DisplayZoneBoundary
[
8
]
=
DISPLAY_BOUNDARY_8
;
// 436
FuelInitPara
.
DisplayZoneBoundary
[
9
]
=
DISPLAY_BOUNDARY_9
;
// 345
FuelInitPara
.
DisplayZoneBoundary
[
10
]
=
DISPLAY_BOUNDARY_10
;
// 254
FuelInitPara
.
DisplayZoneBoundary
[
11
]
=
DISPLAY_BOUNDARY_11
;
// 188
FuelInitPara
.
DisplayZoneBoundary
[
12
]
=
DISPLAY_BOUNDARY_12
;
// 132
FuelInitPara
.
DisplayZoneBoundary
[
13
]
=
DISPLAY_BOUNDARY_13
;
// 40
FuelInitPara
.
DisplayZoneBoundary
[
14
]
=
DISPLAY_BOUNDARY_FS
;
// 30
AFCInit
.
CalcAFCMaxNum
=
100
;
/*50公里或者100公里已更新*/
AFCInit
.
AFCMin
=
30
;
/*油耗最小值十倍*/
AFCInit
.
AFCMax
=
300
;
/*油耗最大值*/
AFCInit
.
AFCPreinstall
=
80
;
/*油耗初始值*/
AFCInit
.
CurODO
=
ODO_Value
*
100
;
/*总共里数100倍*/
AFCInit
.
MaxDRMileage
=
69900
;
/*续航里程最大值*/
InitFuelParamter
(
&
FuelInitPara
);
InitAFC
(
&
AFCInit
);
//----hyq--20190603--燃油上涨为下降的0.6
SetIgnOffRefuelThreshold
(
6
);
SetPowerDnStep
(
0
);
SetFuelSensorRecoverGroupCnt
(
10
);
SetFuelSensorOpenCircuitGroupCnt
(
120
);
SetFuelSensorShortCircuitGroupCnt
(
120
);
}
void
Fuel_User_KL15_ON_Init
(
void
)
{
}
void
Fuel_User_KL15_OFF_Init
(
void
)
...
...
@@ -110,7 +105,7 @@ void Fuel_User_Sleep_Init(void)
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_User_KL15_ON_Processing_Service
* Description :
* Description :
* Input : None
* Output : None
* Return : None
...
...
@@ -120,88 +115,88 @@ static uint16_t wbyTestR = 0 ;
static
uint8_t
wbyTestStep
=
0
;
void
Fuel_User_KL15_ON_Processing_Service
(
void
)
{
AFC_PARA
AFCPara
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
uint8_t
Vspeed_Valid
=
0
;
uint16_t
Vspeed
=
0
;
uint8_t
Espeed_Valid
=
0
;
uint16_t
Espeed
=
0
;
uint8_t
FuelMode
=
0
;
uint8_t
Step
=
0
;
// In ---> Lib
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
Vspeed_Valid
=
Common_Get_Act_V_Speed_Valid
();
Espeed_Valid
=
Common_Get_Act_E_Speed_Valid
();
if
(
Common_Get_IG_Sts_Valid
()
==
COMMON_Valid
)
{
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
{
if
(
FuelR_Valid
)
{
FuelR
=
RTE_Read_FUEL_R
();
//FuelR = wbyTestR ;
}
else
{
FuelR
=
0
;
}
if
(
Vspeed_Valid
)
{
Vspeed
=
Common_Get_Act_V_Speed
();
}
else
{
Vspeed
=
0
;
}
if
(
Espeed_Valid
)
{
Espeed
=
Common_Get_Act_E_Speed
();
}
else
{
Espeed
=
0
;
}
SetPowerSt
(
1
);
AFCTimerCall
();
AFCPara
.
CurODO
=
Data_ODO_Read
()
*
100
;
// m
AFCPara
.
FuleConsume
=
0
;
AFCPara
.
RPM
=
Espeed
;
// 1
AFCPara
.
Speed
=
(
Vspeed
*
10
);
// 0.1
SetAFCPara
(
&
AFCPara
);
FuelFSM
(
FuelR
);
//FuelFSM(wbyTestSensor);
}
}
// Lib ---> Out
FuelMode
=
GetFuelSensorState
();
Step
=
GetFuelStep
();
wbyTestStep
=
GetFuelStep
();
if
(
FuelMode
==
FuelSensorNormal
)
{
Fuel_CurSeg
=
CalFuel_CurSeg
(
Step
)
;
}
else
{
Fuel_CurSeg
=
0
;
}
AFC_PARA
AFCPara
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
uint8_t
Vspeed_Valid
=
0
;
uint16_t
Vspeed
=
0
;
uint8_t
Espeed_Valid
=
0
;
uint16_t
Espeed
=
0
;
uint8_t
FuelMode
=
0
;
uint8_t
Step
=
0
;
uint32_t
ODO_Value
=
0u
;
// In ---> Lib
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
Vspeed_Valid
=
Common_Get_Act_V_Speed_Valid
();
Espeed_Valid
=
Common_Get_Act_E_Speed_Valid
();
if
(
Common_Get_IG_Sts_Valid
()
==
COMMON_Valid
)
{
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
{
if
(
FuelR_Valid
)
{
FuelR
=
RTE_Read_FUEL_R
();
//FuelR = wbyTestR ;
}
else
{
FuelR
=
0
;
}
if
(
Vspeed_Valid
)
{
Vspeed
=
Common_Get_Act_V_Speed
();
}
else
{
Vspeed
=
0
;
}
if
(
Espeed_Valid
)
{
Espeed
=
Common_Get_Act_E_Speed
();
}
else
{
Espeed
=
0
;
}
SetPowerSt
(
1
);
AFCTimerCall
();
ODO_Value
=
Data_ODO_Read
();
AFCPara
.
CurODO
=
ODO_Value
*
100
;
// m
AFCPara
.
FuleConsume
=
0
;
AFCPara
.
RPM
=
Espeed
;
// 1
AFCPara
.
Speed
=
(
Vspeed
*
10
);
// 0.1
SetAFCPara
(
&
AFCPara
);
FuelFSM
(
FuelR
);
}
}
// Lib ---> Out
FuelMode
=
GetFuelSensorState
();
/*燃油状态获取*/
Step
=
GetFuelStep
();
wbyTestStep
=
GetFuelStep
();
if
(
FuelMode
==
FuelSensorNormal
)
{
Fuel_CurSeg
=
CalFuel_CurSeg
(
Step
)
;
}
else
{
Fuel_CurSeg
=
0
;
}
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_User_KL15_OFF_Processing_Service
* Description :
* Description :
* Input : None
* Output : None
* Return : None
...
...
@@ -209,25 +204,25 @@ void Fuel_User_KL15_ON_Processing_Service(void)
--------------------------------------------------------------------------*/
void
Fuel_User_KL15_OFF_Processing_Service
(
void
)
{
uint8_t
i
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
FuelR
=
RTE_Read_FUEL_R
();
if
(
Common_Get_IG_Sts_Valid
()
==
COMMON_Valid
)
uint8_t
i
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
FuelR
=
RTE_Read_FUEL_R
();
if
(
Common_Get_IG_Sts_Valid
()
==
COMMON_Valid
)
{
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_OFF
)
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_OFF
)
{
SetPowerSt
(
0
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
AFCTimerCall
();
}
FuelFSM
(
FuelR
);
}
}
SetPowerSt
(
0
);
for
(
i
=
0
;
i
<
10
;
i
++
)
{
AFCTimerCall
();
}
FuelFSM
(
FuelR
);
}
}
}
...
...
@@ -237,142 +232,142 @@ void Fuel_User_KL15_OFF_Processing_Service(void)
* Input : None
* Output : None
* Return : None
* onther :
* onther :
--------------------------------------------------------------------------*/
static
uint8_t
CalFuel_CurSeg
(
uint8_t
Step
)
{
static
uint8_t
Seg
=
0
;
switch
(
Seg
)
{
case
0
:
if
(
Step
>=
UP_TABLE
[
1
])
{
Seg
=
1
;
}
break
;
case
1
:
if
(
Step
>=
UP_TABLE
[
2
])
{
Seg
=
2
;
}
else
if
(
Step
<
DOWN_TABLE
[
0
])
{
Seg
=
0
;
}
break
;
case
2
:
if
(
Step
>=
UP_TABLE
[
3
])
{
Seg
=
3
;
}
else
if
(
Step
<
DOWN_TABLE
[
1
])
{
Seg
=
1
;
}
break
;
case
3
:
if
(
Step
>=
UP_TABLE
[
4
])
{
Seg
=
4
;
}
else
if
(
Step
<
DOWN_TABLE
[
2
])
{
Seg
=
2
;
}
break
;
case
4
:
if
(
Step
>=
UP_TABLE
[
5
])
{
Seg
=
5
;
}
else
if
(
Step
<
DOWN_TABLE
[
3
])
{
Seg
=
3
;
}
break
;
case
5
:
if
(
Step
>=
UP_TABLE
[
6
])
{
Seg
=
6
;
}
else
if
(
Step
<
DOWN_TABLE
[
4
])
{
Seg
=
4
;
}
break
;
case
6
:
if
(
Step
>=
UP_TABLE
[
7
])
{
Seg
=
7
;
}
else
if
(
Step
<
DOWN_TABLE
[
5
])
{
Seg
=
5
;
}
break
;
case
7
:
if
(
Step
>=
UP_TABLE
[
8
])
{
Seg
=
8
;
}
else
if
(
Step
<
DOWN_TABLE
[
6
])
{
Seg
=
6
;
}
break
;
case
8
:
if
(
Step
>=
UP_TABLE
[
9
])
{
Seg
=
9
;
}
else
if
(
Step
<
DOWN_TABLE
[
7
])
{
Seg
=
7
;
}
break
;
case
9
:
if
(
Step
>=
UP_TABLE
[
10
])
{
Seg
=
10
;
}
else
if
(
Step
<
DOWN_TABLE
[
8
])
{
Seg
=
8
;
}
break
;
case
10
:
if
(
Step
>=
UP_TABLE
[
11
])
{
Seg
=
11
;
}
else
if
(
Step
<
DOWN_TABLE
[
9
])
{
Seg
=
9
;
}
break
;
case
11
:
if
(
Step
>=
UP_TABLE
[
12
])
{
Seg
=
12
;
}
else
if
(
Step
<
DOWN_TABLE
[
10
])
{
Seg
=
10
;
}
break
;
case
12
:
if
(
Step
<
DOWN_TABLE
[
11
])
{
Seg
=
11
;
}
break
;
default
:
Seg
=
0
;
break
;
}
return
Seg
;
static
uint8_t
Seg
=
0
;
switch
(
Seg
)
{
case
0
:
if
(
Step
>=
UP_TABLE
[
1
])
{
Seg
=
1
;
}
break
;
case
1
:
if
(
Step
>=
UP_TABLE
[
2
])
{
Seg
=
2
;
}
else
if
(
Step
<
DOWN_TABLE
[
0
])
{
Seg
=
0
;
}
break
;
case
2
:
if
(
Step
>=
UP_TABLE
[
3
])
{
Seg
=
3
;
}
else
if
(
Step
<
DOWN_TABLE
[
1
])
{
Seg
=
1
;
}
break
;
case
3
:
if
(
Step
>=
UP_TABLE
[
4
])
{
Seg
=
4
;
}
else
if
(
Step
<
DOWN_TABLE
[
2
])
{
Seg
=
2
;
}
break
;
case
4
:
if
(
Step
>=
UP_TABLE
[
5
])
{
Seg
=
5
;
}
else
if
(
Step
<
DOWN_TABLE
[
3
])
{
Seg
=
3
;
}
break
;
case
5
:
if
(
Step
>=
UP_TABLE
[
6
])
{
Seg
=
6
;
}
else
if
(
Step
<
DOWN_TABLE
[
4
])
{
Seg
=
4
;
}
break
;
case
6
:
if
(
Step
>=
UP_TABLE
[
7
])
{
Seg
=
7
;
}
else
if
(
Step
<
DOWN_TABLE
[
5
])
{
Seg
=
5
;
}
break
;
case
7
:
if
(
Step
>=
UP_TABLE
[
8
])
{
Seg
=
8
;
}
else
if
(
Step
<
DOWN_TABLE
[
6
])
{
Seg
=
6
;
}
break
;
case
8
:
if
(
Step
>=
UP_TABLE
[
9
])
{
Seg
=
9
;
}
else
if
(
Step
<
DOWN_TABLE
[
7
])
{
Seg
=
7
;
}
break
;
case
9
:
if
(
Step
>=
UP_TABLE
[
10
])
{
Seg
=
10
;
}
else
if
(
Step
<
DOWN_TABLE
[
8
])
{
Seg
=
8
;
}
break
;
case
10
:
if
(
Step
>=
UP_TABLE
[
11
])
{
Seg
=
11
;
}
else
if
(
Step
<
DOWN_TABLE
[
9
])
{
Seg
=
9
;
}
break
;
case
11
:
if
(
Step
>=
UP_TABLE
[
12
])
{
Seg
=
12
;
}
else
if
(
Step
<
DOWN_TABLE
[
10
])
{
Seg
=
10
;
}
break
;
case
12
:
if
(
Step
<
DOWN_TABLE
[
11
])
{
Seg
=
11
;
}
break
;
default
:
Seg
=
0
;
break
;
}
return
Seg
;
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_Get_CurSeg
...
...
@@ -380,11 +375,11 @@ static uint8_t CalFuel_CurSeg(uint8_t Step)
* Input : None
* Output : None
* Return : None
* onther :
* onther :
--------------------------------------------------------------------------*/
uint8_t
Fuel_Get_CurSeg
(
void
)
{
return
Fuel_CurSeg
;
return
Fuel_CurSeg
;
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_Get_Percent
...
...
@@ -396,79 +391,79 @@ uint8_t Fuel_Get_CurSeg(void)
--------------------------------------------------------------------------*/
uint8_t
Fuel_Get_Percent
(
void
)
{
uint16_t
Percent
=
0
;
uint8_t
Step
=
0
;
Step
=
GetFuelStep
();
if
(
Step
<=
10
)
{
Percent
=
0
;
}
else
if
(
Step
>=
90
)
{
Percent
=
100
;
}
else
{
Step
-=
10
;
Percent
=
Step
;
Percent
*=
100
;
//放大100倍
Percent
/=
80
;
// 90 - 10
}
return
Percent
;
uint16_t
Percent
=
0
;
uint8_t
Step
=
0
;
Step
=
GetFuelStep
();
if
(
Step
<=
10
)
{
Percent
=
0
;
}
else
if
(
Step
>=
90
)
{
Percent
=
100
;
}
else
{
Step
-=
10
;
Percent
=
Step
;
Percent
*=
100
;
//放大100倍
Percent
/=
80
;
// 90 - 10
}
return
Percent
;
}
uint16_t
Fuel_Get_Res
(
void
)
{
return
GetFuelResistance
();
return
GetFuelResistance
();
}
uint16_t
Fuel_Get_Step
(
void
)
{
return
GetFuelStep
();
return
GetFuelStep
();
}
uint8_t
Fuel_Get_LowAlarm
(
void
)
{
uint8_t
u8Result
=
0
;
uint8_t
FuelMode
=
0
;
uint8_t
Step
=
0
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
FuelMode
=
GetFuelSensorState
();
Step
=
GetFuelStep
();
if
(
FuelR_Valid
)
{
FuelR
=
RTE_Read_FUEL_R
();
}
if
(
FuelMode
==
FuelSensorNormal
)
{
if
(
FuelR
>
30
&&
FuelR
<
3000
)
{
if
(
Step
<
20
)
{
u8Result
=
1
;
}
else
{
u8Result
=
0
;
}
}
else
{
u8Result
=
0
;
}
}
else
{
u8Result
=
0
;
}
return
u8Result
;
uint8_t
u8Result
=
0
;
uint8_t
FuelMode
=
0
;
uint8_t
Step
=
0
;
uint8_t
FuelR_Valid
=
0
;
uint16_t
FuelR
=
0
;
FuelR_Valid
=
RTE_Read_FUEL_R_Valid
();
FuelMode
=
GetFuelSensorState
();
Step
=
GetFuelStep
();
if
(
FuelR_Valid
)
{
FuelR
=
RTE_Read_FUEL_R
();
}
if
(
FuelMode
==
FuelSensorNormal
)
{
if
(
FuelR
>
30
&&
FuelR
<
3000
)
{
if
(
Step
<
20
)
{
u8Result
=
1
;
}
else
{
u8Result
=
0
;
}
}
else
{
u8Result
=
0
;
}
}
else
{
u8Result
=
0
;
}
return
u8Result
;
}
...
...
source/Application/APP/Data_Fuel/FuelConfig.h
View file @
490dac50
#ifndef
_FUELCONFIG_H
#define _FUELCONFIG_H
#ifndef
_FUELCONFIG_H
#define _FUELCONFIG_H
typedef
unsigned
short
INT16U
;
typedef
unsigned
char
INT8U
;
typedef
unsigned
char
INT8U
;
typedef
unsigned
int
INT32U
;
#define DISPLAY_BOUNDARY_
ES 2300
#define DISPLAY_BOUNDARY_
1 2060
#define DISPLAY_BOUNDARY_
2 1850
#define DISPLAY_BOUNDARY_
3 1570
#define DISPLAY_BOUNDARY_
4 1430
#define DISPLAY_BOUNDARY_
5 1130
#define DISPLAY_BOUNDARY_
6 970
#define DISPLAY_BOUNDARY_
7 550
#define DISPLAY_BOUNDARY_
8 460
#define DISPLAY_BOUNDARY_
9 460
#define DISPLAY_BOUNDARY_1
0 460
#define DISPLAY_BOUNDARY_1
1 460
#define DISPLAY_BOUNDARY_1
2 460
#define DISPLAY_BOUNDARY_FS
460
#define BOUNDARY_FUEL_ES
0
#define BOUNDARY_FUEL_1
7
0
#define BOUNDARY_FUEL_2
13
0
#define BOUNDARY_FUEL_3
19
0
#define BOUNDARY_FUEL_4
25
0
#define BOUNDARY_FUEL_5
310
#define BOUNDARY_FUEL_6
370
#define BOUNDARY_FUEL_7
44
0
#define BOUNDARY_FUEL_8
510
#define BOUNDARY_FUEL_9
510
#define BOUNDARY_FUEL_10
510
#define BOUNDARY_FUEL_11
510
#define BOUNDARY_FUEL_12
51
0
#define BOUNDARY_FUEL_
FS 510
#define FUEL_R_MIN_VAL
300 //
10 X ohm
#define FUEL_R_MAX_VAL
2700 //
10 X ohm
//Fuel Config
typedef
struct
_FuelStruct
{
INT16U
FuelShortCircuitR
;
INT16U
FuelOpenCircuitR
;
INT16U
DisplayZoneBoundary
[
22
];
INT16U
FuelCapacityBoundary
[
22
];
}
FuelStruct
;
#define DISPLAY_BOUNDARY_ES 1500
#define DISPLAY_BOUNDARY_
1 1500
#define DISPLAY_BOUNDARY_
2 1373
#define DISPLAY_BOUNDARY_
3 1191
#define DISPLAY_BOUNDARY_
4 1009
#define DISPLAY_BOUNDARY_
5 848
#define DISPLAY_BOUNDARY_
6 697
#define DISPLAY_BOUNDARY_
7 545
#define DISPLAY_BOUNDARY_
8 436
#define DISPLAY_BOUNDARY_
9 345
#define DISPLAY_BOUNDARY_
10 254
#define DISPLAY_BOUNDARY_1
1 188
#define DISPLAY_BOUNDARY_1
2 132
#define DISPLAY_BOUNDARY_1
3 84
#define DISPLAY_BOUNDARY_FS
65
#define BOUNDARY_FUEL_ES
0
#define BOUNDARY_FUEL_1
40
0
#define BOUNDARY_FUEL_2
72
0
#define BOUNDARY_FUEL_3
86
0
#define BOUNDARY_FUEL_4
104
0
#define BOUNDARY_FUEL_5
1428
#define BOUNDARY_FUEL_6
2577
#define BOUNDARY_FUEL_7
375
0
#define BOUNDARY_FUEL_8
4931
#define BOUNDARY_FUEL_9
5536
#define BOUNDARY_FUEL_10
5724
#define BOUNDARY_FUEL_11
6491
#define BOUNDARY_FUEL_12
685
0
#define BOUNDARY_FUEL_
13 7199
#define BOUNDARY_FUEL_FS 7600
#define FUEL_R_MIN_VAL
40 //
10 X ohm
#define FUEL_R_MAX_VAL
3000 //
10 X ohm
// Fuel Config
typedef
struct
_FuelStruct
{
INT16U
FuelShortCircuitR
;
INT16U
FuelOpenCircuitR
;
INT16U
DisplayZoneBoundary
[
22
];
INT16U
FuelCapacityBoundary
[
22
];
}
FuelStruct
;
extern
void
InitFuelParamter
(
FuelStruct
*
para
);
extern
INT8U
*
GetFuelLibVersion
(
void
);
extern
INT8U
*
GetFuelLibVersion
(
void
);
extern
void
FuelFSM
(
INT16U
FuelResistance
);
//
unit:ohm,accuracy:0.1
extern
void
FuelFSM
(
INT16U
FuelResistance
);
//
unit:ohm,accuracy:0.1
extern
void
SetMaxFuelBlockNum
(
INT8U
n
);
//call after InitFuelParamter(),default 12,max 20
extern
void
SetMaxFuelBlockNum
(
INT8U
n
);
//
call after InitFuelParamter(),default 12,max 20
extern
void
SetFuelSensorRecoverGroupCnt
(
INT16U
n
);
//
1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetFuelSensorOpenCircuitGroupCnt
(
INT16U
n
);
//1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetFuelSensorShortCircuitGroupCnt
(
INT16U
n
);
//
1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetFuelSensorRecoverGroupCnt
(
INT16U
n
);
//
1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetFuelSensorOpenCircuitGroupCnt
(
INT16U
n
);
// 1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetFuelSensorShortCircuitGroupCnt
(
INT16U
n
);
//
1:500ms,2:1000ms,3:1500ms.......,range:5s(10)-30min(3600)
extern
void
SetPowerSt
(
INT8U
n
);
extern
INT8U
GetFuelSeg
(
void
);
//
Segment, range:0~8
extern
INT8U
GetFuelStep
(
void
);
//
Pointer or Mono TFT stepless,range:0,10~((MaxFuelBlockNum + 1) * 10) 0,10:E, ((MaxFuelBlockNum + 1) * 10):F
extern
INT8U
GetFuelSeg
(
void
);
//
Segment, range:0~8
extern
INT8U
GetFuelStep
(
void
);
//
Pointer or Mono TFT stepless,range:0,10~((MaxFuelBlockNum + 1) * 10) 0,10:E, ((MaxFuelBlockNum + 1) * 10):F
extern
INT16U
GetFuelCapacityVal
(
void
);
//unit:L,accuracy:0.1
extern
INT16U
GetFuelCapacityVal
(
void
);
//
unit:L,accuracy:0.1
enum
{
FuelSensorNormal
,
FuelSensorShortCircuit
,
FuelSensorOpenCircuit
,
FuelSensorPreFault
,
enum
{
FuelSensorNormal
,
FuelSensorShortCircuit
,
FuelSensorOpenCircuit
,
FuelSensorPreFault
,
};
extern
INT8U
GetFuelSensorState
(
void
);
enum
{
FUEL_ST_IGN_ON_PROCESS
=
1
,
// 1
FUEL_ST_POWER_ON_ADD_FUEL
,
// 2
FUEL_ST_VEHICLE_RUN
,
// 3
FUEL_ST_IGN_OFF_PROCESS
,
// 4
FUEL_ST_IGN_OFF
,
// 5
};
extern
INT8U
GetFuelSensorState
(
void
);
enum
{
FUEL_ST_IGN_ON_PROCESS
=
1
,
//1
FUEL_ST_POWER_ON_ADD_FUEL
,
//2
FUEL_ST_VEHICLE_RUN
,
//3
FUEL_ST_IGN_OFF_PROCESS
,
//4
FUEL_ST_IGN_OFF
,
//5
};
extern
INT8U
GetFuelFSM_St
(
void
);
extern
INT16U
GetFuelResistance
(
void
);
//unit:ohm,accuracy:0.1
extern
INT16U
GetFuelResistance
(
void
);
//
unit:ohm,accuracy:0.1
extern
void
SetPowerDnStep
(
INT8U
step
);
//call every ign on (after InitFuelParamter())
extern
INT8U
GetPowerDnStep
(
void
);
//every 10km or ign off or refuel(FUEL_ST_POWER_ON_ADD_FUEL->FUEL_ST_VEHICLE_RUN) record
extern
void
SetPowerDnStep
(
INT8U
step
);
// call every ign on (after InitFuelParamter())
extern
INT8U
GetPowerDnStep
(
void
);
// every 10km or ign off or refuel(FUEL_ST_POWER_ON_ADD_FUEL->FUEL_ST_VEHICLE_RUN) record
// AFC & DrivingRange
typedef
struct
_AFC_INIT
{
INT8U
CalcAFCMaxNum
;
//max 100km,default 50
INT16U
AFCMin
;
//unit:L,accuracy:0.1
INT16U
AFCMax
;
//unit:L,accuracy:0.1
INT16U
AFCPreinstall
;
//unit:L,accuracy:0.1
INT32U
CurODO
;
// unit:m,accuracy:1
INT32U
MaxDRMileage
;
//unit:km,accuracy:0.01
}
AFC_INIT
;
typedef
struct
_AFC_INIT
{
INT8U
CalcAFCMaxNum
;
// max 100km,default 50
INT16U
AFCMin
;
// unit:L,accuracy:0.1
INT16U
AFCMax
;
// unit:L,accuracy:0.1
INT16U
AFCPreinstall
;
// unit:L,accuracy:0.1
INT32U
CurODO
;
// unit:m,accuracy:1
INT32U
MaxDRMileage
;
// unit:km,accuracy:0.01
}
AFC_INIT
;
extern
void
InitAFC
(
AFC_INIT
*
data
);
extern
void
ResetAFC
(
AFC_INIT
*
data
);
typedef
struct
_AFC_PARA
{
INT32U
CurODO
;
// unit:m,accuracy:1
INT16U
FuleConsume
;
// unit:ul,accuracy:1
INT16U
RPM
;
// unit:RPM,accuracy:1
INT8U
Speed
;
// unit:km/h,accuracy:1
}
AFC_PARA
;
typedef
struct
_AFC_PARA
{
INT32U
CurODO
;
// unit:m,accuracy:1
INT16U
FuleConsume
;
// unit:ul,accuracy:1
INT16U
RPM
;
// unit:RPM,accuracy:1
INT8U
Speed
;
// unit:km/h,accuracy:1
}
AFC_PARA
;
extern
void
SetAFCPara
(
AFC_PARA
*
data
);
typedef
struct
_DAFC_PARA
{
INT32U
DAFC_FuelConsumeSum
;
//unit:ul (ul:m->ml:km->L:1000km)
INT32U
DAFC_ODO
;
//unit:m
}
DAFC_PARA
;
extern
void
DAFC_GetPowerDownPara
(
DAFC_PARA
*
data
);
//call every 10km or ign off or reset afc
extern
void
DAFC_SetPowerDownPara
(
DAFC_PARA
*
data
);
//call every KL30 OFF -> KL30 ON (after InitAFC())
typedef
struct
_DR_PARA
{
INT32U
DR_FuelConsumeSum
;
//unit:ul (ul:m->ml:km->L:1000km)
INT32U
DR_Mileage
;
//unit:km,accuracy:0.01
}
DR_PARA
;
extern
void
DR_GetPowerDownPara
(
DR_PARA
*
data
);
//call every 10km or ign off
extern
void
DR_SetPowerDownPara
(
DR_PARA
*
data
);
//call every KL30 OFF -> KL30 ON (after InitAFC())
extern
void
AFCTimerCall
(
void
);
//must per 10ms interrupt
extern
INT16U
GetDRMileage
(
void
);
//unit:km,accuracy:1
extern
INT16U
GetCurAFC
(
void
);
//unit:L,accuracy:0.1
//display afc
typedef
struct
_DAFC_PARA
{
INT32U
DAFC_FuelConsumeSum
;
// unit:ul (ul:m->ml:km->L:1000km)
INT32U
DAFC_ODO
;
// unit:m
}
DAFC_PARA
;
extern
void
DAFC_GetPowerDownPara
(
DAFC_PARA
*
data
);
// call every 10km or ign off or reset afc
extern
void
DAFC_SetPowerDownPara
(
DAFC_PARA
*
data
);
// call every KL30 OFF -> KL30 ON (after InitAFC())
typedef
struct
_DR_PARA
{
INT32U
DR_FuelConsumeSum
;
// unit:ul (ul:m->ml:km->L:1000km)
INT32U
DR_Mileage
;
// unit:km,accuracy:0.01
}
DR_PARA
;
extern
void
DR_GetPowerDownPara
(
DR_PARA
*
data
);
// call every 10km or ign off
extern
void
DR_SetPowerDownPara
(
DR_PARA
*
data
);
// call every KL30 OFF -> KL30 ON (after InitAFC())
extern
void
AFCTimerCall
(
void
);
// must per 10ms interrupt
extern
INT16U
GetDRMileage
(
void
);
// unit:km,accuracy:1
extern
INT16U
GetCurAFC
(
void
);
// unit:L,accuracy:0.1
// display afc
extern
void
DAFC_Reset
(
AFC_INIT
*
data
);
extern
INT16U
DAFC_GetAFC
(
void
);
//unit:L,accuracy:0.1
//display afc end
#endif
extern
INT16U
DAFC_GetAFC
(
void
);
// unit:L,accuracy:0.1
// display afc end
extern
void
SetIgnOffRefuelThreshold
(
uint8_t
data
);
#endif
source/Application/APP/Data_SpeedOut/Speed_PPK_Out.c
View file @
490dac50
...
...
@@ -10,7 +10,7 @@ uint16_t Speed_PPK_Calc(uint16_t V_Speed, uint16_t m_PPK)
{
uint32_t
Frequency
;
Frequency
=
(
uint32_t
)
V_Speed
/
10u
;
Frequency
=
(
uint32_t
)(
Frequency
*
m_PPK
/
10u
);
Frequency
=
(
uint32_t
)(
Frequency
*
m_PPK
);
Frequency
=
Frequency
/
3600u
;
return
(
uint16_t
)
Frequency
;
}
...
...
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
View file @
490dac50
...
...
@@ -11,7 +11,7 @@ static struct
uint16_t
Data
[
VEH_FILTER_LEN
];
}
VehcleFilter
;
static
uint32_t
SPEED_PPK
=
1592
46
ul
;
static
uint32_t
SPEED_PPK
=
1592
5
ul
;
static
uint32_t
SPEED_RADIO
=
637
;
uint16_t
Vehicle_ACT_Speed
;
...
...
@@ -34,7 +34,7 @@ void Speed_KL30_Init(void)
VehcleFilter
.
Data
[
i
]
=
0
;
}
Set_Speed_PPK
(
159246ul
);
Set_Speed_PPK
(
SPEED_RADIO
);
}
void
Speed_KL15_ON_Init
(
void
)
{
...
...
@@ -49,7 +49,7 @@ void Speed_KL15_ON_Init(void)
VehcleFilter
.
Data
[
i
]
=
0
;
}
Veh_Fre_Init
(
Get_Speed_PPK
()
/
10
);
Veh_Fre_Init
(
Get_Speed_PPK
());
}
void
Speed_KL15_OFF_Init
(
void
)
{
...
...
@@ -93,31 +93,13 @@ void Speed_Processing_Service(void)
{
uint32_t
VehValTmp
=
0u
;
uint32_t
PPK
=
0u
;
// if(Get_Veh_Fre_Event())
//{
// VehValTmp = Cal_VehSpeed(Get_Veh_Fre(),VEH_FILTER_LEN) ;
// VehValTmp *= 3600 ;
// VehValTmp *= 10 ;
// VehValTmp *= 10 ;
// VehValTmp /= PPK ;
// Vehicle_ACT_Speed = VehValTmp ;
//}
PPK
=
Get_Speed_PPK
();
VehValTmp
=
Cal_Veh_Frequency
();
VehValTmp
*=
3600
;
VehValTmp
*=
10
;
VehValTmp
*=
10
;
VehValTmp
*=
36000u
;
VehValTmp
/=
PPK
;
// VehValTmp = Cal_Veh_Frequency();
// VehValTmp *= 3600 ;
// VehValTmp *= 10 ;
// VehValTmp /= PPK ;
if
(
VehValTmp
>
2250
)
{
VehValTmp
=
0
;
...
...
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
View file @
490dac50
...
...
@@ -334,8 +334,8 @@ void Veh_Fre_Init(uint32_t PPK)
VehFre
.
Cycle
=
0u
;
VehFre
.
Frequency
=
0u
;
VehFre
.
PulseCnt
=
0u
;
//
VehFreLimit = (3600000000u / (220u * PPK)) / 4u / 50u;
VehFreLimit
=
(
3600000000u
/
(
250u
*
PPK
))
/
4u
/
50u
;
VehFreLimit
=
(
3600000000u
/
(
220u
*
PPK
))
/
4u
/
50u
;
//
VehFreLimit = (3600000000u / (250u * PPK)) / 4u / 50u;
}
/*-------------------------------------------------------------------------
...
...
source/Application/APP/GaugesMode/GaugesInterface.c
View file @
490dac50
GetVehDisValGetVehDisVal
#
include
"GaugesInterface.h"
#include "GaugesInterface.h"
#include "Menu.h"
/**@struct _GaugesInfoInit
*this is _GaugesInfoInit
...
...
source/Application/APP/Key/Key.c
View file @
490dac50
...
...
@@ -28,19 +28,22 @@ typedef struct
uint16_t
u16KeyValidTimeCount
;
uint16_t
u16KeyFirstIGNTimeRecord
;
Key_IGN_en_t
enKeyIGNFirstStatus
;
Key_IGN_en_t
enKeyIGNStatusLast
;
uint8_t
u8KeyIGNChangeFlag
;
uint16_t
u16KeyIGNTimeCount
;
}
Key_Ctr_st_t
;
/*------------------------------------------------------------------------------------------*/
#pragma ghs section bss
=
".myNonInitArea"
#pragma ghs section bss
=
".myNonInitArea"
static
Key_Parameter_st_t
stKeyParameter
;
#pragma ghs section bss
=
default
#pragma ghs section bss
=
default
static
Key_Ctr_st_t
stKeyCtrVariate
[
KEY_NUM_MAX
];
//static Key_IGN_en_t enKeyIGNFirstStatus = KEY_IG_INVALID;
static
Key_IGN_en_t
enKeyIGNStatusLast
=
KEY_IG_INVALID
;
static
uint8_t
u8KeyIGNChangeFlag
=
0U
;
static
uint16_t
u16KeyIGNTimeCount
;
//
static Key_IGN_en_t enKeyIGNStatusLast = KEY_IG_INVALID;
//
static uint8_t u8KeyIGNChangeFlag = 0U;
//
static uint16_t u16KeyIGNTimeCount;
/*-----------------------------------------------------------------------------------------*/
static
void
Key_Process
(
Key_Num_en_t
enKeyIndex
);
...
...
@@ -149,9 +152,9 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
stKeyCtrVariate
[
enKeyIndex
].
enKeyTypeLast
=
KEY_LINE_LOOSEN
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNFirstStatus
=
KEY_IG_INVALID
;
enKeyIGNStatusLast
=
KEY_IG_INVALID
;
u8KeyIGNChangeFlag
=
0U
;
u16KeyIGNTimeCount
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNStatusLast
=
KEY_IG_INVALID
;
stKeyCtrVariate
[
enKeyIndex
].
u8KeyIGNChangeFlag
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
=
0U
;
}
if
((
stKeyCtrVariate
[
enKeyIndex
].
u16KeyInvalidTimeCount
>=
stKeyParameter
.
u16KeyLoosenTime
)
&&
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyValidTimeCount
>=
stKeyParameter
.
u16KeyShortPressTime
)
&&
...
...
@@ -172,29 +175,29 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
stKeyCtrVariate
[
enKeyIndex
].
u16KeyValidTimeCount
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyTypeLast
=
enKeyRealType
;
u16KeyIGNTimeCount
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNFirstStatus
=
enKeyIGNRealStatus
;
enKeyIGNStatusLast
=
enKeyIGNRealStatus
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNStatusLast
=
enKeyIGNRealStatus
;
}
else
{
if
(
enKeyIGNStatusLast
!=
enKeyIGNRealStatus
)
if
(
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNStatusLast
!=
enKeyIGNRealStatus
)
{
enKeyIGNStatusLast
=
enKeyIGNRealStatus
;
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNStatusLast
=
enKeyIGNRealStatus
;
if
(
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNFirstStatus
!=
enKeyIGNRealStatus
)
{
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
u16KeyIGNTimeCount
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
;
}
u16KeyIGNTimeCount
=
0U
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
=
0U
;
}
else
{
if
(
u16KeyIGNTimeCount
<
0xFFF0U
)
if
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
<
0xFFF0U
)
{
u16KeyIGNTimeCount
+=
KEY_CALL_CYCLE
;
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
+=
KEY_CALL_CYCLE
;
}
}
...
...
@@ -204,14 +207,14 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
}
if
(
stKeyCtrVariate
[
enKeyIndex
].
enKeyIGNFirstStatus
!=
enKeyIGNRealStatus
)
{
u8KeyIGNChangeFlag
=
1U
;
stKeyCtrVariate
[
enKeyIndex
].
u8KeyIGNChangeFlag
=
1U
;
}
if
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyValidTimeCount
>=
stKeyParameter
.
u16KeyShortPressTime
)
{
stKeyCtrVariate
[
enKeyIndex
].
u16KeyInvalidTimeCount
=
0U
;
}
if
(
u8KeyIGNChangeFlag
==
0U
)
if
(
stKeyCtrVariate
[
enKeyIndex
].
u8KeyIGNChangeFlag
==
0U
)
{
if
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyValidTimeCount
>=
stKeyParameter
.
u16KeySuperLongPressTime
)
{
...
...
@@ -235,12 +238,13 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if
(
enKeyIGNRealStatus
==
KEY_IG_ON
)
{
if
((
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
>=
stKeyParameter
.
u16KeyValidOFFTime
)
&&
(
u16KeyIGNTimeCount
>=
stKeyParameter
.
u16KeyValidONTime
))
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
>=
stKeyParameter
.
u16KeyValidONTime
))
{
if
(
stKeyAttribute
[
enKeyIndex
].
pfnKeyOperationCallBack
!=
0U
)
{
stKeyAttribute
[
enKeyIndex
].
pfnKeyOperationCallBack
(
KEY_EVENT_OFF_TO_ON
);
}
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
0U
;
}
}
}
...
...
@@ -249,12 +253,13 @@ static void Key_Process(Key_Num_en_t enKeyIndex)
if
(
enKeyIGNRealStatus
==
KEY_IG_OFF
)
{
if
((
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
>=
stKeyParameter
.
u16KeyValidONTime
)
&&
(
u16KeyIGNTimeCount
>=
stKeyParameter
.
u16KeyValidOFFTime
))
(
stKeyCtrVariate
[
enKeyIndex
].
u16KeyIGNTimeCount
>=
stKeyParameter
.
u16KeyValidOFFTime
))
{
if
(
stKeyAttribute
[
enKeyIndex
].
pfnKeyOperationCallBack
!=
0U
)
{
stKeyAttribute
[
enKeyIndex
].
pfnKeyOperationCallBack
(
KEY_EVENT_ON_TO_OFF
);
}
stKeyCtrVariate
[
enKeyIndex
].
u16KeyFirstIGNTimeRecord
=
0U
;
}
}
}
...
...
@@ -292,11 +297,18 @@ void Key_Init(void)
stKeyCtrVariate
[
i
].
enKeyTypeLast
=
KEY_CAN_NONE
;
stKeyCtrVariate
[
i
].
u16KeyInvalidTimeCount
=
0U
;
stKeyCtrVariate
[
i
].
u16KeyValidTimeCount
=
0U
;
stKeyCtrVariate
[
i
].
u16KeyFirstIGNTimeRecord
=
0U
;
stKeyCtrVariate
[
i
].
enKeyIGNFirstStatus
=
KEY_IG_INVALID
;
stKeyCtrVariate
[
i
].
enKeyIGNStatusLast
=
KEY_IG_INVALID
;
stKeyCtrVariate
[
i
].
u8KeyIGNChangeFlag
=
0U
;
stKeyCtrVariate
[
i
].
u16KeyIGNTimeCount
=
0U
;
}
stKeyParameter
.
u16KeyLoosenTime
=
50U
;
stKeyParameter
.
u16KeyShortPressTime
=
40U
;
stKeyParameter
.
u16KeyLongPressTime
=
2000U
;
stKeyParameter
.
u16KeySuperLongPressTime
=
30000U
;
stKeyParameter
.
u16KeyValidOFFTime
=
200U
;
/*按键动作时间*/
stKeyParameter
.
u16KeyValidONTime
=
1000U
;
}
/*对于硬线按键而言,判断短按的时间参数*/
Key_Set_en_t
Key_Parameter_Set_Short_Press_Time
(
uint16_t
u16Time
)
...
...
source/Application/APP/Telltales/Telltales_user.c
View file @
490dac50
...
...
@@ -95,7 +95,7 @@ uint8_t LED_SEATBELT_F = 0x00u;
T0 左转向 T13 右转向
信号接口:
信号定义:
输出信号:
T1_LED_OUT
输出信号:
******************************************************************************/
void
Telltales_Left_Right_Management_Service
(
void
)
/*10ms*/
{
...
...
@@ -229,7 +229,7 @@ uint8_t HYQ = 0U;
T1 INTER DIFF LOCK
信号接口:
信号定义:
输出信号:
T1_LED_OUT
输出信号:
******************************************************************************/
uint8_t
LED_INTER_DIFF_LOCK_T_Judgement
(
void
)
{
...
...
@@ -251,7 +251,7 @@ uint8_t LED_INTER_DIFF_LOCK_T_Judgement(void)
void
LED_INTER_DIFF_LOCK_T_Execution
(
uint8_t
led_status
)
{
T1_LED_OUT
=
led_status
;
RR_DIFF_LOCK_MCU
=
led_status
;
if
(
led_status
==
1
)
{
...
...
@@ -613,6 +613,7 @@ void LED_H_S_A_T_Execution(uint8_t led_status)
SEG_LED_H_S_A_T
(
0
);
}
}
/******************************************************************************
T11 RETARDER
信号接口:
...
...
@@ -722,135 +723,16 @@ void LED_AUTO_LEVELING_T_Execution(uint8_t led_status)
}
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R4
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R5
L4 ROWS
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R6 ACC_AIR_LED_MCU_OUT
信号接口:
信号定义:
输出信号: R6_LED_OUT
******************************************************************************/
uint8_t
LED_ACC_AIR_R_Judgement
(
void
)
//done
uint8_t
LED_ROWS_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_ACC_AIR
)
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
{
...
...
@@ -863,67 +745,38 @@ uint8_t LED_ACC_AIR_R_Judgement(void)//done
return
u8Result
;
}
void
LED_ACC_AIR_R_Execution
(
uint8_t
led_status
)
void
LED_ROWS_L_Execution
(
uint8_t
led_status
)
{
R6_LED_OUT
=
led_status
;
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL01
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL01
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_
ACC_AIR_R
(
7
);
SEG_LED_
ROWS_L
(
7
);
}
else
{
SEG_LED_
ACC_AIR_R
(
0
);
SEG_LED_
ROWS_L
(
0
);
}
}
/******************************************************************************
R7
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R8
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R9
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R10
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
R11
L5 BSM OFF
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
U2
信号接口:
信号定义:
输出信号:U2_LED_OUT
******************************************************************************/
uint8_t
LED_TRAILER_ABS_U_Judgement
(
void
)
//done
uint8_t
LED_BSM_OFF_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_TRAILER_ABS
)
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
{
...
...
@@ -936,70 +789,52 @@ uint8_t LED_TRAILER_ABS_U_Judgement(void)//done
return
u8Result
;
}
void
LED_TRAILER_ABS_U_Execution
(
uint8_t
led_status
)
void
LED_BSM_OFF_L_Execution
(
uint8_t
led_status
)
{
//U2_LED_OUT = led_status;
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL02
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL02
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_
TRAILER_ABS_U
(
7
);
SEG_LED_
BSM_OFF_L
(
7
);
}
else
{
SEG_LED_
TRAILER_ABS_U
(
0
);
SEG_LED_
BSM_OFF_L
(
0
);
}
}
/******************************************************************************
U3
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
U6
信号接口:
信号定义:
输出信号:
******************************************************************************/
/******************************************************************************
L6 AEBS OFF
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_ROWS_L_Judgement
(
void
)
uint8_t
LED_AEBS_OFF_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
uint8_t
m_Condition2
=
0u
;
uint8_t
m_Condition3
=
0u
;
if
(
m_Condition1
==
1u
)
m_Condition1
=
(
uint8_t
)
Get_ID_CF02F2A_Sig_Advanced_Emerg_Braking_Sys_Sta
();
m_Condition2
=
(
uint8_t
)
Get_ID_CF02FA1_Sig_Advanced_Emerg_Braking_Sys_Sta
();
m_Condition3
=
(
uint8_t
)
Get_ID_CF02FA0_Sig_Advanced_Emerg_Braking_Sys_Sta
();
if
((
m_Condition1
==
2u
)
||
(
m_Condition2
==
2u
)
||
(
m_Condition3
==
2u
))
{
u8Result
=
1u
;
}
else
if
((
m_Condition1
==
14u
)
||
(
m_Condition2
==
14u
)
||
(
m_Condition3
==
14u
))
{
u8Result
=
FLASH_SYNC_1Hz
;
}
else
{
u8Result
=
0u
;
...
...
@@ -1007,41 +842,47 @@ uint8_t LED_ROWS_L_Judgement(void)
return
u8Result
;
}
uint8_t
LED_BSM_OFF_L_Judgement
(
void
)
void
LED_AEBS_OFF_L_Execution
(
uint8_t
led_status
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
if
(
led_status
==
1
)
{
u8Result
=
1u
;
IS31_CHIP0_CHANNEL03
=
LED_BRIGHTNESS
;
}
else
{
u8Result
=
0u
;
IS31_CHIP0_CHANNEL03
=
0x00
;
}
return
u8Result
;
if
(
led_status
==
1
)
{
SEG_LED_AEBS_OFF_L
(
7
);
}
else
{
SEG_LED_AEBS_OFF_L
(
0
);
}
}
uint8_t
LED_AEBS_OFF_L_Judgement
(
void
)
//done
/******************************************************************************
L7 LDWS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_LDWS_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
uint8_t
m_Condition3
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_CF02F2A_Sig_Advanced_Emerg_Braking_Sys_Sta
();
m_Condition2
=
(
uint8_t
)
Get_ID_CF02FA1_Sig_Advanced_Emerg_Braking_Sys_Sta
();
m_Condition3
=
(
uint8_t
)
Get_ID_CF02FA0_Sig_Advanced_Emerg_Braking_Sys_Sta
();
m_Condition1
=
(
uint8_t
)
Get_ID_18FE5BE8_Sig_Lane_Departure_Warning_Sys_Sta
();
m_Condition2
=
(
uint8_t
)
Get_ID_18FECAE8_Sig_Amber_Warning_Lamp_Status
();
if
((
m_Condition1
==
2u
)
||
(
m_Condition2
==
2u
)
||
(
m_Condition3
==
2
u
))
if
((
m_Condition1
==
2u
)
||
(
m_Condition2
==
1
u
))
{
u8Result
=
1u
;
}
else
if
((
m_Condition1
==
14u
)
||
(
m_Condition2
==
14u
)
||
(
m_Condition3
==
14
u
))
else
if
((
m_Condition1
==
5u
)
||
(
m_Condition1
==
14u
)
||
(
m_Condition1
==
0
u
))
{
u8Result
=
FLASH_SYNC_1Hz
;
}
...
...
@@ -1052,32 +893,33 @@ uint8_t LED_AEBS_OFF_L_Judgement(void)//done
return
u8Result
;
}
uint8_t
LED_LDWS_L_Judgement
(
void
)
//done
void
LED_LDWS_L_Execution
(
uint8_t
led_status
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_18FE5BE8_Sig_Lane_Departure_Warning_Sys_Sta
();
m_Condition2
=
(
uint8_t
)
Get_ID_18FECAE8_Sig_Amber_Warning_Lamp_Status
();
if
((
m_Condition1
==
2u
)
||
(
m_Condition2
==
1u
))
if
(
led_status
==
1
)
{
u8Result
=
1u
;
IS31_CHIP0_CHANNEL04
=
LED_BRIGHTNESS
;
}
else
if
((
m_Condition1
==
5u
)
||
(
m_Condition1
==
14u
)
||
(
m_Condition1
==
0u
))
else
{
u8Result
=
FLASH_SYNC_1Hz
;
IS31_CHIP0_CHANNEL04
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_LDWS_L
(
7
);
}
else
{
u8Result
=
0u
;
SEG_LED_LDWS_L
(
0
)
;
}
return
u8Result
;
}
/******************************************************************************
L8 SRS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_SRS_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
...
...
@@ -1095,8 +937,34 @@ uint8_t LED_SRS_L_Judgement(void)
return
u8Result
;
}
void
LED_SRS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL20
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL20
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_SRS_L
(
7
);
}
else
{
SEG_LED_SRS_L
(
0
);
}
}
uint8_t
LED_ENG_OIL_L_Judgement
(
void
)
//done
/******************************************************************************
L9 ENG OIL
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_ENG_OIL_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1113,8 +981,33 @@ uint8_t LED_ENG_OIL_L_Judgement(void)//done
return
u8Result
;
}
void
LED_ENG_OIL_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL21
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL21
=
0x00
;
}
uint8_t
LED_CHARG_L_Judgement
(
void
)
//done
if
(
led_status
==
1
)
{
SEG_LED_ENG_OIL_L
(
7
);
}
else
{
SEG_LED_ENG_OIL_L
(
0
);
}
}
/******************************************************************************
L10 CHARG
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_CHARG_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1131,8 +1024,34 @@ uint8_t LED_CHARG_L_Judgement(void)//done
return
u8Result
;
}
void
LED_CHARG_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL22
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL22
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_CHARG_L
(
7
);
}
else
{
SEG_LED_CHARG_L
(
0
);
}
}
uint8_t
LED_SEAT_BELT_L_Judgement
(
void
)
//done
/******************************************************************************
L11 SEAT BELT
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_SEAT_BELT_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1149,8 +1068,33 @@ uint8_t LED_SEAT_BELT_L_Judgement(void)//done
return
u8Result
;
}
void
LED_SEAT_BELT_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL23
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL23
=
0x00
;
}
uint8_t
LED_RR_DIFF_LOCK_L_Judgement
(
void
)
//done
if
(
led_status
==
1
)
{
SEG_LED_SEAT_BELT_L
(
7
);
}
else
{
SEG_LED_SEAT_BELT_L
(
0
);
}
}
/******************************************************************************
L12 RR DIFF LOCK
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_RR_DIFF_LOCK_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1167,8 +1111,34 @@ uint8_t LED_RR_DIFF_LOCK_L_Judgement(void)//done
return
u8Result
;
}
void
LED_RR_DIFF_LOCK_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL16
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL16
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_RR_DIFF_LOCK_L
(
7
);
}
else
{
SEG_LED_RR_DIFF_LOCK_L
(
0
);
}
}
uint8_t
LED_TPMS_L_Judgement
(
void
)
//done
/******************************************************************************
L13 TPMS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_TPMS_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1198,8 +1168,33 @@ uint8_t LED_TPMS_L_Judgement(void)//done
return
u8Result
;
}
void
LED_TPMS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL17
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL17
=
0x00
;
}
uint8_t
LED_ASR_or_EVSC_OFF_L_Judgement
(
void
)
//done
if
(
led_status
==
1
)
{
SEG_LED_TPMS_L
(
7
);
}
else
{
SEG_LED_TPMS_L
(
0
);
}
}
/******************************************************************************
L14 ASR/EVSC OFF
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_ASR_or_EVSC_OFF_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1216,8 +1211,34 @@ uint8_t LED_ASR_or_EVSC_OFF_L_Judgement(void)//done
return
u8Result
;
}
void
LED_ASR_or_EVSC_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL18
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL18
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_ASR_or_EVSC_OFF_L
(
7
);
}
else
{
SEG_LED_ASR_or_EVSC_OFF_L
(
0
);
}
}
uint8_t
LED_EVSC_L_Judgement
(
void
)
//done
/******************************************************************************
L15 EVSC
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_EVSC_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
...
...
@@ -1259,60 +1280,38 @@ uint8_t LED_EVSC_L_Judgement(void)//done
return
u8Result
;
}
uint8_t
LED_eco_stop_OFF_L_Judgement
(
void
)
void
LED_EVSC_L_Execution
(
uint8_t
led_status
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
if
(
led_status
==
1
)
{
u8Result
=
1u
;
IS31_CHIP0_CHANNEL19
=
LED_BRIGHTNESS
;
}
else
{
u8Result
=
0u
;
IS31_CHIP0_CHANNEL19
=
0x00
;
}
return
u8Result
;
}
uint8_t
LED_AMT_L_Judgement
(
void
)
//done
{
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
;
uint8_t
m_Condition6
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_18FECA03_Sig_Amber_Warning_Lamp_Status
();
m_Condition2
=
(
uint8_t
)
Get_ID_18FECA03_Sig_Malfunction_indicator_Lamp
();
m_Condition3
=
(
uint8_t
)
Get_ID_18EBFF03_Sig_Amber_Warning_Lamp_Status
();
m_Condition4
=
(
uint8_t
)
Get_ID_18EBFF03_Sig_Malfunction_indicator_Lamp
();
m_Condition5
=
(
uint8_t
)
Get_ID_18ECFF03_Sig_Amber_Warning_Lamp_Status
();
m_Condition6
=
(
uint8_t
)
Get_ID_18ECFF03_Sig_Malfunction_indicator_Lamp
();
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
1u
)
||
(
m_Condition3
==
1u
)
||
(
m_Condition4
==
1u
)
||
(
m_Condition5
==
1u
)
||
(
m_Condition6
==
1u
))
if
(
led_status
==
1
)
{
u8Result
=
1u
;
SEG_LED_EVSC_L
(
7
)
;
}
else
{
u8Result
=
0u
;
SEG_LED_EVSC_L
(
0
)
;
}
return
u8Result
;
}
uint8_t
LED_WEAR_IND_L_Judgement
(
void
)
//done
/******************************************************************************
L16 ECO STOP OFF
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_eco_stop_OFF_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_WEAR_IND
)
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
{
...
...
@@ -1325,114 +1324,60 @@ uint8_t LED_WEAR_IND_L_Judgement(void)//done
return
u8Result
;
}
uint8_t
LED_TRAILER_BRAKE_R_Judgement
(
void
)
//done
void
LED_eco_stop_OFF_L_Execution
(
uint8_t
led_status
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_TRAILER_BRAKE
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
uint8_t
LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement
(
void
)
//done
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABSorEBS_AmberWarnSt_power_veh
();
if
(
m_Condition1
==
1u
)
{
u8Result
=
0u
;
}
else
if
(
led_status
==
1
)
{
u8Result
=
0u
;
IS31_CHIP0_CHANNEL12
=
LED_BRIGHTNESS
;
// 绿灯 亮
IS31_CHIP0_CHANNEL13
=
0x00
;
// 黄灯 灭
}
return
u8Result
;
}
uint8_t
LED_ABS_R_Judgement
(
void
)
//done
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_ABS
);
m_Condition2
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABSorEBS_AmberWarnSt_power_veh
();
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
1u
))
else
if
(
led_status
==
2
)
{
u8Result
=
1u
;
IS31_CHIP0_CHANNEL12
=
0x00
;
// 绿灯 灭
IS31_CHIP0_CHANNEL13
=
LED_BRIGHTNESS
;
// 黄灯 亮
}
else
{
u8Result
=
0u
;
IS31_CHIP0_CHANNEL12
=
0x00
;
// 绿灯 灭
IS31_CHIP0_CHANNEL13
=
0x00
;
// 黄灯 灭
}
return
u8Result
;
}
uint8_t
LED_PARK_BRAKE_R_Judgement
(
void
)
//done
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_PARK_BRAKE
);
if
(
m_Condition1
==
1u
)
if
((
led_status
==
1
)
||
(
led_status
==
2
))
{
u8Result
=
1u
;
SEG_LED_eco_stop_OFF_L
(
7
)
;
}
else
{
u8Result
=
0u
;
SEG_LED_eco_stop_OFF_L
(
0
)
;
}
return
u8Result
;
}
uint8_t
LED_BRAKE_AIR_or_EBS_RED_R_Judgement
(
void
)
//done
/******************************************************************************
L17 AMT
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_AMT_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
;
uint8_t
m_Condition6
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_BRAKE_AIR_EBS
);
m_Condition2
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABS_Fully_Operational
();
m_Condition3
=
(
uint8_t
)
Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State
();
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
0u
)
||
(
m_Condition3
==
1u
))
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
uint8_t
LED_BRAKE_LOCK_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
m_Condition1
=
(
uint8_t
)
Get_ID_18FECA03_Sig_Amber_Warning_Lamp_Status
();
m_Condition2
=
(
uint8_t
)
Get_ID_18FECA03_Sig_Malfunction_indicator_Lamp
();
m_Condition3
=
(
uint8_t
)
Get_ID_18EBFF03_Sig_Amber_Warning_Lamp_Status
();
m_Condition4
=
(
uint8_t
)
Get_ID_18EBFF03_Sig_Malfunction_indicator_Lamp
();
m_Condition5
=
(
uint8_t
)
Get_ID_18ECFF03_Sig_Amber_Warning_Lamp_Status
();
m_Condition6
=
(
uint8_t
)
Get_ID_18ECFF03_Sig_Malfunction_indicator_Lamp
();
if
(
m_Condition1
==
1u
)
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
1u
)
||
(
m_Condition3
==
1u
)
||
(
m_Condition4
==
1u
)
||
(
m_Condition5
==
1u
)
||
(
m_Condition6
==
1u
))
{
u8Result
=
1u
;
}
...
...
@@ -1443,50 +1388,38 @@ uint8_t LED_BRAKE_LOCK_R_Judgement(void)
return
u8Result
;
}
uint8_t
LED_AIR_SUS_R_Judgement
(
void
)
//done
void
LED_AMT_L_Execution
(
uint8_t
led_status
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_AIR_SUS
);
if
(
m_Condition1
==
1u
)
if
(
led_status
==
1
)
{
u8Result
=
1u
;
IS31_CHIP0_CHANNEL14
=
LED_BRIGHTNESS
;
}
else
{
u8Result
=
0u
;
IS31_CHIP0_CHANNEL14
=
0x00
;
}
return
u8Result
;
}
uint8_t
LED_WORKING_LAMP_U_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
if
(
led_status
==
1
)
{
u8Result
=
1u
;
SEG_LED_AMT_L
(
7
)
;
}
else
{
u8Result
=
0u
;
SEG_LED_AMT_L
(
0
)
;
}
return
u8Result
;
}
uint8_t
LED_TRAILER_ABS_INFO_U_Judgement
(
void
)
//done
/******************************************************************************
L18 WEAR IND
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_WEAR_IND_L_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_
TRAILER_ABS_INFO
);
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_
WEAR_IND
);
if
(
m_Condition1
==
1u
)
{
...
...
@@ -1499,372 +1432,50 @@ uint8_t LED_TRAILER_ABS_INFO_U_Judgement(void)//done
return
u8Result
;
}
void
LED_ROWS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL01
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL01
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_ROWS_L
(
7
);
}
else
{
SEG_LED_ROWS_L
(
0
);
}
}
void
LED_BSM_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL02
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL02
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_BSM_OFF_L
(
7
);
}
else
{
SEG_LED_BSM_OFF_L
(
0
);
}
}
void
LED_AEBS_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL03
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL03
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_AEBS_OFF_L
(
7
);
}
else
{
SEG_LED_AEBS_OFF_L
(
0
);
}
}
void
LED_LDWS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL04
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL04
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_LDWS_L
(
7
);
}
else
{
SEG_LED_LDWS_L
(
0
);
}
}
void
LED_SRS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL20
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL20
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_SRS_L
(
7
);
}
else
{
SEG_LED_SRS_L
(
0
);
}
}
void
LED_ENG_OIL_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL21
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL21
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_ENG_OIL_L
(
7
);
}
else
{
SEG_LED_ENG_OIL_L
(
0
);
}
}
void
LED_CHARG_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL22
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL22
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_CHARG_L
(
7
);
}
else
{
SEG_LED_CHARG_L
(
0
);
}
}
void
LED_SEAT_BELT_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL23
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL23
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_SEAT_BELT_L
(
7
);
}
else
{
SEG_LED_SEAT_BELT_L
(
0
);
}
}
void
LED_RR_DIFF_LOCK_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL16
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL16
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_RR_DIFF_LOCK_L
(
7
);
}
else
{
SEG_LED_RR_DIFF_LOCK_L
(
0
);
}
}
void
LED_TPMS_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL17
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL17
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_TPMS_L
(
7
);
}
else
{
SEG_LED_TPMS_L
(
0
);
}
}
void
LED_ASR_or_EVSC_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL18
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL18
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_ASR_or_EVSC_OFF_L
(
7
);
}
else
{
SEG_LED_ASR_or_EVSC_OFF_L
(
0
);
}
}
void
LED_EVSC_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL19
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL19
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_EVSC_L
(
7
);
}
else
{
SEG_LED_EVSC_L
(
0
);
}
}
/*************************************************************
eco_stop_OFF 指示灯 双色点亮说明:0灭 1绿 2黄
**************************************************************
led_status = 0 时, 此灯位: 绿灯 熄灭 且 黄灯 熄灭 ;
led_status = 1 时, 此灯位: 绿灯 点亮 且 黄灯 熄灭 ;
led_status = 2 时, 此灯位: 绿灯 熄灭 且 黄灯 点亮 ;
**************************************************************/
void
LED_eco_stop_OFF_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL12
=
LED_BRIGHTNESS
;
// 绿灯 亮
IS31_CHIP0_CHANNEL13
=
0x00
;
// 黄灯 灭
}
else
if
(
led_status
==
2
)
{
IS31_CHIP0_CHANNEL12
=
0x00
;
// 绿灯 灭
IS31_CHIP0_CHANNEL13
=
LED_BRIGHTNESS
;
// 黄灯 亮
}
else
{
IS31_CHIP0_CHANNEL12
=
0x00
;
// 绿灯 灭
IS31_CHIP0_CHANNEL13
=
0x00
;
// 黄灯 灭
}
if
((
led_status
==
1
)
||
(
led_status
==
2
))
{
SEG_LED_eco_stop_OFF_L
(
7
);
}
else
{
SEG_LED_eco_stop_OFF_L
(
0
);
}
}
void
LED_AMT_L_Execution
(
uint8_t
led_status
)
void
LED_WEAR_IND_L_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL1
4
=
LED_BRIGHTNESS
;
IS31_CHIP0_CHANNEL1
5
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL1
4
=
0x00
;
IS31_CHIP0_CHANNEL1
5
=
0x00
;
}
if
(
led_status
==
1
)
{
SEG_LED_
AMT
_L
(
7
);
SEG_LED_
WEAR_IND
_L
(
7
);
}
else
{
SEG_LED_
AMT
_L
(
0
);
SEG_LED_
WEAR_IND
_L
(
0
);
}
}
void
LED_WEAR_IND_L_Execution
(
uint8_t
led_status
)
/******************************************************************************
R4 TRAILER BRAKE
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_TRAILER_BRAKE_R_Judgement
(
void
)
{
if
(
led_status
==
1
)
{
IS31_CHIP0_CHANNEL15
=
LED_BRIGHTNESS
;
}
else
{
IS31_CHIP0_CHANNEL15
=
0x00
;
}
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_TRAILER_BRAKE
);
if
(
led_status
==
1
)
if
(
m_Condition1
==
1u
)
{
SEG_LED_WEAR_IND_L
(
7
)
;
u8Result
=
1u
;
}
else
{
SEG_LED_WEAR_IND_L
(
0
)
;
u8Result
=
0u
;
}
}
return
u8Result
;
}
void
LED_TRAILER_BRAKE_R_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -1886,6 +1497,29 @@ void LED_TRAILER_BRAKE_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R5 BRAKE AIR/EBS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_BRAKE_AIR_or_EBS_YELLOW_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABSorEBS_AmberWarnSt_power_veh
();
if
(
m_Condition1
==
1u
)
{
u8Result
=
0u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -1907,8 +1541,69 @@ void LED_BRAKE_AIR_or_EBS_YELLOW_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R6 ACC AIR
信号接口:
信号定义:
输出信号: R6_LED_OUT
******************************************************************************/
uint8_t
LED_ACC_AIR_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_ACC_AIR
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_ACC_AIR_R_Execution
(
uint8_t
led_status
)
{
R6_LED_OUT
=
led_status
;
if
(
led_status
==
1
)
{
SEG_LED_ACC_AIR_R
(
7
);
}
else
{
SEG_LED_ACC_AIR_R
(
0
);
}
}
/******************************************************************************
R7 ABS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_ABS_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_ABS
);
m_Condition2
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABSorEBS_AmberWarnSt_power_veh
();
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
1u
))
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_ABS_R_Execution
(
uint8_t
led_status
)
{
ABS_LED_MCU_OUT
=
led_status
;
...
...
@@ -1923,6 +1618,29 @@ void LED_ABS_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R8 PARK BRAKE
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_PARK_BRAKE_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_PARK_BRAKE
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_PARK_BRAKE_R_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -1944,9 +1662,37 @@ void LED_PARK_BRAKE_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R9 BRAKE AIR/EBS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_BRAKE_AIR_or_EBS_RED_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
uint8_t
m_Condition2
=
0u
;
uint8_t
m_Condition3
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_BRAKE_AIR_EBS
);
m_Condition2
=
(
uint8_t
)
Get_ID_18F0010B_Sig_ABS_Fully_Operational
();
m_Condition3
=
(
uint8_t
)
Get_ID_18F0010B_Sig_EBS_Red_Warning_Lamp_State
();
if
((
m_Condition1
==
1u
)
||
(
m_Condition2
==
0u
)
||
(
m_Condition3
==
1u
))
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_BRAKE_AIR_or_EBS_RED_R_Execution
(
uint8_t
led_status
)
{
//
BRAKE_AIR_EBS_LED_MCU = led_status;
BRAKE_AIR_EBS_LED_MCU
=
led_status
;
if
(
led_status
==
1
)
{
...
...
@@ -1958,6 +1704,29 @@ void LED_BRAKE_AIR_or_EBS_RED_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R10 BRAKE LOCK
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_BRAKE_LOCK_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_BRAKE_LOCK_R_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -1979,6 +1748,29 @@ void LED_BRAKE_LOCK_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
R11 AIR SUS
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_AIR_SUS_R_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_AIR_SUS
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_AIR_SUS_R_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -2000,7 +1792,67 @@ void LED_AIR_SUS_R_Execution(uint8_t led_status)
}
}
/******************************************************************************
U2 TRAILER ABS
信号接口:
信号定义:
输出信号:U2_LED_OUT
******************************************************************************/
uint8_t
LED_TRAILER_ABS_U_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_TRAILER_ABS
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_TRAILER_ABS_U_Execution
(
uint8_t
led_status
)
{
//U2_LED_OUT = led_status;
if
(
led_status
==
1
)
{
SEG_LED_TRAILER_ABS_U
(
7
);
}
else
{
SEG_LED_TRAILER_ABS_U
(
0
);
}
}
/******************************************************************************
U3 WORKING LAMP
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_WORKING_LAMP_U_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
XXXX
;
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_WORKING_LAMP_U_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -2022,6 +1874,29 @@ void LED_WORKING_LAMP_U_Execution(uint8_t led_status)
}
}
/******************************************************************************
U6 TRAILE ABS INFO
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_TRAILER_ABS_INFO_U_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
m_Condition1
=
(
uint8_t
)
Line_In_Get_Status
(
LINE_IN_TRAILER_ABS_INFO
);
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_TRAILER_ABS_INFO_U_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1
)
...
...
@@ -2041,8 +1916,4 @@ void LED_TRAILER_ABS_INFO_U_Execution(uint8_t led_status)
{
SEG_LED_TRAILER_ABS_INFO_U
(
0
);
}
}
/*:ZH*/
}
\ No newline at end of file
source/Application/Alarm/Popup_Lib.h
View file @
490dac50
...
...
@@ -70,7 +70,7 @@ typedef struct
Popuplib_uint8_t
Class
;
const
Popuplib_uint8_t
*
pMbrList
;
Popuplib_uint8_t
MbrCnt
;
Popuplib_uint
8_t
Message
;
Popuplib_uint
16_t
Message
;
Popuplib_uint8_t
DispMode
;
Popuplib_uint8_t
Snd
;
Popuplib_uint8_t
SndMode
;
...
...
source/Application/Graphic/UE/DisplaySch.c
View file @
490dac50
...
...
@@ -9,597 +9,3 @@
#include "CAN_Communication_Matrix.h"
/*按键信息获取*/
#include "Menu.h"
uint16_t
HYQ_TEST
=
0
;
void
Display_Schedule_Service
(
void
)
{
#if 0
static uint8_t MenuBGStatus = 0u;
static uint8_t MenuBGStatusOLD = 0u;
uint16_t popupID = 0xFFFFu;
uint16_t m16_FrameCnt;
Menu_Display_Info_st_t *pstMenuBuf = Menu_Get_Display_Information();
UE_CtrlInfo.HMI_PowerStatus = Common_Get_IG_Sts();
UE_CtrlInfo.HMI_TIMER.u32PowerON_Timer = Common_GetIgnOnTime();
UE_CtrlInfo.HMI_TIMER.u32PowerOFF_Timer = Common_GetIgnOffTime();
if ((UE_CtrlInfo.HMI_TIMER.u32PowerON_Timer <= StartAnimationEnd) && \
(UE_CtrlInfo.HMI_TIMER.u32PowerON_Timer >= StartAnimationStart))
{
UE_CtrlInfo.HMI_StartAnimation.u32FrameCnt++;
UE_CtrlInfo.HMI_StartAnimation.u32Timer++;
if (UE_CtrlInfo.HMI_Type != Disp_StartAnimation)
{
UE_CtrlInfo.HMI_StartAnimation.u32FrameCnt = 0u;
UE_CtrlInfo.HMI_StartAnimation.u32Timer = 0u;
UE_CtrlInfo.HMI_Type = Disp_StartAnimation;
}
m16_FrameCnt = UE_CtrlInfo.HMI_StartAnimation.u32FrameCnt;
if ((m16_FrameCnt % 3) == 0)
{
loc_Disable_Window_App();
GUI_Display_Animation_Frame(m16_FrameCnt / 3u);
}
}
else if (UE_CtrlInfo.HMI_TIMER.u32PowerON_Timer >= StartAnimationStart)
{
if (UE_CtrlInfo.HMI_Type == Disp_StartAnimation)
{
UE_CtrlInfo.HMI_StartAnimation.u32FrameCnt = 0u;
UE_CtrlInfo.HMI_StartAnimation.u32Timer = 0u;
loc_Enable_Window_App();
MenuBGStatus = Common_Get_Key_STa();
GUI_Display_background(MenuBGStatus);/*刷新背景*/
UE_CtrlInfo.HMI_Type = Disp_StartAnimationFinish;
}
/*更新底图 进入工程模式 调表模式*/
MenuBGStatus = Common_Get_Key_STa();
if (MenuBGStatusOLD != MenuBGStatus)
{
MenuBGStatusOLD = MenuBGStatus;
GUI_Display_background(MenuBGStatus);
}
/*更新底图 进入工程模式 调表模式*/
/*调表模式不进报警有无*/
if (MenuBGStatus == 0u)
{
//popupID = Popup_Get_Current_Message();
}
/*在非调表模式,判断是否有报警*/
if (popupID != 0xFFFFu)
{
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = 0u;
UE_CtrlInfo.u8ExternalTrigger = AlarmTrigger;
}
else
{
if (pstMenuBuf->enMenuCursorDisplayItem != MENU_ITEM_ENTRANCE_FIX)
{
if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_SHORT_PRESS)
{
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
HMI_Clear_KEY_MENU();
}
}
if (UE_CtrlInfo.HMI_TIMER.u32MENU_Timer != 0u)
{
if ((pstMenuBuf->enMenuCursorDisplayItem == MENU_ITEM_TRIP_CLEAR_SUCCEED) || (pstMenuBuf->enMenuCursorDisplayItem == MENU_ITEM_MAINTENACE_CLEAR_SUCCEED))
{
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer--;
}
UE_CtrlInfo.u8ExternalTrigger = MenuTrigger;
}
else
{
UE_CtrlInfo.u8ExternalTrigger = NoneTrigger;
}
}
if (UE_CtrlInfo.u8ExternalTrigger == AlarmTrigger)
{
if (UE_CtrlInfo.HMI_Type != Disp_Alarm)
{
UE_CtrlInfo.HMI_Type = Disp_Alarm;
}
if (popupID == POPUP_ADD_FUEL_FATAL)
{
}
else
{
UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_LEFT = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_RIGHT = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU = 0U;
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CtrlRight = 0U;
}
}
else //if (UE_CtrlInfo.u8ExternalTrigger == MenuTrigger)
{
if (UE_CtrlInfo.HMI_Type != Disp_Menu)
{
UE_CtrlInfo.HMI_Type = Disp_Menu;
}
if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_UP);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP == KEY_EVENT_LONG_PRESS)
{
Menu_Logic_Service(MENU_KEY_UP_LONG);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_UP = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_DOWN);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN == KEY_EVENT_LONG_PRESS)
{
Menu_Logic_Service(MENU_KEY_DOWN_LONG);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_DOWN = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_LEFT == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_LEFT);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_LEFT = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_LEFT == KEY_EVENT_LONG_PRESS)
{
Menu_Logic_Service(MENU_KEY_LEFT_LONG);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_LEFT = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_RIGHT == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_RIGHT);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_RIGHT = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_RIGHT == KEY_EVENT_LONG_PRESS)
{
Menu_Logic_Service(MENU_KEY_RIGHT_LONG);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_RIGHT = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_CONFIRM);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_LONG_PRESS)
{
Menu_Display_Info_st_t *MenuValueSta = 0u;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
Menu_Logic_Service(MENU_KEY_CONFIRM_LONG);
if (MenuValueSta->enMenuCursorDisplayItem == MENU_ITEM_TRIP_CLEAR_SUCCEED)
{
Data_ODO_Clear_Mileage_Num();
}
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = 0U;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM == KEY_EVENT_SUPER_LONG_PRESS)
{
TYW_Data_ODO_Clear();
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CONFIRM = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_SHORT_PRESS)
{
Menu_Logic_Service(MENU_KEY_CANCEL);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL = 0U;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL == KEY_EVENT_LONG_PRESS)
{
Menu_Logic_Service(MENU_KEY_CANCEL_LONG);
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CANCEL = 0U;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_SHORT_PRESS)
{
UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU == KEY_EVENT_LONG_PRESS)
{
UE_CtrlInfo.HMI_KEYInfo.u8KEY_MENU = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CtrlRight == KEY_EVENT_SHORT_PRESS)
{
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CtrlRight = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else if (UE_CtrlInfo.HMI_KEYInfo.u8KEY_CtrlRight == KEY_EVENT_LONG_PRESS)
{
UE_CtrlInfo.HMI_KEYInfo.u8KEY_CtrlRight = 0U;
UE_CtrlInfo.HMI_TIMER.u32MENU_Timer = DisplayMenuTime;
}
else
{
}
}
if (Common_GetIgnOnTime() >= 3000u)
{
/*显示函数开始*/
switch (HYQ_TEST)
{
//case 0 :/*开机动画*/
// loc_Disable_Window_App();
// GUI_Display_Animation_Frame();
// break;
case MENU_ITEM_ENTRANCE_FIX : /*行车电脑1*/
loc_Del_Sprite(PotSelect_Sprite, Menu_Project_Sprite);
GUI_Display_ENTRANCE_FIX();
break;
case MENU_ITEM_ENTRANCE_ALTER :/*行车电脑界面*/
loc_Del_Sprite(PotSelect_Sprite, Menu_Project_Sprite);
GUI_Display_ENTRANCE_ALTER();
break;
case MENU_ITEM_DRIVE_FUEL_CONS_COMBINED :/*行车信息/综合油耗*/
loc_Del_Sprite(MainCenter_Sprite, MainGas2_Sprite);
loc_Del_Sprite(TPMSTitle_Sprite, Menu_Project_Sprite);
GUI_Display_DriveFuelCons_Combined();
GUI_Every_Display();
break;
case MENU_ITEM_FUEL_CONS_TRIP :/*行车信息/小计油耗*/
loc_Del_Sprite(MainCenter_Sprite, MainGas2_Sprite);
loc_Del_Sprite(TPMSTitle_Sprite, Menu_Project_Sprite);
GUI_Display_FuelCons_Trip();
GUI_Every_Display();
break;
case MENU_ITEM_FUEL_CONS_THIS_TIME :/*行车信息/本次油耗*/
loc_Del_Sprite(MainCenter_Sprite, MainGas2_Sprite);
loc_Del_Sprite(TPMSTitle_Sprite, Menu_Project_Sprite);
GUI_Display_FuelCons_ThisTime();
GUI_Every_Display();
break;
case MENU_ITEM_FUEL_CONS_SINCE_REFUELING :/*行车信息/自上次加油后油耗*/
loc_Del_Sprite(MainCenter_Sprite, MainGas2_Sprite);
loc_Del_Sprite(TPMSTitle_Sprite, Menu_Project_Sprite);
GUI_Display_FuelCons_SinceRefueling();
GUI_Every_Display();
break;
case MENU_ITEM_TPMS :/*行车信息/TPMS 防盗使能OFF*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_TPMS();
GUI_Every_Display();
break;
case MENU_ITEM_AIDED_DRIVING :/*行车信息/辅助驾驶*/
loc_Del_Sprite(MainCenter_Sprite, MainGas2_Sprite);
loc_Del_Sprite(TPMSTitle_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving();
GUI_Every_Display();
break;
case MENU_ITEM_TRIP_CLEAR: /*行车信息/小计清零*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_TripClear();
GUI_Every_Display();
break;
case MENU_ITEM_TRIP_CLEAR_SUCCEED: /*行车信息/小计清零成功*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_TripClearSuccess();
GUI_Every_Display();
break;
case MENU_ITEM_INTELLIGENT_DRIVING :/*行车信息/辅助驾驶/智能驾驶选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving_INTELLIGENT_DRIVING();
GUI_Every_Display();
break;
case MENU_ITEM_INTELLIGENT_ADAS :/*行车信息/辅助驾驶/智能ADAS选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving_INTELLIGENT_ADAS();
GUI_Every_Display();
break;
case MENU_ITEM_ADAS_SENSITIVITY :/*行车信息/辅助驾驶/ADAS灵敏度选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving_ADAS_SENSITIVITY();
GUI_Every_Display();
break;
case MENU_ITEM_TPMS_MONITORING :/*行车信息/辅助驾驶/胎压检测选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving_TPMS_MONITORING();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_TYPE :/*行车信息/辅助驾驶/蓄电池类型选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_AidedDriving_BATTERY_TYPE();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_SETTING :/*行车信息/辅助驾驶/智能驾驶/ACC车距设置选中*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACC_DISTANCE_SETTING();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_ONOFF :/*行车信息/辅助驾驶/智能驾驶/ACC*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACC_ONOFF();
GUI_Every_Display();
break;
case MENU_ITEM_AEBS_ONOFF :/*行车信息/辅助驾驶/智能驾驶/AEBS*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_AEBS_ONOFF();
GUI_Every_Display();
break;
case MENU_ITEM_RAMP_AUXILIARY :/*行车信息/辅助驾驶/智能驾驶/坡道辅助*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_RAMP_AUXILIARY();
GUI_Every_Display();
break;
case MENU_ITEM_ESC_ASR :/*行车信息/辅助驾驶/智能驾驶/ESC/ASR*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ESC_ASR();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_1 :/*行车信息/辅助驾驶/ACC车距设置/車距模式1*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode1();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_2 :/*行车信息/辅助驾驶/ACC车距设置/車距模式2*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode2();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_3 :/*行车信息/辅助驾驶/ACC车距设置/車距模式3*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode3();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_4 :/*行车信息/辅助驾驶/ACC车距设置/車距模式4*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode4();
GUI_Every_Display();
break;
case MENU_ITEM_ACC_DISTANCE_5 :/*行车信息/辅助驾驶/ACC车距设置/車距模式5*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode5();
GUI_Every_Display();
break;
case MENU_ITEM_ADAS_SENSITIVITY_1 :/*行车信息/辅助驾驶/ADAS灵敏度/灵敏度1*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode1();
GUI_Every_Display();
break;
case MENU_ITEM_ADAS_SENSITIVITY_2 :/*行车信息/辅助驾驶/ADAS灵敏度/灵敏度2*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode2();
GUI_Every_Display();
break;
case MENU_ITEM_ADAS_SENSITIVITY_3 :/*行车信息/辅助驾驶/ADAS灵敏度/灵敏度3*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_IntelligentDriving_ACCDistanceSetting_mode3();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_135AH :/*行车信息/辅助驾驶/蓄电池类型/蓄电池135 AH**/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_135Ah();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_165_FREE :/*行车信息/辅助驾驶/蓄电池类型 165Ah免维护*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_165AhFree();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_180_FREE :/*行车信息/辅助驾驶/蓄电池类型 180Ah免维护*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_180AhFree();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_180_LOW :/*行车信息/辅助驾驶/蓄电池类型 180Ah低温*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_180AhLow();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_220_FREE :/*行车信息/辅助驾驶/蓄电池类型 220Ah免维护*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_220AhFree();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_220_LOW_FREE :/*行车信息/辅助驾驶/蓄电池类型 220Ah低温免维护*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_220LowFree();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_240AH :/*行车信息/辅助驾驶/蓄电池类型 240Ah*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_240Ah();
GUI_Every_Display();
break;
case MENU_ITEM_BATTERY_330AH :/*行车信息/辅助驾驶/蓄电池类型 330Ah*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_BatteryType_330Ah();
GUI_Every_Display();
break;
case MENU_ITEM_VEHICLE_STATE :/*车辆状态/保养设置*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintainSetting();
GUI_Every_Display();
break;
case MENU_ITEM_MAINTENANCE_TIPS :/*车辆状态/保养设置/保养提示*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintainSetting_Tips();
GUI_Every_Display();
break;
case MENU_ITEM_TIP_SETTING :/*车辆状态/保养设置/提示设置*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintenanceTips_Setting();
GUI_Every_Display();
break;
case MENU_ITEM_MAINTENACE_CLEAR :/*车辆状态/保养设置/保养清零*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintenanceClear();
GUI_Every_Display();
break;
case MENU_ITEM_MAINTENACE_CLEAR_SUCCEED :/*车辆状态/保养设置/保养清零成功*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintenanceClear_SUCCEED();
GUI_Every_Display();
break;
case MENU_ITEM_MAINTENANCE_MILEAGE :/*车辆状态/提示设置/保养里程*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintenanceTips_SettingMaintainMileage();
GUI_Every_Display();
break;
case MENU_ITEM_PROMPT_MILEAGE :/*车辆状态/提示设置/提示里程*/
loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
GUI_Display_MaintenanceTips_SettingPromptMileage();
GUI_Every_Display();
break;
//case MENU_ITEM_PROMPT_MILEAGE :/**/
// loc_Del_Sprite(MainCenter_Sprite, MenuCenter_Sprite);
// loc_Del_Sprite(Menu_Project_Sprite, Menu_Project_Sprite);
// GUI_Display_MaintenanceTips_SettingPromptMileage();
// GUI_Every_Display();
// break;
//
// GUI_Display_TripClear()
//
// GUI_Every_Display();
// break;
// case 11 :/*行车信息/小G清零成功*/
//
// GUI_Display_TripClearSuccess();
// GUI_Every_Display();
// break;
// case 12 :/*车辆状态/保养设置*/
// GUI_Display_MaintainSetting();
//
// GUI_Every_Display();
// break;
//
// case Disp_Alarm: /*报警界面*/
// loc_Del_Sprite(PotSelect_Sprite, Menu_Project_Sprite);
//
// GUI_General_Popup();
// //HMI_ALARM_INFO(popupID);
// break;
// case Disp_Menu:
// HMI_MENU_INFO();
// break;
// case Disp_DriveInfo:
// HMI_DRIVE_INFO();
// break;
default:
break;
}
}
}
#endif
}
source/Driver/GPIO/GPIO.h
View file @
490dac50
#ifndef GPIO_H__
#define GPIO_H__
#include "dr7f701441.dvf.h"
/* --- PORT Data Direction --- */
...
...
@@ -457,8 +458,8 @@
#define ADC_AIR2 GPIO_IN_PORT10_PIN09
#define ADC_AIR GPIO_IN_PORT10_PIN10
#define ADC_KEY GPIO_IN_PORT10_PIN11
#define
T1_LED_OUT
GPIO_OUT_PORT11_PIN00
#define
R5_LED_OUT
GPIO_OUT_PORT11_PIN01
#define
RR_DIFF_LOCK_MCU
GPIO_OUT_PORT11_PIN00
#define
BRAKE_AIR_EBS_LED_MCU
GPIO_OUT_PORT11_PIN01
#define CD4051A_COM6_MCU_IN GPIO_IN_PORT11_PIN02
#define CD4051A_COM7_MCU_IN GPIO_IN_PORT11_PIN03
#define CD4051A_COM1_MCU_IN GPIO_IN_PORT16_PIN00
...
...
source/Driver/Timer/TimerB.c
View file @
490dac50
...
...
@@ -577,8 +577,8 @@ void TimerB_PWM_Init(void)
TimerB_VehFreOut_Init
();
TimerB_EngFreOut_Init
();
TimerB_Input_Channel_Init
(
TIMERB_0_CH2
,
TIMERB_CLOCK_3
,
TIMERB_RISING
);
//车速输入捕获
TimerB_Input_Channel_Start
(
TIMERB_0_CH2
);
//
TimerB_Input_Channel_Init(TIMERB_0_CH2, TIMERB_CLOCK_3, TIMERB_RISING); //车速输入捕获
//
TimerB_Input_Channel_Start(TIMERB_0_CH2);
}
static
void
TimerB_PWM_Master_Channel_Init
(
TIMERB_Channel_en_t
enTimerBChannel
,
TIMERB_Clock_en_t
enTimerBClock
)
{
...
...
source/System/init.c
View file @
490dac50
...
...
@@ -93,17 +93,17 @@ void Sys_Startup_Init(void)
/* init graphic tick driver */
R_TICK_Init
(
0
);
Gfx_Init
(
GFX_VO_SINGLE_RGB888
/* | GFX_VI_ITU656*/
);
Gfx_Init
(
GFX_VO_SINGLE_RGB888
|
GFX_VI_ITU656
);
CPU_Init
();
RTC_Init
();
Sys_Tick_Timer_Start
();
COM_CAN_Init
();
/*COM_CAN_Init(); 原CAN初始化位置*/
RTE_ADC_Init
();
InitSeriFlashExternReadMode
();
Int_Flash_Init
();
EEPROM_Init
();
...
...
@@ -113,7 +113,11 @@ void Sys_Startup_Init(void)
d_printf
(
"Init complete!
\n
"
);
InitSeriFlashExternReadMode
();
/*30电数据初始化*/
APP_Startup_Init
(
Clock_Get_Startup_Mode
());
/*外发要用到EEP数据,位置移动*/
COM_CAN_Init
();
Gfx_Sys_Start
();
}
...
...
source/System/tasks.c
View file @
490dac50
...
...
@@ -137,6 +137,7 @@ void Sys_Run_Mode_5ms_Tasks(void)
------------------------------------------------------------------------------*/
void
Sys_Run_Mode_10ms_Tasks
(
void
)
{
DisplayServices
();
loc_Display_Service
();
Data_Mileage_Write_EEPROM
();
Line_In_Debounce_Service
();
...
...
@@ -144,7 +145,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
// Test_LED_AllLight();
Key_Service
();
CAN_BUSOFF_Recover
();
DisplayServices
();
/*表头调度函数 added by yutian*/
UserGaugeSchedule
();
/*在主循环中调用*/
/*end*/
...
...
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