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
7b6e711e
Commit
7b6e711e
authored
3 years ago
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改车速,转速相关函数
parent
4788817e
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
22952 additions
and
23726 deletions
+22952
-23726
Application.gpj
ghs/group/Application.gpj
+0
-1
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+22176
-22234
project.siz
ghs/project.siz
+3
-3
BackLight_APP.c
source/Application/APP/BackLight/BackLight_APP.c
+2
-30
Data_CoolantTemperature.c
...ion/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
+15
-89
Data_CoolantTemperature_Filter.c
.../Data_CoolantTemperature/Data_CoolantTemperature_Filter.c
+0
-86
Data_Fuel_User.c
source/Application/APP/Data_Fuel/Data_Fuel_User.c
+1
-149
Data_FuelConsump.c
source/Application/APP/Data_FuelConsump/Data_FuelConsump.c
+0
-581
Data_FuelConsump.h
source/Application/APP/Data_FuelConsump/Data_FuelConsump.h
+0
-29
Services_ODO_user.c
source/Application/APP/Data_ODO/Services_ODO_user.c
+0
-2
Data_VehicleSpeed.c
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
+193
-91
Data_VehicleSpeed.h
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.h
+5
-0
Gauges.c
source/Application/APP/GaugesMode/Gauges.c
+121
-137
Gauges.h
source/Application/APP/GaugesMode/Gauges.h
+8
-6
GaugesDataAnalysis.c
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
+2
-1
GaugesInterface.c
source/Application/APP/GaugesMode/GaugesInterface.c
+19
-19
GaugesInterface.h
source/Application/APP/GaugesMode/GaugesInterface.h
+3
-0
PowerManagement_user.c
...ce/Application/APP/PowerManagement/PowerManagement_user.c
+0
-3
Telltales.h
source/Application/APP/Telltales/Telltales.h
+6
-0
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+84
-3
Common_Interface.c
source/Application/RTE/Common_Interface.c
+58
-19
Common_Interface.h
source/Application/RTE/Common_Interface.h
+24
-11
Emulated_EEPROM.c
source/Driver/Memory/Emulated_EEPROM.c
+154
-154
Emulated_EEPROM.h
source/Driver/Memory/Emulated_EEPROM.h
+68
-68
tasks.c
source/System/tasks.c
+10
-10
No files found.
ghs/group/Application.gpj
View file @
7b6e711e
...
...
@@ -82,7 +82,6 @@
.\APP\BackLight\BackLight_APP.h
.\APP\Data_CoolantTemperature\Data_CoolantTemperature.c
.\APP\Data_CoolantTemperature\Data_CoolantTemperature.h
.\APP\Data_CoolantTemperature\Data_CoolantTemperature_Filter.c
.\APP\Data_EngineSpeed\Data_EngineSpeed.c
.\APP\Data_EngineSpeed\Data_EngineSpeed.h
.\APP\Data_Gear\Data_Gear.c
...
...
This diff is collapsed.
Click to expand it.
ghs/project
View file @
7b6e711e
No preview for this file type
This diff is collapsed.
Click to expand it.
ghs/project.hex
View file @
7b6e711e
This diff is collapsed.
Click to expand it.
ghs/project.siz
View file @
7b6e711e
project .intvect 1536
project .text 29
9212
project .rodata 4123
67
project .text 29
7564
project .rodata 4123
11
project .secinfo 120
project .syscall 6
project .romdata 7
853
project .romdata 7
765
project .ROM.ramfunc 208
project .ramfunc 208
This diff is collapsed.
Click to expand it.
source/Application/APP/BackLight/BackLight_APP.c
View file @
7b6e711e
...
...
@@ -62,7 +62,7 @@ void BL_Management_service ( void )
uint8_t
ILL
=
0
;
if
(
Line_In_Get_Status
(
LINE_IN_ILLUMINATION
)
)
if
(
Line_In_Get_Status
(
LINE_IN_ILLUMINATION
)
)
{
ILL
=
2
;
}
...
...
@@ -163,7 +163,7 @@ void BL_Management_service ( void )
/*得到主题模式可自己在枚举中定义 在BackGroundLight.c里填表*/
GetBGLTheme
(
0
);
/*得到工作模式 白天 傍晚 夜晚 在枚举中已定义*/
GetBGLType
(
ILL
);
//GetBGLType(0);
/*得到背光等级 可自己在枚举中定义 在BackGroundLight.c里填表*/
...
...
@@ -173,42 +173,14 @@ void BL_Management_service ( void )
GetBGLNTCVol
(
0
);
/*主函数中调用第一个参数电源状态 1是 ON档 2 off 第二个参数 唤醒条件 1是TTF唤醒 2 是表盘唤醒 3 是表盘和屏都有唤醒,0无唤醒*/
BackLightSchedu
(
Common_Get_IG_Sts
(),
BackLightWakeFlag
);
//BL_PWM_OUT = 1 ;
//水温灯
TimerB_PWM_Channel_Duty_Set
(
TIMERB_2_CH7
,
testBG
);
//水温格白色
TEMP_W_LED_OUT
=
1
;
//水温字符白色指示灯
//燃油灯
if
(
Fuel_Get_LowAlarm
())
{
FUEL_LED_Y_MCU
=
1U
;
FUEL_W_LED_OUT
=
0U
;
}
else
{
FUEL_LED_Y_MCU
=
0U
;
FUEL_W_LED_OUT
=
1U
;
}
}
void
BL_PWM_Duty_Cycle_Capture_ISR
(
void
)
{
}
void
SEG_LCD_Init
(
void
)
{
SEGLCDBackup
.
Brightness
=
0xFF
;
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
View file @
7b6e711e
...
...
@@ -17,7 +17,6 @@ static struct
}
CoolantVariable
;
static
uint8_t
CalCoolant_CurSeg
(
uint8_t
Valid
,
uint8_t
Temp
);
static
uint8_t
CalCoolant_TarSeg
(
uint16_t
CanMsg
);
/*-------------------------------------------------------------------------
* Function Name : Coolant_KL30_Init
* Description : 水温KL30初始化
...
...
@@ -65,19 +64,19 @@ void Coolant_Sleep_Init(void)
* Return : None
* onther : None
--------------------------------------------------------------------------*/
static
uint8_t
wbyTestSeg
=
0
;
void
Coolant_Processing_Service
(
void
)
{
static
uint8_t
Timer2s
=
0
;
uint8_t
TargetSeg
=
0
;
uint8_t
Msg_CoolTemp
=
0u
;
uint8_t
CanStatus
=
0u
;
uint8_t
Msg_CoolTemp
=
0
;
CanStatus
=
CAN_MSG_Status
(
ID_CanMsg18FEEE00_Msg_Count
)
;
if
(
C
AN_MSG_Status
(
ID_CanMsg18FEEE00_Msg_Count
)
==
0x55u
)
if
(
C
anStatus
==
CAN_SIG_LOST
)
{
//timeout
CoolantVariable
.
Valid
=
0
;
CoolantVariable
.
Value
=
0u
;
Timer2s
=
0
;
}
else
...
...
@@ -92,93 +91,20 @@ void Coolant_Processing_Service(void)
else
{
Timer2s
=
0
;
CoolantVariable
.
Valid
=
1
;
CoolantVariable
.
Value
=
Msg_CoolTemp
;
CoolantVariable
.
Valid
=
1u
;
TargetSeg
=
CalCoolant_TarSeg
(
Msg_CoolTemp
);
if
(
Msg_CoolTemp
>=
40
)
{
CoolantVariable
.
Value
=
Msg_CoolTemp
-
40u
;
}
else
{
CoolantVariable
.
Value
=
0u
;
}
}
}
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
* Description : 根据有效报文 得到 目标格
* Input : None
* Output : None
* Return : None
* onther : None
--------------------------------------------------------------------------*/
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
;
}
return
TargetSeg
;
CoolantVariable
.
CurSeg
=
CalCoolant_CurSeg
(
CoolantVariable
.
Valid
,
CoolantVariable
.
Value
);
}
/*-------------------------------------------------------------------------
* Function Name : CalCoolant_CurSeg
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_CoolantTemperature/Data_CoolantTemperature_Filter.c
deleted
100644 → 0
View file @
4788817e
#include "Data_CoolantTemperature.h"
//-------------------------------------------
//水温滤波 zhouhang
//-------------------------------------------
#define COOLANT_FILTER_SLOW 200
#define COOLANT_FILTER_FAST 25
uint8_t
Coolant_Temp_Filter
(
uint8_t
ObjSeg
,
uint8_t
Valid
)
{
static
uint8_t
Timer
=
0u
;
static
uint8_t
Timer_group
=
0u
;
//Timer_group == 1 代表格数上行计时,2代表下行计时
static
uint8_t
CurSeg
=
0u
;
if
(
Valid
==
0u
)
{
CurSeg
=
0u
;
Timer
=
0u
;
Timer_group
=
0u
;
}
else
{
if
(
ObjSeg
>
CurSeg
)
//上行
{
if
(
Timer_group
!=
1u
)
{
Timer_group
=
1u
;
Timer
=
0u
;
}
else
{
Timer
++
;
}
if
((
ObjSeg
-
CurSeg
)
==
1u
)
{
if
(
Timer
>
COOLANT_FILTER_SLOW
)
{
CurSeg
++
;
Timer
=
0u
;
}
}
else
{
if
(
Timer
>
COOLANT_FILTER_FAST
)
{
CurSeg
++
;
Timer
=
0u
;
}
}
}
else
if
(
ObjSeg
==
CurSeg
)
//保持
{
Timer
=
0u
;
}
else
//下行
{
if
(
Timer_group
!=
2u
)
{
Timer_group
=
2u
;
Timer
=
0u
;
}
else
{
Timer
++
;
}
if
(
Timer
>
COOLANT_FILTER_FAST
)
{
CurSeg
--
;
Timer
=
0u
;
}
}
}
return
CurSeg
;
}
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_Fuel/Data_Fuel_User.c
View file @
7b6e711e
...
...
@@ -24,14 +24,8 @@ 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
uint8_t
Fuel_CurSeg
=
0
;
static
uint8_t
CalFuel_CurSeg
(
uint8_t
Step
);
#define BASEFUELVAL 3500 //3.0L底油
/*-------------------------------------------------------------------------
* Function Name : Fuel_User_KL30_Init
* Description :
...
...
@@ -187,7 +181,7 @@ void Fuel_User_KL15_ON_Processing_Service(void)
if
(
FuelMode
==
FuelSensorNormal
)
{
Fuel_CurSeg
=
CalFuel_CurSeg
(
Step
)
;
Fuel_CurSeg
=
Step
;
}
else
{
...
...
@@ -226,149 +220,7 @@ void Fuel_User_KL15_OFF_Processing_Service(void)
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_Display
* Description : Step - 步数
* Input : None
* Output : None
* Return : None
* 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
;
}
/*-------------------------------------------------------------------------
* Function Name : Fuel_Get_CurSeg
* Description : 燃油当前格
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_FuelConsump/Data_FuelConsump.c
View file @
7b6e711e
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_FuelConsump/Data_FuelConsump.h
View file @
7b6e711e
...
...
@@ -16,33 +16,4 @@ extern uint32_t OldTotalFuel_Comprehensive;
extern
uint32_t
OldTotalFuel_ThisTime
;
extern
uint32_t
OldOdo_ThisTime
;
extern
void
Fuel_Consump_K15_Init
(
void
);
extern
void
Fuel_Consump_K30_Init
(
void
);
/*综合油耗*/
extern
void
Data_FuelCounsComprehensive
(
void
);
extern
uint32_t
Get_FuelCounsComprehensive_ToalFuelLitre
(
void
);
extern
uint32_t
Get_FuelCounsComprehensive_ODO
(
void
);
extern
uint16_t
Get_FuelCounsComprehensive_Value
(
void
);
extern
uint32_t
Get_FuelCounsComprehensive_RunTime
(
void
);
/*小计油耗*/
extern
void
Data_FuelCounsumpTrip
(
void
);
extern
void
Rest_FuelCounsumpTrip_Data
(
void
);
extern
uint32_t
Get_FuelCounsumpTrip_ToalFuelLitre
(
void
);
extern
uint32_t
Get_FuelCounsumpTrip_ODO
(
void
);
extern
uint16_t
Get_FuelCounsumpTrip_Value
(
void
);
/*本次油耗*/
extern
void
Data_FuelCounsumpThisTime
(
void
);
extern
void
Rest_FuelCounsumpThisTime_Data
(
void
);
extern
uint32_t
Get_FuelCounsumpThisTime_ToalFuelLitre
(
void
);
extern
uint32_t
Get_FuelCounsumpThisTime_ODO
(
void
);
extern
uint16_t
Get_FuelCounsumpThisTime_Value
(
void
);
/*加油油行车信息*/
extern
void
Data_Info_Last_Refueling
(
void
);
extern
void
Rest_Refueling_Data
(
void
);
extern
uint16_t
Get_Refueling_AVF
(
void
);
extern
uint32_t
Get_Refueling_Trip
(
void
);
extern
uint32_t
Get_Refueling_ToalFuelLitre
(
void
);
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_ODO/Services_ODO_user.c
View file @
7b6e711e
...
...
@@ -135,8 +135,6 @@ void TYW_Data_ODO_Clear(void)
if
((
Get_Data_Veh_value
>=
Get_Data_Veh_valueMax
)
&&
(
Get_Data_Rev_value
>=
Get_Data_Rev_valueMax
))
{
Data_Mileage_Clear
();
Rest_FuelCounsumpTrip_Data
();
Rest_FuelCounsumpThisTime_Data
();
}
}
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
View file @
7b6e711e
#include "Data_VehicleSpeed.h"
#include "TimerB.h"
#include "Gauges.h"
#include "GaugesInterface.h"
#include "TimerB.h"
#define VEH_FILTER_LEN 7
#include "Common_Interface.h"
static
struct
{
uint8_t
Count
;
uint16_t
Data
[
VEH_FILTER_LEN
];
}
VehcleFilter
;
static
uint32_t
SPEED_PPK
=
15925u
;
static
uint32_t
SPEED_RADIO
=
637u
;
uint16_t
Vehicle_ACT_Speed
;
uint16_t
Vehicle_DISP_Speed
;
uint8_t
VehicleSpeedValid
;
uint8_t
Vehicle_CurSeg
;
static
uint16_t
Cal_VehSpeed
(
uint16_t
Fre
,
uint8_t
Len
);
uint8_t
VehicleSpeedValid
;
uint8_t
Vehicle_CurSeg
;
uint8_t
DataOverSpeed
;
uint8_t
DataOverSpeedK_Line
;
uint32_t
SPEED_PPK
;
volatile
uint32_t
VehFreBuf
[
VehFreNum
];
void
Speed_KL30_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
=
0u
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
V
EH_FILTER_LEN
;
i
++
)
DataOverSpeedK_Line
=
0u
;
for
(
i
=
0
;
i
<
V
ehFreNum
;
i
++
)
{
Veh
cleFilter
.
Data
[
i
]
=
0
;
Veh
FreBuf
[
i
]
=
0u
;
}
Set_Speed_PPK
(
SPEED_RADIO
);
}
void
Speed_KL15_ON_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
=
0u
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
DataOverSpeedK_Line
=
0u
;
SPEED_PPK
=
15925u
;
Veh_Fre_Init
(
SPEED_PPK
);
for
(
i
=
0
;
i
<
VehFreNum
;
i
++
)
{
Veh
cleFilter
.
Data
[
i
]
=
0
;
Veh
FreBuf
[
i
]
=
0u
;
}
Veh_Fre_Init
(
Get_Speed_PPK
());
}
void
Speed_KL15_OFF_Init
(
void
)
{
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
void
Speed_Wakeup_Init
(
void
)
{
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
void
Speed_Sleep_Init
(
void
)
{
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
void
Speed_Processing_Service
(
void
)
{
static
uint8_t
i
=
0u
;
uint32_t
VehValTmp
=
0u
;
uint32_t
VehValDisp
=
0u
;
uint16_t
VehValCup
=
0u
;
uint32_t
PPK
=
0u
;
uint16_t
DataOverSpeedValue
;
PPK
=
Get_Speed_PPK
();
VehValTmp
=
Cal_Veh_Frequency
();
COMMON_PowerStatus_t
IG_Sta
;
VehValTmp
*=
36000u
;
VehValTmp
/=
PPK
;
IG_Sta
=
Common_Get_IG_Sts_Valid
();
if
(
VehValTmp
>
2250
)
if
(
IG_Sta
==
COMMON_POWER_ON
)
{
VehicleSpeedValid
=
0
;
/**/
DataOverSpeedValue
=
K_Line_Set
.
K_Line_LID44
;
DataOverSpeedValue
*=
10u
;
Vehicle_ACT_Speed
=
0
;
}
else
{
VehicleSpeedValid
=
1
;
PPK
=
Get_Speed_PPK
();
VehValTmp
=
Cal_Veh_Frequency
();
VehValTmp
*=
36000u
;
VehValTmp
/=
PPK
;
VehFreBuf
[
i
]
=
VehValTmp
;
if
(
VehValTmp
>=
1400u
)
i
++
;
if
(
i
>
VehFreNum
)
{
Vehicle_ACT_Speed
=
1400u
;
Fre_SortShort
(
VehFreBuf
,
VehFreNum
);
i
=
0u
;
}
else
if
(
VehValTmp
<=
40u
)
VehValCup
=
(
uint16_t
)
VehFreBuf
[
1u
];
if
(
VehValCup
>
2250
)
{
VehicleSpeedValid
=
0u
;
Vehicle_ACT_Speed
=
0u
;
}
else
{
Vehicle_ACT_Speed
=
VehValTmp
;
VehicleSpeedValid
=
1u
;
if
(
VehValCup
>=
1400u
)
{
Vehicle_ACT_Speed
=
1400u
;
}
else
if
(
VehValCup
<=
40u
)
{
Vehicle_ACT_Speed
=
0u
;
}
else
{
Vehicle_ACT_Speed
=
VehValCup
;
}
}
}
//传入表头 计算放大系数
VehValDisp
=
VehSpeedAmplification
((
uint16_t
)
Vehicle_ACT_Speed
);
SetGaugesPara
(
VehGauges
,
(
uint16_t
)
VehValDisp
);
//传入表头 计算放大系数
VehValDisp
=
VehSpeedAmplification
((
uint16_t
)
Vehicle_ACT_Speed
);
SetGaugesPara
(
VehGauges
,
(
uint16_t
)
VehValDisp
);
//获得显示格和显示车速
Vehicle_CurSeg
=
GetGaugesCurrentPos
(
VehGauges
);
Vehicle_DISP_Speed
=
VehValDisp
;
//GetVehDisVal(Vehicle_CurSeg, &GaugesInfo_Init_Table[VehGauges]);
}
//获得显示格和显示车速
Vehicle_CurSeg
=
GetGaugesCurrentPos
(
VehGauges
);
Vehicle_DISP_Speed
=
VehValDisp
;
//GetVehDisVal(Vehicle_CurSeg, &GaugesInfo_Init_Table[VehGauges]);
static
uint16_t
Cal_VehSpeed
(
uint16_t
Fre
,
uint8_t
Len
)
{
static
uint16_t
u16Result
=
0
;
if
(
Fre
>
2000
)
{
// do nothing
if
(
K_Line_Set
.
K_Line_LID44
!=
0xFF
)
{
if
(
DataOverSpeedK_Line
)
{
if
(
Vehicle_DISP_Speed
<=
DataOverSpeedValue
)
DataOverSpeedK_Line
=
0
;
}
else
{
if
(
Vehicle_DISP_Speed
>=
(
DataOverSpeedValue
+
20
))
DataOverSpeedK_Line
=
1
;
}
}
}
else
{
if
(
VehcleFilter
.
Count
<
Len
)
{
VehcleFilter
.
Data
[
VehcleFilter
.
Count
]
=
Fre
;
VehcleFilter
.
Count
++
;
}
else
{
VehcleFilter
.
Count
=
0
;
App_SortNByte
(
VehcleFilter
.
Data
,
Len
);
u16Result
=
VehcleFilter
.
Data
[
2
];
u16Result
+=
VehcleFilter
.
Data
[
3
];
u16Result
+=
VehcleFilter
.
Data
[
3
];
u16Result
+=
VehcleFilter
.
Data
[
4
];
u16Result
/=
4
;
}
i
=
0u
;
}
return
u16Result
;
}
/*-------------------------------------------------------------------------
* Function Name : Set_Speed_PPK
* Description : 设置PPK值,初始化 或需要改变时调用
* Input :
10倍的PPK
* Input :
* Output : None
* Return : None
* onther : PPK = 频率 * 3600 / 车速
...
...
@@ -239,3 +233,111 @@ uint8_t Speed_Get_Valid(void)
{
return
VehicleSpeedValid
;
}
/******************************************************************************
函数名:Data_Acc_Speed_Processing
功 能: 加速度计算
参 数: 无
返回值:无
******************************************************************************/
void
Data_Acc_Speed_Processing
(
void
)
{
#if 0
uint16_t Speed_New = 0;
uint16_t AccSpeed = 0;
Speed_New = DATA_VEHICLE_SPEED_DISPLAYING;
AccSubSpeed.Sig.ACCSpeed_Time++;
if (AccSubSpeed.Sig.ACCSpeed_Time >= 10)
{
AccSubSpeed.Sig.ACCSpeed_Time = 0;
if (Speed_Old <= Speed_New)
{
AccSpeed = Speed_New - Speed_Old;
Speed_Old = Speed_New ;
if (AccSpeed > User_App.User_JADD)
{
AccSubSpeed.Sig.AccSpeed_Flag = 1 ;
}
else
{
AccSubSpeed.Sig.AccSpeed_Flag = 0 ;
}
AccSubSpeed.Sig.SubSpeed_Flag = 0 ;
}
else
{
AccSpeed = Speed_Old - Speed_New;
Speed_Old = Speed_New ;
if (AccSpeed > User_App.User_JSUB)
{
AccSubSpeed.Sig.SubSpeed_Flag = 1 ;
}
else
{
AccSubSpeed.Sig.SubSpeed_Flag = 0 ;
}
AccSubSpeed.Sig.AccSpeed_Flag = 0 ;
}
}
#endif
}
/******************************************************************************
函数名:Data_GsLYbL_Speed_Processing
功 能: 高速路, 一般路判断
参 数: 无
返回值:无
******************************************************************************/
void
Data_GsLYbL_Speed_Processing
(
void
)
{
#if 0
uint16_t User_Gsl = 0;
uint16_t User_Ybl = 0;
User_Gsl = (uint16_t)User_App.User_Gsl * 10 ;
User_Ybl = (uint16_t)User_App.User_Ybl * 10 ;
if ( DATA_VEHICLE_SPEED_DISPLAYING >= 600 )
{
if (GslYblSpeedTime <= 6000 )
GslYblSpeedTime++;
}
else if ( DATA_VEHICLE_SPEED_DISPLAYING <= 590 )
{
GslYblSpeedTime = 0;
}
if (GslYblSpeedTime >= 6000)
{
AccSubSpeed.Sig.GslYbl_Flag = 1;
}
else
{
AccSubSpeed.Sig.GslYbl_Flag = 0;
}
if (AccSubSpeed.Sig.GslYbl_Flag == 1)
{
if (DATA_VEHICLE_SPEED_DISPLAYING > User_Gsl)
{
AccSubSpeed.Sig.GslSpeed_Flag = 1;
}
else if (DATA_VEHICLE_SPEED_DISPLAYING <= (User_Gsl - 10))
{
AccSubSpeed.Sig.GslSpeed_Flag = 0;
}
}
else
{
if (DATA_VEHICLE_SPEED_DISPLAYING > User_Ybl)
{
AccSubSpeed.Sig.GslSpeed_Flag = 1;
}
else if (DATA_VEHICLE_SPEED_DISPLAYING <= (User_Ybl - 10))
{
AccSubSpeed.Sig.GslSpeed_Flag = 0;
}
}
#endif
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.h
View file @
7b6e711e
...
...
@@ -4,6 +4,9 @@
#include "TYW_stdint.h"
/*对频率计算车速做平均的个数*/
#define VehFreNum 3u
extern
void
Speed_KL30_Init
(
void
);
extern
void
Speed_KL15_ON_Init
(
void
);
extern
void
Speed_KL15_OFF_Init
(
void
);
...
...
@@ -19,5 +22,7 @@ extern uint16_t Speed_Get_ActualValue(void);
extern
uint16_t
Speed_Get_Display_Value
(
void
);
extern
uint8_t
Speed_Get_Valid
(
void
);
extern
uint8_t
Speed_Get_CurSeg
(
void
);
extern
void
Data_Acc_Speed_Processing
(
void
);
extern
void
Data_GsLYbL_Speed_Processing
(
void
);
#endif
This diff is collapsed.
Click to expand it.
source/Application/APP/GaugesMode/Gauges.c
View file @
7b6e711e
This diff is collapsed.
Click to expand it.
source/Application/APP/GaugesMode/Gauges.h
View file @
7b6e711e
...
...
@@ -6,7 +6,7 @@
* @date 2021-2-22
* @version A001
* @par Copyright (c):
*
TIANYOUWEI
*
TIANYOUWEI
* @par History:
* version: author, date, desc\n
...
...
@@ -33,6 +33,7 @@ typedef enum
LEDTempType
,
IndicatTypeTOtal
,
FreeMoveType
,
}
_GaugesType
;
/**@struct _GaugesInfoInit
*this is _GaugesInfoInit
...
...
@@ -51,8 +52,9 @@ typedef struct
uint8_t
GaugesTestFlag
;
}
_GaugesInfoInit
;
extern
uint8_t
QuerySector
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
,
uint8_t
SubAscf
);
extern
uint16_t
GetGaugestargetPosSub
(
_GaugesInfoInit
*
GParam
,
uint8_t
SubAscf
,
uint8_t
SectorID
,
uint8_t
DirecSignPara
);
extern
uint8_t
QuerySector
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
,
uint8_t
SubAscf
,
uint16_t
FunGaugesDataIn
);
extern
uint16_t
GetGaugestargetPosSub
(
_GaugesInfoInit
*
GParam
,
uint8_t
SubAscf
,
uint8_t
SectorID
,
uint8_t
DirecSignPara
,
uint16_t
FunGaugesDataIn
);
extern
uint16_t
GetGaugestargetPos
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
);
extern
void
GaugesForwardParaManage
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
);
extern
void
GaugesInversionParaManage
(
_GaugesInfoInit
*
GParam
,
uint8_t
DirecSignPara
);
...
...
@@ -68,13 +70,13 @@ extern uint16_t GetGaugesCurrentPos(uint8_t GaugesNum) ;
/*表头处理函数*/
extern
void
GaugeSchedule
(
uint8_t
GaugesNum
,
_GaugesInfoInit
*
GParam
);
/*表头时间函数放在ms定时中*/
extern
void
Gauges_Time_Xms_Count
(
uint8_t
Xms
);
extern
void
Gauges_Time_Xms_Count
(
uint8_t
Xms
);
/*得到格的内部小步*/
extern
uint16_t
GetGaugesCurrentStep
(
uint8_t
GaugesNum
);
/*通过车速目标步得到实际车速*/
extern
uint16_t
GetVehDisVal
(
uint16_t
VehCurPos
,
_GaugesInfoInit
*
GParam
);
/*设置FreeMoveType模式仪表走动时间*/
extern
void
SetFreeMoveTimes
(
uint16_t
GaugesMoveTimes
);
extern
void
SeftTest_GaugeMoveing
(
uint8_t
GaugesNum
)
;
/*得到上下行方向 返回值:1 2*/
extern
uint8_t
GetGaugesDirec
(
uint8_t
GaugesNum
)
;
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
View file @
7b6e711e
...
...
@@ -265,7 +265,7 @@ uint16_t RevSpeedManage(uint16_t Speed)
void
Fre_SwapShort
(
volatile
uint32_t
*
pData1
,
volatile
uint32_t
*
pData2
);
void
Fre_SortShort
(
volatile
uint32_t
SortData
[],
uint8_t
len
);
//uint16_t Cal_Veh_Frequency(void);
...
...
@@ -457,6 +457,7 @@ uint16_t Cal_Veh_Frequency(void)
{
;
}
return
VehFre
.
Frequency
;
}
/**@brief Cal Veh Val function计算车速
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/GaugesMode/GaugesInterface.c
View file @
7b6e711e
...
...
@@ -15,31 +15,31 @@ static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
/*转速*/
{
{
0u
,
1000
,
1500
,
2000
,
2500
,
3000
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0u
,
1000
,
1500
,
2000
,
2500
,
3000
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0u
,
6
,
11
,
16
,
21
,
27
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
{
0u
,
6
,
11
,
16
,
21
,
27
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
},
/*水温*/
{
{
49
,
50
,
55
,
61
,
66
,
72
,
77
,
102
,
104
,
106
,
108
,
110
,
111
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
49
,
5
0
,
55
,
61
,
66
,
72
,
77
,
102
,
104
,
106
,
108
,
110
,
111
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
{
{
0
,
50
,
55
,
61
,
66
,
72
,
77
,
102
,
104
,
106
,
108
,
110
,
111
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
49
,
5
4
,
60
,
65
,
71
,
76
,
101
,
103
,
105
,
107
,
109
,
110
,
210
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
},
/*PRI气压*/
{
{
0
,
500
,
720
,
940
,
1160
,
1380
,
1600
,
1820
,
2040
,
2260
,
2480
,
2700
,
2920
,
3140
,
3360
,
3580
,
3800
,
4020
,
4240
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
610
,
830
,
1050
,
1270
,
1490
,
1710
,
1930
,
2150
,
2370
,
2590
,
2810
,
3030
,
3250
,
3470
,
3690
,
3910
,
4130
,
4350
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
17
,
0
,
0
,
0
,
0
,
0
}
{
{
0
,
500
,
720
,
940
,
1160
,
1380
,
1600
,
1820
,
2040
,
2260
,
2480
,
2700
,
2920
,
3140
,
3360
,
3580
,
3800
,
4020
,
4240
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
610
,
830
,
1050
,
1270
,
1490
,
1710
,
1930
,
2150
,
2370
,
2590
,
2810
,
3030
,
3250
,
3470
,
3690
,
3910
,
4130
,
4350
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
0
,
0
,
0
,
0
,
0
}
},
/*SEC气压*/
{
{
0
,
500
,
720
,
940
,
1160
,
1380
,
1600
,
1820
,
2040
,
2260
,
2480
,
2700
,
2920
,
3140
,
3360
,
3580
,
3800
,
4020
,
4240
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
610
,
830
,
1050
,
1270
,
1490
,
1710
,
1930
,
2150
,
2370
,
2590
,
2810
,
3030
,
3250
,
3470
,
3690
,
3910
,
4130
,
4350
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
17
,
0
,
0
,
0
,
0
,
0
}
{
{
0
,
500
,
720
,
940
,
1160
,
1380
,
1600
,
1820
,
2040
,
2260
,
2480
,
2700
,
2920
,
3140
,
3360
,
3580
,
3800
,
4020
,
4240
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
610
,
830
,
1050
,
1270
,
1490
,
1710
,
1930
,
2150
,
2370
,
2590
,
2810
,
3030
,
3250
,
3470
,
3690
,
3910
,
4130
,
4350
,
4500
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
0
,
0
,
0
,
0
,
0
}
},
/*WET气压*/
{
{
500
,
730
,
960
,
1190
,
1420
,
1650
,
1880
,
2100
,
2330
,
2560
,
2790
,
3020
,
3250
,
3480
,
3710
,
3940
,
4170
,
4400
,
4500
,
0
,
0
,
0
,
0
,
0
,
0
},
{
600
,
830
,
1060
,
1290
,
1520
,
1750
,
1980
,
2200
,
2430
,
2660
,
2890
,
3120
,
3350
,
3580
,
3810
,
4040
,
4270
,
4500
,
4500
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
1
7
,
0
,
0
,
0
,
0
,
0
,
0
}
{
{
500
,
730
,
960
,
1190
,
1420
,
1650
,
1880
,
2100
,
2330
,
2560
,
2790
,
3020
,
3250
,
3480
,
3710
,
3940
,
4170
,
4400
,
4500
,
0
,
0
,
0
,
0
,
0
,
0
},
{
600
,
830
,
1060
,
1290
,
1520
,
1750
,
1980
,
2200
,
2430
,
2660
,
2890
,
3120
,
3350
,
3580
,
3810
,
4040
,
4270
,
4500
,
4500
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
1
8
,
0
,
0
,
0
,
0
,
0
,
0
}
},
/*电池电压*/
{
{
0
,
17000
,
19000
,
20000
,
21000
,
22000
,
23000
,
24000
,
25000
,
26000
,
27000
,
28000
,
29000
,
30000
,
30500
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
17000
,
18500
,
19500
,
20500
,
21500
,
22500
,
23500
,
24500
,
25500
,
26500
,
27500
,
28500
,
29500
,
30000
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
{
0
,
17000
,
19000
,
20000
,
21000
,
22000
,
23000
,
24000
,
25000
,
26000
,
27000
,
28000
,
29000
,
30000
,
30500
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
17000
,
18500
,
19500
,
20500
,
21500
,
22500
,
23500
,
24500
,
25500
,
26500
,
27500
,
28500
,
29500
,
30000
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
}
},
...
...
@@ -49,14 +49,14 @@ static const uint16_t GaugesDataInInit[GaugesTotal][3][25] =
static
const
uint8_t
GaugesIndicatType
[
GaugesTotal
]
=
{
LEDOtherType
,
LEDOtherType
,
LEDTempType
,
LEDGasType
,
LEDGasType
,
LEDGasType
,
LEDOtherType
};
/*初始化表头显示类型,例如水温,气压*/
/*每个表头包含的参数个数*/
/*表头1 表头2 表头3 表头4*/
static
const
uint8_t
GaugesParaNum
[
GaugesTotal
]
=
{
12
,
6
,
13
,
20
,
20
,
19
,
14
};
static
const
uint8_t
GaugesParaNum
[
GaugesTotal
]
=
{
12
,
6
,
13
,
19
,
19
,
19
,
14
};
/*每个表头IGON后开始走动时间*/
/*表头1 表头2 表头3 表头4 表头5 表头6*/
static
const
uint16_t
GaugesStarMoveTime
[
GaugesTotal
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,};
/*0是上电就开始走动,其他参数是ms*/
/*每个表头IGON后是否自检*/
/*表头1 表头2 表头3 表头4 表头5 表头6*/
static
const
uint16_t
GaugesTest
[
GaugesTotal
]
=
{
1
,
1
,
1
,
1
,
1
,
0
,
0
,};
/*1是自检,0不自检*/
/*每个表头自检走动每格时间*/
const
uint16_t
SeftTest_Gauges_Times
[
GaugesTotal
]
=
{
1500
/
(
30
+
1
),
1500
/
(
27
+
1
)
,
1500
/
(
12
+
1
),
1500
/
(
17
+
1
),
1500
/
(
17
+
1
),
0
,
0
};
/*每个表头自检走动每格时间*/
const
uint16_t
SeftTest_Gauges_Times
[
GaugesTotal
]
=
{
1500
/
(
30
+
1
),
1500
/
(
27
+
1
)
,
1500
/
(
12
+
1
),
1500
/
(
18
+
1
),
1500
/
(
18
+
1
),
0
,
0
};
uint16_t
RealDataIn
[
GaugesTotal
];
_GaugesInfoInit
GaugesInfo_Init_Table
[
GaugesTotal
];
/**@brief User Gauge K30 Init function
...
...
@@ -129,7 +129,7 @@ void UserGaugeSchedule(void)
for
(
i
=
0u
;
i
<
GaugesTotal
;
i
++
)
{
GaugeSchedule
(
i
,
&
GaugesInfo_Init_Table
[
i
]);
}
}
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/GaugesMode/GaugesInterface.h
View file @
7b6e711e
...
...
@@ -26,6 +26,7 @@ typedef struct
uint16_t
DataDisplay
;
uint8_t
Valid
;
uint16_t
LostTimer
;
uint8_t
Status
;
}
DataStruct
;
extern
DataStruct
DataStrGas1
;
...
...
@@ -63,4 +64,6 @@ extern uint16_t Cal_Veh_Frequency(void) ;
extern
void
App_SortNByte
(
uint16_t
*
SortData
,
uint8_t
len
);
extern
void
Fre_SortShort
(
volatile
uint32_t
SortData
[],
uint8_t
len
);
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/APP/PowerManagement/PowerManagement_user.c
View file @
7b6e711e
...
...
@@ -130,7 +130,6 @@ Power_Status_t Power_KL30_Init ( void )
BL_Init
();
/*****油耗类****/
Fuel_Consump_K30_Init
();
Fuel_User_KL30_Init
();
u8PowerSts
=
m_IGN_OFF_Init
;
return
u8PowerSts
;
...
...
@@ -254,8 +253,6 @@ void Power_IG_ON_Init(void)
//LongTimeNoKey_Operation_TimeRest();
CD4051B_KL15Init
();
Fuel_Consump_K15_Init
();
GUI_Display_KL15_ON_Init
();
}
Power_Status_t
Power_Stay_ON
(
void
)
...
...
This diff is collapsed.
Click to expand it.
source/Application/APP/Telltales/Telltales.h
View file @
7b6e711e
...
...
@@ -44,6 +44,8 @@ typedef enum
em_LED_TRAILER_ABS_U
,
em_LED_WORKING_LAMP_U
,
em_LED_TRAILER_ABS_INFO_U
,
em_LED_TEMP
,
em_LED_FUEL
,
LED_Max
,
}
LED_Idx_t
;
...
...
@@ -144,6 +146,8 @@ uint8_t LED_AIR_SUS_R_Judgement(void);
uint8_t
LED_TRAILER_ABS_U_Judgement
(
void
);
uint8_t
LED_WORKING_LAMP_U_Judgement
(
void
);
uint8_t
LED_TRAILER_ABS_INFO_U_Judgement
(
void
);
uint8_t
LED_Temp_Judgement
(
void
);
uint8_t
LED_Fuel_Judgement
(
void
);
/*LED执行函数*/
void
LED_INTER_DIFF_LOCK_T_Execution
(
uint8_t
led_status
);
...
...
@@ -183,6 +187,8 @@ void LED_AIR_SUS_R_Execution(uint8_t led_status);
void
LED_TRAILER_ABS_U_Execution
(
uint8_t
led_status
);
void
LED_WORKING_LAMP_U_Execution
(
uint8_t
led_status
);
void
LED_TRAILER_ABS_INFO_U_Execution
(
uint8_t
led_status
);
void
LED_Temp_Execution
(
uint8_t
led_status
);
void
LED_Fuel_Execution
(
uint8_t
led_status
);
/*:ZH*/
#endif
This diff is collapsed.
Click to expand it.
source/Application/APP/Telltales/Telltales_user.c
View file @
7b6e711e
...
...
@@ -57,8 +57,8 @@ const LED_Attribute_st LED_Attribute[LED_Max] =
{
em_LED_TRAILER_ABS_U
,
SelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_TRAILER_ABS_U_Judgement
,
LED_TRAILER_ABS_U_Execution
},
{
em_LED_WORKING_LAMP_U
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_WORKING_LAMP_U_Judgement
,
LED_WORKING_LAMP_U_Execution
},
{
em_LED_TRAILER_ABS_INFO_U
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_TRAILER_ABS_INFO_U_Judgement
,
LED_TRAILER_ABS_INFO_U_Execution
},
{
em_LED_TEMP
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_Temp_Judgement
,
LED_Temp_Execution
},
{
em_LED_FUEL
,
NoSelfCheck
,
NoExterNalCheck
,
LED_IGN_ON
,
0u
,
3000ul
,
LED_Fuel_Judgement
,
LED_Fuel_Execution
},
};
/*must put into 10ms task*/
...
...
@@ -88,7 +88,7 @@ uint8_t LED_MAINTENANCE_F = 0x00u;
uint8_t LED_SEATBELT_F = 0x00u;
*/
/******************************************************************************
T3 L1 L2 L3 R1 R2 R3 U1 U4 U5无灯 左右转向单独
水温 燃油 气压1 气压2 在显示处做逻辑
T3 L1 L2 L3 R1 R2 R3 U1 U4 U5无灯 左右转向单独
气压1 气压2 指示灯是背光
******************************************************************************/
/******************************************************************************
...
...
@@ -1916,4 +1916,85 @@ void LED_TRAILER_ABS_INFO_U_Execution(uint8_t led_status)
{
SEG_LED_TRAILER_ABS_INFO_U
(
0
);
}
}
/******************************************************************************
Temp
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_Temp_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_Temp_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1u
)
{
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH7 , testBG );//水温格白色
TEMP_R_LED_OUT
=
1u
;
/*水温红灯*/
Water_Temp_Led_R_MCU_OUT
=
1u
;
TEMP_W_LED_OUT
=
0u
;
//水温字符白色指示灯
Water_Temp_Led_W_MCU_OUT
=
0u
;
}
else
{
TEMP_R_LED_OUT
=
0u
;
/*水温红灯*/
Water_Temp_Led_R_MCU_OUT
=
0u
;
TEMP_W_LED_OUT
=
1u
;
//水温字符白色指示灯
Water_Temp_Led_W_MCU_OUT
=
1u
;
}
}
/******************************************************************************
Fuel
信号接口:
信号定义:
输出信号:
******************************************************************************/
uint8_t
LED_Fuel_Judgement
(
void
)
{
uint8_t
u8Result
=
0u
;
uint8_t
m_Condition1
=
0u
;
//m_Condition1 = Fuel_Get_LowAlarm();
if
(
m_Condition1
==
1u
)
{
u8Result
=
1u
;
}
else
{
u8Result
=
0u
;
}
return
u8Result
;
}
void
LED_Fuel_Execution
(
uint8_t
led_status
)
{
if
(
led_status
==
1u
)
{
FUEL_LED_Y_MCU
=
1U
;
FUEL_W_LED_OUT
=
0U
;
}
else
{
FUEL_LED_Y_MCU
=
0U
;
FUEL_W_LED_OUT
=
1U
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/RTE/Common_Interface.c
View file @
7b6e711e
...
...
@@ -52,10 +52,7 @@ static uint8_t CanFirstEvent[ID_TOTAL_MAX];
static
void
Individual_ECU_Communication
(
void
);
// wangboyu - end
/*菜单设置项存储EEP结构*/
//_Menu_Configure_Value Menu_Con_EEP_Value;
extern
uint8_t
u8MenuItemVariateNum
[
MENU_ITEM_MAX
];
extern
uint8_t
u8MenuItemVariateData
[
MENU_ITEM_MAX
];
_EOL_K_LINE_SET
K_Line_Set
;
/*每次唤醒调用*/
void
Common_DataInit
(
void
)
...
...
@@ -182,20 +179,6 @@ static void Common_Set_Disp_E_Speed_Valid(DataValid_t Val)
Disp_E_Speed_Valid
=
Val
;
}
uint16_t
Common_Get_DispSpeed
(
void
)
{
uint16_t
m_Res
;
if
(
Disp_V_Speed_Valid
)
{
m_Res
=
(((
Disp_V_Speed
/
10u
)
*
16u
)
/
9u
);
}
else
{
m_Res
=
0x1fffu
;
}
return
m_Res
;
}
/*2MS任务*/
static
uint16_t
wbyTest
=
0
;
void
Common_Input_Para
(
void
)
...
...
@@ -313,7 +296,8 @@ void Common_BlockDelay(uint16_t m_MS)
Counter
=
65535u
-
RocBackup
+
Counter
+
1u
;
}
}
while
(
Counter
<
DIMCounter
);
}
while
(
Counter
<
DIMCounter
);
}
uint32_t
Common_GetIgnOnTime
(
void
)
...
...
@@ -332,3 +316,58 @@ int32_t SEGGER_RTT_printf(uint16_t BufferIndex, const char *sFormat, ...)
{
return
0
;
}
void
K_LINE_EOL_InitVal
(
void
)
{
K_Line_Set
.
K_Line_LID20
=
0x00u
;
/* 00 应对ECE R13 //0:非应对、1:应对 */
K_Line_Set
.
K_Line_LID21
=
0x00u
;
/* 00 EBS/ABS //0:无、1:EBS、2:ABS(CAN应对) 3:ABS (CAN非应对) */
K_Line_Set
.
K_Line_LID22
=
0x00u
;
/* 00 EVSC //0:无、1:有 */
K_Line_Set
.
K_Line_LID23
=
0x00u
;
/* 00 驻车锁定 //0:无、1:有 */
K_Line_Set
.
K_Line_LID24
=
0x00u
;
/* 00 HSA //0:无、1:有 */
K_Line_Set
.
K_Line_LID25
=
0x00u
;
/* 00 AEBS //0:无、1:有 */
K_Line_Set
.
K_Line_LID26
=
0x00u
;
/* 00 ACC //0:无、1:有 */
K_Line_Set
.
K_Line_LID27
=
0x00u
;
/* 00 LDWS //0:无、1:有 */
K_Line_Set
.
K_Line_LID28
=
0x00u
;
/* 00 车辆间报警 //0:无、1:有 */
K_Line_Set
.
K_Line_LID29
=
0x01u
;
/* 01 有无巡航 //0:无、1:有 /*初值1*/
K_Line_Set
.
K_Line_LID2A
=
0x00u
;
/* 00 气悬 //0:Reef、1:Rear air、2:Full air */
K_Line_Set
.
K_Line_LID2B
=
0x00u
;
/* 00 ISS //0:无、1: eco stop、 2:Idle Stop */
K_Line_Set
.
K_Line_LID2C
=
0x00u
;
/* 00 装货台工作警报蜂鸣 //0:无、1:有 */
K_Line_Set
.
K_Line_LID2D
=
0x00u
;
/* 00 ROWS //0:无、1:ROWS有、2LOCAL警报有 */
K_Line_Set
.
K_Line_LID2E
=
0x00u
;
/* 00 行车记录仪 //0:模拟记录仪、1:数字记录仪或行车记录仪 */
K_Line_Set
.
K_Line_LID2F
=
0x00u
;
/* 00 车型 //0:单车、1:拖车、2:全拖车 */
K_Line_Set
.
K_Line_LID30
=
0x00u
;
/* 00 缓速器 //0:无、1:有(C&E)、2:有(F) */
K_Line_Set
.
K_Line_LID31
=
0x01u
;
/* -- 定速巡航 //0:无、1:有 */
K_Line_Set
.
K_Line_LID32
=
0x00u
;
/* 00 装货台种类 //0:一般、1:侧翼、2:倾倒 */
K_Line_Set
.
K_Line_LID33
=
0x01u
;
/* 01 SCR?DPD //0:SCR无/DPD有、1:SCR有/DPD有、2:SCR无/DPD无、3:SCR有/DPD无 /*初值1*/
K_Line_Set
.
K_Line_LID34
=
0x00u
;
/* 00 驻车种类 //0:FULL AIR、1:AOH /*初值1*/
K_Line_Set
.
K_Line_LID35
=
0x00u
;
/* -- 气压计 //0:2针式、1:1针式 */
K_Line_Set
.
K_Line_LID36
=
0x00u
;
/* -- 低压警报压 //0:一般输出(539kPa)、1:ADR(588kPa) */
K_Line_Set
.
K_Line_LID37
=
0x01u
;
/* -- 超限警报 //0:无、1:有 */
K_Line_Set
.
K_Line_LID38
=
0x01u
;
/* -- 速度警报 //0:无、1:有 */
K_Line_Set
.
K_Line_LID39
=
0x00u
;
/* 00 可变SLD //0:无、1:1车速、2:2车速 /*初值1*/
K_Line_Set
.
K_Line_LID3A
=
0x00u
;
/* -- OEM //0:ISZ、1:UDT */
K_Line_Set
.
K_Line_LID3B
=
0x00u
;
/* -- 预留 */
K_Line_Set
.
K_Line_LID3C
=
0x00u
;
/* -- 预留 */
K_Line_Set
.
K_Line_LID3D
=
0x00u
;
/* -- 预留 */
K_Line_Set
.
K_Line_LID3E
=
0x01u
;
/* 01 预留 //0:胎压功能未匹配 1:匹配 */
K_Line_Set
.
K_Line_LID3F
=
0x00u
;
/* -- 预留 */
K_Line_Set
.
K_Line_LID40
=
0x00u
;
/* 00 发动机种类 */
K_Line_Set
.
K_Line_LID41
=
0x10u
;
/* 10 变速器种类&控制 /*初值50*/
K_Line_Set
.
K_Line_LID42
=
0x00u
;
/* 00 驻车管道 /*初值 0*/
K_Line_Set
.
K_Line_LID43
=
0x82u
;
/* 82 车型 /*初值44*/
K_Line_Set
.
K_Line_LID44
=
0xFFu
;
/* FF 速度警报 /*初值FF*/
K_Line_Set
.
K_Line_LID45
=
0xFFu
;
/* FF 发动机转速 /*初值FF*/
K_Line_Set
.
K_Line_LID46
=
0xFFu
;
/* FF 急加速 /*初值FF*/
K_Line_Set
.
K_Line_LID47
=
0xFFu
;
/* FF 急减速 /*初值FF*/
K_Line_Set
.
K_Line_LID48
=
0xFFu
;
/* FF 长时间怠速 /*初值FF*/
K_Line_Set
.
K_Line_LID49
=
0xFFu
;
/* FF 辅助驻车 /*初值FF*/
K_Line_Set
.
K_Line_LID4A
=
0x32u
;
/* 32 变速箱油 5000 */
K_Line_Set
.
K_Line_LID4B
=
0x32u
;
/* 32 差速器油 5000 */
K_Line_Set
.
K_Line_LID4C
=
0x32u
;
/* 32 离合器油 */
K_Line_Set
.
K_Line_LID4D
=
0x64u
;
/* 64 动力转向油 10000 */
K_Line_Set
.
K_Line_LID4E
=
0x78u
;
/* 78 轮胎 12000 */
K_Line_Set
.
K_Line_LID4F
=
0x32u
;
/* 32 机油&滤清器 5000 */
K_Line_Set
.
K_Line_LID50
=
0x00u
;
/* -- 预留 */
K_Line_Set
.
K_Line_LID51
=
0x01u
;
/* 01 工作模式 */
K_Line_Set
.
K_Line_LID52
=
0x00u
;
/* 00 电子部件设定 */
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Application/RTE/Common_Interface.h
View file @
7b6e711e
...
...
@@ -6,36 +6,39 @@
/******************************************************************************
K-LINE下线配置
******************************************************************************/
static
struct
typedef
struct
{
// HEX
uint8_t
K_Line_LID20
;
/* 00 应对ECE R13 //0:非应对、1:应对 */
uint8_t
K_Line_LID21
;
/* 00 EBS/ABS //0:无、1:EBS、2:ABS(CAN应对) 3:ABS (CAN非应对) */
uint8_t
K_Line_LID22
;
/* 00 EVSC //0:无、1:有 */
uint8_t
K_Line_LID23
;
/* 00 驻车锁定 //0:无、1:有 */
uint8_t
K_Line_LID24
;
/* 00 HSA //0:无、1:有 */
uint8_t
K_Line_LID25
;
/* 00 AEBS //0:无、1:有 */
uint8_t
K_Line_LID26
;
/* 00 ACC //0:无、1:有 */
uint8_t
K_Line_LID27
;
/* 00 LDWS //0:无、1:有 */
uint8_t
K_Line_LID28
;
/* 00 车辆间报警 //0:无、1:有 */
uint8_t
K_Line_LID29
;
/* 01 有无巡航 //0:无、1:有 /*初值1*/
uint8_t
K_Line_LID2A
;
/* 00 气悬 //0:Reef、1:Rear air、2:Full air */
uint8_t
K_Line_LID2B
;
/* 00 ISS //0:无、1: eco stop、 2:Idle Stop */
uint8_t
K_Line_LID2C
;
/* 00 装货台工作警报蜂鸣//0:无、1:有 */
uint8_t
K_Line_LID2D
;
/* 00 ROWS //0:无、1:ROWS有、2LOCAL警报有 */
uint8_t
K_Line_LID2E
;
/* 00 行车记录仪 //0:模拟记录仪、1:数字记录仪或行车记录仪 */
uint8_t
K_Line_LID2F
;
/* 00 车型 //0:单车、1:拖车、2:全拖车 */
uint8_t
K_Line_LID30
;
/* 00 缓速器 //0:无、1:有(C&E)、2:有(F) */
uint8_t
K_Line_LID31
;
/* --
地图
巡航 //0:无、1:有 */
uint8_t
K_Line_LID31
;
/* --
定速
巡航 //0:无、1:有 */
uint8_t
K_Line_LID32
;
/* 00 装货台种类 //0:一般、1:侧翼、2:倾倒 */
uint8_t
K_Line_LID33
;
/* 01 SCR?DPD //0:SCR无/DPD有、1:SCR有/DPD有、2:SCR无/DPD无、3:SCR有/DPD无 /*初值1*/
uint8_t
K_Line_LID34
;
/* 00 驻车种类 //0:FULL AIR、1:AOH /*初值1*/
uint8_t
K_Line_LID34
;
/* 00 驻车种类 //0:FULL AIR、1:AOH /*初值1*/
uint8_t
K_Line_LID35
;
/* -- 气压计 //0:2针式、1:1针式 */
uint8_t
K_Line_LID36
;
/* -- 低压警报压 //0:一般输出(539kPa)、1:ADR(588kPa) */
uint8_t
K_Line_LID37
;
/* -- 超限警报 //0:无、1:有 */
uint8_t
K_Line_LID38
;
/* -- 速度警报 //0:无、1:有 */
uint8_t
K_Line_LID39
;
/* 00 可变SLD //0:无、1:1车速、2:2车速 /*初值1*/
uint8_t
K_Line_LID3A
;
/* -- OEM //0:ISZ、1:UDT */
...
...
@@ -45,37 +48,49 @@ static struct
uint8_t
K_Line_LID3D
;
/* -- 预留 */
uint8_t
K_Line_LID3E
;
/* 01 预留 //0:胎压功能未匹配 1:匹配 */
uint8_t
K_Line_LID3F
;
/* -- 预留 */
uint8_t
K_Line_LID40
;
/* 00 发动机种类 */
uint8_t
K_Line_LID41
;
/* 10 变速器种类&控制 /*初值50*/
uint8_t
K_Line_LID42
;
/* 00 驻车管道 /*初值 0*/
uint8_t
K_Line_LID43
;
/* 82 车型 /*初值44*/
uint8_t
K_Line_LID44
;
/* FF 速度警报 /*初值FF*/
uint8_t
K_Line_LID45
;
/* FF 发动机转速 /*初值FF*/
uint8_t
K_Line_LID46
;
/* FF 急加速 /*初值FF*/
uint8_t
K_Line_LID47
;
/* FF 急减速 /*初值FF*/
uint8_t
K_Line_LID48
;
/* FF 长时间怠速 /*初值FF*/
uint8_t
K_Line_LID49
;
/* FF 辅助驻车 /*初值FF*/
uint8_t
K_Line_LID4A
;
/* 32 变速箱油 5000 */
uint8_t
K_Line_LID4B
;
/* 32 差速器油 5000 */
uint8_t
K_Line_LID4C
;
/* 32 离合器油 */
uint8_t
K_Line_LID4D
;
/* 64 动力转向油 10000 */
uint8_t
K_Line_LID4E
;
/* 78 轮胎 12000 */
uint8_t
K_Line_LID4F
;
/* 32 机油&滤清器 5000 */
uint8_t
K_Line_LID50
;
/* -- 预留 */
uint8_t
K_Line_LID50
;
/* -- 预留 */
uint8_t
K_Line_LID51
;
/* 01 工作模式 */
uint8_t
K_Line_LID52
;
/* 00 电子部件设定 */
uint8_t
Reserved0
;
uint8_t
Reserved1
;
uint8_t
Reserved2
;
uint8_t
Reserved3
;
uint8_t
Reserved4
;
uint8_t
Reserved5
;
uint8_t
Reserved6
;
uint8_t
Reserved7
;
uint8_t
Reserved8
;
uint8_t
Reserved9
;
uint8_t
ReservedA
;
uint8_t
ReservedB
;
uint8_t
ReservedC
;
}
_EOL_K_LINE_SET
;
//
extern _EOL_K_LINE_SET K_Line_Set;
extern
_EOL_K_LINE_SET
K_Line_Set
;
extern
void
Common_DataInit
(
void
);
extern
void
Common_Input_Para
(
void
);
...
...
@@ -98,8 +113,6 @@ extern DataValid_t Common_Get_Act_E_Speed_Valid(void);
extern
DataValid_t
Common_Get_Disp_V_Speed_Valid
(
void
);
extern
DataValid_t
Common_Get_Disp_E_Speed_Valid
(
void
);
uint16_t
Common_Get_DispSpeed
(
void
);
uint32_t
Common_GetIgnOnTime
(
void
);
/*ms*/
uint32_t
Common_GetIgnOffTime
(
void
);
/*ms*/
...
...
This diff is collapsed.
Click to expand it.
source/Driver/Memory/Emulated_EEPROM.c
View file @
7b6e711e
This diff is collapsed.
Click to expand it.
source/Driver/Memory/Emulated_EEPROM.h
View file @
7b6e711e
#ifndef EMULATED_EEPROM_H__
#define EMULATED_EEPROM_H__
typedef
enum
{
EEPROM_STAT_BLANK
=
0U
,
EEPROM_STAT_ACTIVE
,
EEPROM_STAT_ERROR
,
}
EEPROM_Block_Status_en_t
;
typedef
enum
{
EEPROM_RW_PASS
=
0
,
EEPROM_RW_FAIL
,
}
EEPROM_RW_Result_en_t
;
typedef
enum
{
EEPROM_STAT_IDLE
=
0
,
EEPROM_STAT_BUSY
,
}
EEPROM_Status_en_t
;
/****************************************************************************
* !!! The following code should be generated by configuration tool !!! *
****************************************************************************/
enum
g_enEEPROMBlockName
{
EEPROM_BLOCK_UDS_FLAG
=
0U
,
EEPROM_BLOCK_UDS_S27
=
1U
,
EEPROM_BLOCK_UDS_S2E0
=
2U
,
EEPROM_BLOCK_UDS_S2E
=
3U
,
EEPROM_BLOCK_UDS_CONFIG
=
4U
,
EEPROM_BLOCK_UDS_DTC
=
5U
,
EEPROM_BLOCK_ODO
=
6U
,
EEPROM_BLOCK_ODO_STAMP
=
7U
,
EEPROM_BLOCK_TRIP_STAMP
=
8U
,
EEPROM_BLOCK_SERVICE_INFO
=
9U
,
EEPROM_BLOCK_
UE_INFO
=
10U
,
};
#define EEPROM_BLOCK_UDS_FLAG_SIZE (16U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S27_SIZE (16U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S2E0_SIZE (
160U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S2E_SIZE (
160U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_CONFIG_SIZE (40U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_DTC_SIZE (76U)
/*Life:20.0W*/
#define EEPROM_BLOCK_ODO_SIZE (4U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_ODO_STAMP_SIZE (8U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_TRIP_STAMP_SIZE (16U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_SERVICE_INFO_SIZE (56U)
/*Life:20.0W*/
#define EEPROM_BLOCK_
UE_INFO_SIZE (124U)
/*Life:100.0W*/
#define EEPROM_TOTAL_BLOCK_NUM (11U)
/****************************************************************************
* !!! End of code generation !!! *
****************************************************************************/
extern
void
EEPROM_Init
(
void
);
extern
EEPROM_Status_en_t
EEPROM_Get_Status
(
void
);
extern
EEPROM_Block_Status_en_t
EEPROM_Get_Block_Status
(
uint16_t
u16BlockID
);
extern
EEPROM_RW_Result_en_t
EEPROM_Read_Data
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
extern
EEPROM_RW_Result_en_t
EEPROM_Write_Data
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
#endif
#ifndef EMULATED_EEPROM_H__
#define EMULATED_EEPROM_H__
typedef
enum
{
EEPROM_STAT_BLANK
=
0U
,
EEPROM_STAT_ACTIVE
,
EEPROM_STAT_ERROR
,
}
EEPROM_Block_Status_en_t
;
typedef
enum
{
EEPROM_RW_PASS
=
0
,
EEPROM_RW_FAIL
,
}
EEPROM_RW_Result_en_t
;
typedef
enum
{
EEPROM_STAT_IDLE
=
0
,
EEPROM_STAT_BUSY
,
}
EEPROM_Status_en_t
;
/****************************************************************************
* !!! The following code should be generated by configuration tool !!! *
****************************************************************************/
enum
g_enEEPROMBlockName
{
EEPROM_BLOCK_UDS_FLAG
=
0U
,
EEPROM_BLOCK_UDS_S27
=
1U
,
EEPROM_BLOCK_UDS_S2E0
=
2U
,
EEPROM_BLOCK_UDS_S2E
=
3U
,
EEPROM_BLOCK_UDS_CONFIG
=
4U
,
EEPROM_BLOCK_UDS_DTC
=
5U
,
EEPROM_BLOCK_ODO
=
6U
,
EEPROM_BLOCK_ODO_STAMP
=
7U
,
EEPROM_BLOCK_TRIP_STAMP
=
8U
,
EEPROM_BLOCK_SERVICE_INFO
=
9U
,
EEPROM_BLOCK_
EOL_K_LINE
=
10U
,
};
#define EEPROM_BLOCK_UDS_FLAG_SIZE (16U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S27_SIZE (16U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S2E0_SIZE (
216U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_S2E_SIZE (
216U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_CONFIG_SIZE (40U)
/*Life:20.0W*/
#define EEPROM_BLOCK_UDS_DTC_SIZE (76U)
/*Life:20.0W*/
#define EEPROM_BLOCK_ODO_SIZE (4U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_ODO_STAMP_SIZE (8U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_TRIP_STAMP_SIZE (16U)
/*Life:1000.0W*/
#define EEPROM_BLOCK_SERVICE_INFO_SIZE (56U)
/*Life:20.0W*/
#define EEPROM_BLOCK_
EOL_K_LINE_SIZE (64U)
/*Life:20.0W*/
#define EEPROM_TOTAL_BLOCK_NUM (11U)
/****************************************************************************
* !!! End of code generation !!! *
****************************************************************************/
extern
void
EEPROM_Init
(
void
);
extern
EEPROM_Status_en_t
EEPROM_Get_Status
(
void
);
extern
EEPROM_Block_Status_en_t
EEPROM_Get_Block_Status
(
uint16_t
u16BlockID
);
extern
EEPROM_RW_Result_en_t
EEPROM_Read_Data
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
extern
EEPROM_RW_Result_en_t
EEPROM_Write_Data
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
#endif
This diff is collapsed.
Click to expand it.
source/System/tasks.c
View file @
7b6e711e
...
...
@@ -137,7 +137,7 @@ void Sys_Run_Mode_5ms_Tasks(void)
------------------------------------------------------------------------------*/
void
Sys_Run_Mode_10ms_Tasks
(
void
)
{
DisplayServices
();
DisplayServices
();
loc_Display_Service
();
Data_Mileage_Write_EEPROM
();
Line_In_Debounce_Service
();
...
...
@@ -145,7 +145,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
// Test_LED_AllLight();
Key_Service
();
CAN_BUSOFF_Recover
();
/*表头调度函数 added by yutian*/
UserGaugeSchedule
();
/*在主循环中调用*/
/*end*/
...
...
@@ -220,14 +220,14 @@ void Sys_Run_Mode_100ms_Tasks(void)
// Menu_Get_Battery_Sts_Exist();
Popups_Management_Service
();
Popup_Scheduling_Service
();
/*综合油耗信息*/
Data_FuelCounsComprehensive
();
/*小计油耗信息*/
Data_FuelCounsumpTrip
();
/*
本次油耗信息
*/
Data_
FuelCounsumpThisTime
();
/*
加油后行车信息
*/
Data_
Info_Last_Refuel
ing
();
/*
加速度计算
*/
Data_
Acc_Speed_Processing
();
/*
高速路一般路报警判断
*/
Data_
GsLYbL_Speed_Process
ing
();
}
/*============================================================================*/
...
...
This diff is collapsed.
Click to expand it.
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