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
4788817e
Commit
4788817e
authored
Oct 23, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整车速显示
parent
490dac50
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22181 additions
and
22208 deletions
+22181
-22208
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+21823
-21826
project.siz
ghs/project.siz
+2
-2
Data_AirPressure.c
source/Application/APP/Data_AirPressure/Data_AirPressure.c
+255
-252
Data_CoolantTemperature.c
...ion/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
+4
-10
Data_VehicleSpeed.c
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
+22
-8
GaugesDataAnalysis.c
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
+15
-72
SEG_DISPLAY.c
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
+60
-38
No files found.
ghs/project
View file @
4788817e
No preview for this file type
ghs/project.hex
View file @
4788817e
This diff is collapsed.
Click to expand it.
ghs/project.siz
View file @
4788817e
project .intvect 1536
project .text 299
324
project .rodata 4123
83
project .text 299
212
project .rodata 4123
67
project .secinfo 120
project .syscall 6
project .romdata 7853
...
...
source/Application/APP/Data_AirPressure/Data_AirPressure.c
View file @
4788817e
This diff is collapsed.
Click to expand it.
source/Application/APP/Data_CoolantTemperature/Data_CoolantTemperature.c
View file @
4788817e
...
...
@@ -7,7 +7,7 @@
//-------------------------------------------
//断码显示
//-------------------------------------------
//344 - 3.1.1.
水温计显示
//344 - 3.1.1.
水温计显示
//-------------------------------------------
static
struct
{
...
...
@@ -84,16 +84,10 @@ void Coolant_Processing_Service(void)
{
Msg_CoolTemp
=
Get_ID_18FEEE00_Sig_Engine_Coolant_Temperature
();
if
(
Msg_CoolTemp
>
0xFA
)
if
(
Msg_CoolTemp
>
0xFA
u
)
{
//if(Timer2s < 100)
//{
// Timer2s ++ ;
//}
//else
{
CoolantVariable
.
Valid
=
0
;
}
CoolantVariable
.
Valid
=
0u
;
TargetSeg
=
0u
;
}
else
{
...
...
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
View file @
4788817e
...
...
@@ -11,8 +11,8 @@ static struct
uint16_t
Data
[
VEH_FILTER_LEN
];
}
VehcleFilter
;
static
uint32_t
SPEED_PPK
=
15925u
l
;
static
uint32_t
SPEED_RADIO
=
637
;
static
uint32_t
SPEED_PPK
=
15925u
;
static
uint32_t
SPEED_RADIO
=
637
u
;
uint16_t
Vehicle_ACT_Speed
;
uint16_t
Vehicle_DISP_Speed
;
...
...
@@ -92,6 +92,7 @@ void Speed_Sleep_Init(void)
void
Speed_Processing_Service
(
void
)
{
uint32_t
VehValTmp
=
0u
;
uint32_t
VehValDisp
=
0u
;
uint32_t
PPK
=
0u
;
PPK
=
Get_Speed_PPK
();
...
...
@@ -102,22 +103,35 @@ void Speed_Processing_Service(void)
if
(
VehValTmp
>
2250
)
{
VehValTmp
=
0
;
VehicleSpeedValid
=
0
;
Vehicle_ACT_Speed
=
0
;
}
else
{
VehicleSpeedValid
=
1
;
if
(
VehValTmp
>=
1400u
)
{
Vehicle_ACT_Speed
=
1400u
;
}
else
if
(
VehValTmp
<=
40u
)
{
Vehicle_ACT_Speed
=
0u
;
}
else
{
Vehicle_ACT_Speed
=
VehValTmp
;
}
}
Vehicle_ACT_Speed
=
VehValTmp
;
//传入表头
VehVal
Tmp
=
VehSpeedAmplification
((
uint16_t
)
VehValTmp
);
SetGaugesPara
(
VehGauges
,
(
uint16_t
)
VehVal
Tm
p
);
//传入表头
计算放大系数
VehVal
Disp
=
VehSpeedAmplification
((
uint16_t
)
Vehicle_ACT_Speed
);
SetGaugesPara
(
VehGauges
,
(
uint16_t
)
VehVal
Dis
p
);
//获得显示格和显示车速
Vehicle_CurSeg
=
GetGaugesCurrentPos
(
VehGauges
);
Vehicle_DISP_Speed
=
GetVehDisVal
(
Vehicle_CurSeg
,
&
GaugesInfo_Init_Table
[
VehGauges
]);
Vehicle_DISP_Speed
=
VehValDisp
;
//
GetVehDisVal(Vehicle_CurSeg, &GaugesInfo_Init_Table[VehGauges]);
}
static
uint16_t
Cal_VehSpeed
(
uint16_t
Fre
,
uint8_t
Len
)
...
...
source/Application/APP/GaugesMode/GaugesDataAnalysis.c
View file @
4788817e
...
...
@@ -18,7 +18,7 @@
//#include "CAN_Signal_Tx.h"
#define VEH_SPEED_CURVE_NUM
12
u
#define VEH_SPEED_CURVE_NUM
8
u
uint16_t
RevDispSpeed
=
0u
;
uint16_t
RevTargetSpeed
=
0u
;
uint16_t
RevCurrentSpeed
=
0u
;
...
...
@@ -47,9 +47,6 @@ typedef struct
volatile
Frequency_t
VehFre
;
uint32_t
VehFreLimit
;
uint16_t
PPK
;
/*
...
...
@@ -60,18 +57,13 @@ uint16_t PPK;
const
VehSpeedCurve_t
VehSpeedCurve
[
VEH_SPEED_CURVE_NUM
]
=
{
{
0u
,
0u
},
{
200u
,
210u
},
{
400u
,
420u
},
{
600u
,
620u
},
{
800u
,
830u
},
{
1000u
,
1030u
},
{
1200u
,
1250u
},
{
1400u
,
1450u
},
{
1600u
,
1650u
},
{
1800u
,
1850u
},
{
2000u
,
2050u
},
{
2250u
,
2250u
},
{
200u
,
200u
},
{
400u
,
400u
},
{
600u
,
600u
},
{
800u
,
800u
},
{
1000u
,
1000u
},
{
1200u
,
1200u
},
{
1400u
,
1400u
},
};
/*--------------------------------------------------------------------------
* Function Name : VehSpeedFindSector
...
...
@@ -334,8 +326,7 @@ 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
/
(
225u
*
PPK
))
/
4u
/
50u
;
}
/*-------------------------------------------------------------------------
...
...
@@ -477,7 +468,12 @@ uint16_t Cal_Veh_Frequency(void)
//uint16_t Cal_Veh_Val(void)
//{
// uint32_t VehValTmp;
//
// VehValTmp = Cal_Veh_Frequency();
// VehValTmp = (VehValTmp * 36000u) / PPK;
//
// return (uint16_t)VehValTmp;
//}
uint8_t
FuelDropTimes
=
0
;
...
...
@@ -498,57 +494,4 @@ void Data_ESpeed_LED_Processing_Service(void)
}
/***************************************
数据处理服务函数
***************************************/
void
Data_Group_Processing_Service
(
void
)
{
}
void
Data_VehicleSpeed_Fre_CaptureSimulata
(
void
)
{
}
void
TRIP_FuelConsump
(
void
)
{
uint32_t
trip
=
0u
;
trip
=
Data_Read_Trip
(
EM_TRIP_A
);
if
(
trip
>
99999u
)
{
Data_Clear_Trip
(
EM_TRIP_A
);
}
else
{
;
}
trip
=
Data_Read_Trip
(
EM_TRIP_B
);
if
(
trip
>
99999u
)
{
Rest_FuelCounsumpTrip_Data
();
}
else
{
;
}
trip
=
Data_Read_Trip
(
EM_TRIP_C
);
if
(
trip
>
99999u
)
{
Rest_FuelCounsumpThisTime_Data
();
}
else
{
;
}
}
uint8_t
Common_Get_TempHigh_Type
(
void
)
{
return
LED_TEMP_HIGH_FLAG
;
}
uint8_t
Common_Get_FuelLow_Type
(
void
)
{
return
LED_FUEL_LOW_FLAG
;
}
***************************************/
\ No newline at end of file
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
View file @
4788817e
...
...
@@ -15,6 +15,8 @@
#define TACHO_SEG_NUM_MAX 27U
#define VEH_SEG_NUM_MAX 30U
static
uint8_t
GaugesTimer
;
static
void
Seg_General_Digit_Display
(
uint32_t
Digit
,
uint8_t
Len
,
uint8_t
Blank
,
uint8_t
*
DigitBuf
,
uint8_t
*
Reg
);
static
void
Seg_Digit_1_Disp
(
uint8_t
Digit
);
static
void
Seg_Digit_2_Disp
(
uint8_t
Digit
);
...
...
@@ -563,6 +565,7 @@ static void SEG_PRI_Display(uint8_t Value, uint8_t Valid, uint8_t seg_status)
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_115
,
seg_status
);
// A83
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_116
,
seg_status
);
// A84
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_117
,
seg_status
);
// A85
if
(
Valid
==
GUI_DISP_MODE_BLANK
)
{
for
(
i
=
0
;
i
<
PRI_SEG_NUM_MAX
;
i
++
)
...
...
@@ -577,6 +580,7 @@ static void SEG_PRI_Display(uint8_t Value, uint8_t Valid, uint8_t seg_status)
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_115
,
0
);
// A83
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_116
,
0
);
// A84
SEG_BUFF_Set
(
BU98_CHIP1
,
SEG_REDEFINE_117
,
0
);
// A85
for
(
i
=
0
;
i
<
PRI_SEG_NUM_MAX
;
i
++
)
{
mSEG
[
i
]
=
0
;
...
...
@@ -1015,14 +1019,19 @@ static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank
static
uint8_t
wbyTestSeg
=
0
;
static
uint16_t
wbyTestNum
;
static
uint8_t
WBY_SET
=
0
;
/******************************************************************************
Seg_Display_Service 在 20MS任务中
信号接口:
信号定义:
输出信号:
******************************************************************************/
void
Seg_Display_Service
(
void
)
{
uint32_t
Ign_Time
;
Ign_Time
=
Common_GetIgnOnTime
();
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
{
if
(
WBY_SET
==
1
)
if
(
WBY_SET
==
1
)
/*测试用点亮全部断码*/
{
Seg_Display_ON
();
}
...
...
@@ -1030,6 +1039,7 @@ void Seg_Display_Service(void)
{
SEG_A25_Disp
(
7u
);
//左侧弧线
SEG_C25_Disp
(
7u
);
//右侧弧线
if
(
Ign_Time
<
3100
)
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
// PRI气压格
...
...
@@ -1038,53 +1048,65 @@ void Seg_Display_Service(void)
SEG_Fuel_Display
(
GetGaugesCurrentPos
(
TempGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
//燃油格
SEG_Tacho_Display
(
GetGaugesCurrentPos
(
RevGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
//转速格
SEG_VehicleSpeed_Display
(
GetGaugesCurrentPos
(
VehGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
//车速格
/*车速数字 暂时没有变化,只是全部点亮*/
Seg_Digit_1_Disp
(
12
);
Seg_Digit_2_Disp
(
12
);
Seg_Digit_3_Disp
(
12
);
return
;
}
if
(
AirPressure_Get_Valid
(
0
))
{
SEG_PRI_Display
(
AirPressure_Get_CurSeg
(
0
),
GUI_DISP_MODE_NORMAL
,
7u
);
// PRI气压格
GaugesTimer
=
15u
;
}
else
{
SEG_PRI_Display
(
AirPressure_Get_CurSeg
(
0
),
GUI_DISP_MODE_INVALID
,
7u
);
// PRI气压格
}
if
(
AirPressure_Get_Valid
(
1
))
{
SEG_SEC_Display
(
AirPressure_Get_CurSeg
(
1
),
GUI_DISP_MODE_NORMAL
,
7u
);
// SEC气压格
}
else
else
if
(
GaugesTimer
==
0u
)
{
SEG_SEC_Display
(
AirPressure_Get_CurSeg
(
1
),
GUI_DISP_MODE_INVALID
,
7u
);
// SEC气压格
}
GaugesTimer
=
15u
;
if
(
Coolant_Get_Valid
())
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//水温格
if
(
AirPressure_Get_Valid
(
0
))
{
SEG_PRI_Display
(
AirPressure_Get_CurSeg
(
0
),
GUI_DISP_MODE_NORMAL
,
7u
);
// PRI气压格
}
else
{
SEG_PRI_Display
(
AirPressure_Get_CurSeg
(
0
),
GUI_DISP_MODE_INVALID
,
7u
);
// PRI气压格
}
if
(
AirPressure_Get_Valid
(
1
))
{
SEG_SEC_Display
(
AirPressure_Get_CurSeg
(
1
),
GUI_DISP_MODE_NORMAL
,
7u
);
// SEC气压格
}
else
{
SEG_SEC_Display
(
AirPressure_Get_CurSeg
(
1
),
GUI_DISP_MODE_INVALID
,
7u
);
// SEC气压格
}
if
(
Coolant_Get_Valid
())
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//水温格
}
else
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_INVALID
,
7u
);
//水温格
}
SEG_Fuel_Display
(
Fuel_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//燃油格
SEG_Tacho_Display
(
Tacho_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//转速格
SEG_VehicleSpeed_Display
(
Speed_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//车速格
wbyTestNum
=
Common_Get_Disp_V_Speed
();
// Speed_Get_Display_Value()
SEG_VehicleSpeed_Num
(
wbyTestNum
,
GUI_DISP_MODE_NORMAL
);
//车速值
// SEG_PRI_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//PRI气压格
// SEG_SEC_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//SEC气压格
// SEG_Coolant_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//水温格
// SEG_Fuel_Display(wbyTestSeg, GUI_DISP_MODE_NORMAL,7u);//燃油格
// SEG_Tacho_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u);//转速格
// SEG_VehicleSpeed_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u);//车速格
// SEG_VehicleSpeed_Num(wbyTestNum,GUI_DISP_MODE_NORMAL);//车速值
}
else
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_INVALID
,
7u
);
//水温格
GaugesTimer
--
;
}
SEG_Fuel_Display
(
Fuel_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//燃油格
SEG_Tacho_Display
(
Tacho_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//转速格
SEG_VehicleSpeed_Display
(
Speed_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//车速格
wbyTestNum
=
Common_Get_Disp_V_Speed
();
// Speed_Get_Display_Value()
SEG_VehicleSpeed_Num
(
wbyTestNum
,
GUI_DISP_MODE_NORMAL
);
//车速值
// SEG_PRI_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//PRI气压格
// SEG_SEC_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//SEC气压格
// SEG_Coolant_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u) ;//水温格
// SEG_Fuel_Display(wbyTestSeg, GUI_DISP_MODE_NORMAL,7u);//燃油格
// SEG_Tacho_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u);//转速格
// SEG_VehicleSpeed_Display(wbyTestSeg,GUI_DISP_MODE_NORMAL,7u);//车速格
// SEG_VehicleSpeed_Num(wbyTestNum,GUI_DISP_MODE_NORMAL);//车速值
}
}
else
...
...
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