Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
f6ebd86d
Commit
f6ebd86d
authored
Jul 31, 2024
by
郑萍
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:燃油显示调试成功,以及大计显示判断条件修改
parent
51fcd388
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
145 deletions
+86
-145
Data_Fuel.c
Firmware/Source/Application/Data_Fuel.c
+24
-78
AMT630H.c
Firmware/Source/Component/AMT630H/AMT630H.c
+1
-1
AMT630H.h
Firmware/Source/Component/AMT630H/AMT630H.h
+1
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+55
-65
Components.h
Firmware/Source/Component/Components.h
+4
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-0
No files found.
Firmware/Source/Application/Data_Fuel.c
View file @
f6ebd86d
...
...
@@ -122,25 +122,25 @@ void Fuel_R_Cal(uint8_t deltaTime)
void
Fuel_State_Check
(
uint8_t
deltaTime
)
{
if
(
FuelR
<
30
)
{
/*短路3*/
g_u16FuelSensorOpenTime
=
0
;
g_u16FuelSensorNormalTime
=
0
;
if
((
g_u16FuelSensorShortTime
>
3000
)
||
((
g_u8FuelStateInitFlag
)
&&
(
g_u16FuelSensorShortTime
>
3000
)))
{
FuelSensorState
=
FuelSensorShortCircuit
;
g_u8DesFuelSetp
=
0
;
g_u8CurFuelSetp
=
6
;
g_u8FuelStateInitFlag
=
0
;
g_u8FuelInitFlag
=
1
;
g_u8FuelDir
=
FUEL_SEG_UP
;
}
else
{
g_u16FuelSensorShortTime
+=
deltaTime
;
}
}
else
if
(
FuelR
>
5000
)
//
if (FuelR < 30)
//
{ /*短路3*/
//
g_u16FuelSensorOpenTime = 0;
//
g_u16FuelSensorNormalTime = 0;
//
if ((g_u16FuelSensorShortTime > 3000) || ((g_u8FuelStateInitFlag) && (g_u16FuelSensorShortTime > 3000)))
//
{
//
FuelSensorState = FuelSensorShortCircuit;
//
g_u8DesFuelSetp = 0;
//
g_u8CurFuelSetp = 6;
//
g_u8FuelStateInitFlag = 0;
//
g_u8FuelInitFlag = 1;
//
g_u8FuelDir = FUEL_SEG_UP;
//
}
//
else
//
{
//
g_u16FuelSensorShortTime += deltaTime;
//
}
//
}
if
(
FuelR
>
5000
)
{
/*开路 310*/
g_u16FuelSensorShortTime
=
0
;
g_u16FuelSensorNormalTime
=
0
;
...
...
@@ -178,7 +178,7 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
{
static
uint16_t
time
=
0
;
if
((
FuelSensorState
==
FuelSensorNormal
)
&&
(
FuelR
<=
3100
)
&&
(
FuelR
>=
30
)
)
if
((
FuelSensorState
==
FuelSensorNormal
)
&&
(
FuelR
<=
5000
))
// && (FuelR >= 30
)
{
/*采集完第一组数据后,开始计算燃油格数*/
if
(
g_u8FuelADCompleteFlg
)
...
...
@@ -298,8 +298,8 @@ void Fuel_Gauges_Cal(uint8_t deltaTime)
g_u8CurFuelSetp
=
g_u8DesFuelSetp
;
}
if
(
time
>=
15
000
)
{
/*
15
S变化一格 */
if
(
time
>=
30
000
)
{
/*
30
S变化一格 */
time
=
0
;
if
(
g_u8CurFuelSetp
<
g_u8DesFuelSetp
)
{
...
...
@@ -330,64 +330,10 @@ void Fuel_Cal_Sevice(uint8_t deltaTime)
uint8_t
Get_CurFuelSetp
(
void
)
{
uint8_t
u8CurFuelSetp
=
g_u8CurFuelSetp
;
if
(
FuelSensorState
==
FuelSensorOpenCircuit
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurFuelSetp
=
6
;
}
else
{
u8CurFuelSetp
=
0
;
}
}
else
if
(
FuelSensorState
==
FuelSensorShortCircuit
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurFuelSetp
=
7
;
}
else
{
u8CurFuelSetp
=
0
;
}
}
else
if
(
u8CurFuelSetp
==
1
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurFuelSetp
=
1
;
}
else
{
u8CurFuelSetp
=
0
;
}
}
else
{
;
}
return
u8CurFuelSetp
;
return
g_u8CurFuelSetp
;
}
FuelSensorSts_t
Get_Fuel_Sensor_State
(
void
)
{
uint8_t
u8CurFuelSetp
=
0
;
if
(
FuelSensorState
==
FuelSensorOpenCircuit
||
g_u8CurFuelSetp
==
1u
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurFuelSetp
=
2
;
}
else
{
u8CurFuelSetp
=
0
;
}
}
else
{
u8CurFuelSetp
=
1u
;
}
return
u8CurFuelSetp
;
return
FuelSensorState
;
}
Firmware/Source/Component/AMT630H/AMT630H.c
View file @
f6ebd86d
...
...
@@ -160,7 +160,7 @@ void Amt630hInit(void)
LcdSoundParamterData
.
LcdWiringMode
=
LCD_WIRING_MODE_BGR
;
LcdSoundParamterData
.
LcdWiringBitOrder
=
LCD_WIRING_BIT_ORDER_MSB
;
LcdSoundParamterData
.
LcdDotClkReverse
=
0
;
/* NuoMa 50pin TFT */
LcdSoundParamterData
.
LvdsPanelFormat
=
LVDS_PANEL_FORMAT_
TI
;
LcdSoundParamterData
.
LvdsPanelFormat
=
LVDS_PANEL_FORMAT_
NS
;
LcdSoundParamterData
.
LvdsPanelData
=
LVDS_PANEL_DATA_8BIT
;
LcdSoundParamterData
.
LcdTimingVBP
=
12
;
...
...
Firmware/Source/Component/AMT630H/AMT630H.h
View file @
f6ebd86d
...
...
@@ -18,7 +18,7 @@ typedef struct
uint8_t
Result
;
}
s_AMT630H_FlashCheck_t
;
#define AMT630H_REFRESH_TIME
50
U
#define AMT630H_REFRESH_TIME
25
U
#define AMT630H_ANIMATION_TIME 3000U //ms
#define AMT630H_ANIMATION_PIC_NUM 146U
...
...
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
f6ebd86d
...
...
@@ -28,7 +28,6 @@ void AMT630H_GUI_Background()
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
1
);
if
(
MENU_MODE
==
SETTING_MENU
)
{
AMT630H_GUI_SETTING
();
/*设置菜单*/
...
...
@@ -93,42 +92,6 @@ void AMT630H_GUI_Fault_Information(void)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0357_354_162
);
}
/*日间英文*/
else
if
(
Pic_mode
==
PIC_DAYTIME_EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0088_47_398
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0084_869_397
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0089_193_488
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0086_762_487
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0090_435_519
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0091_567_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0092_368_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0093_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0094_375_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0095_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0096_338_228
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0095_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0097_334_163
);
}
/*夜间英文*/
else
if
(
Pic_mode
==
PIC_NIGHTTIME_EN
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0274_47_398
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0275_916_398
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0276_193_488
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0277_728_486
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0278_435_519
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0279_567_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0280_368_356
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0281_574_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0282_375_292
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_240
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0284_338_228
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0283_633_175
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0285_334_163
);
}
}
/**
* @brief 显示模式信息 一级菜单
...
...
@@ -2225,16 +2188,16 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
// }
/*燃油显示函数*/
uint
16
_t
g_u16_GUI_PerFuelLevel
=
1
;
static
void
AMT630H_GUI_Fuel
(
uint
16
_t
Fuel
)
uint
8
_t
g_u16_GUI_PerFuelLevel
=
1
;
static
void
AMT630H_GUI_Fuel
(
uint
8
_t
Fuel
)
{
/*外部传参燃油处于数组第几格*/
/*R>83且处于非开路状态时 黄色燃油灯闪烁*/
/*R开路状态时 黄色燃油灯闪烁*/
/*以上两种情况黄色燃油灯闪烁的频率不同*/
uint
16
_t
FuelLevel
;
uint
8
_t
FuelLevel
;
FuelLevel
=
Fuel
;
static
uint8_t
s_FuelLowTime
=
0U
;
if
((
Pic_mode
==
PIC_DAYTIME_Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0553_315_473
);
/*燃油格*/
...
...
@@ -2246,10 +2209,24 @@ static void AMT630H_GUI_Fuel(uint16_t Fuel)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
s_FuelLowTime
=
0
;
}
else
if
(
FuelLevel
==
1
)
{
s_FuelLowTime
++
;
if
(
s_FuelLowTime
<
15
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
if
(
s_FuelLowTime
==
20
)
{
s_FuelLowTime
=
0
;
}
}
else
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0551_503_529
);
/*黑色燃油灯*/
s_FuelLowTime
=
0
;
}
}
else
if
((
Pic_mode
==
PIC_NIGHTTIME_Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main_EN
))
...
...
@@ -2307,21 +2284,27 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
{
if
((
Pic_mode
==
PIC_DAYTIME_Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main_EN
))
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0563_923_407
);
/*电压图标*/
DISPLAY_NUM_ST
DisplayNumPara
;
uint16_t
VoltageNumber
;
VoltageNumber
=
Voltage
/
10
;
if
(
Voltage
%
10
>
5
)
{
VoltageNumber
++
;
}
uint16_t
Voltage_Hundred
;
uint16_t
Voltage_Ten
;
uint16_t
Voltage_Unit
;
uint16_t
Front
;
if
((
VoltageNumber
<=
120
)
||
(
VoltageNumber
>
150
))
郑萍
@zhengping
·
Jul 31, 2024
Maintainer
高低压指示灯报警
高低压指示灯报警
Please
register
or
sign in
to reply
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0563_923_407
);
/*电压图标*/
}
/*数据处理*/
Voltage_Hundred
=
VoltageNumber
/
100
;
Voltage_Ten
=
(
VoltageNumber
%
100
)
/
10
;
Voltage_Unit
=
VoltageNumber
%
10
;
Front
=
Voltage_
Ten
*
10
+
Voltage_Unit
;
Front
=
Voltage_
Hundred
*
10
+
Voltage_Ten
;
DisplayNumPara
.
NumList
=
NumbeList_Voltage_DAY
;
if
((
VoltageNumber
>=
100
)
&&
(
VoltageNumber
<
1000
))
...
...
@@ -2424,44 +2407,44 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
/*大计里程显示函数*/
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
,
uint8_t
mode
)
{
if
((
PIC_DAYTIME_Main_CH
)
&&
(
PIC_DAYTIME_Main_EN
))
if
((
Pic_mode
==
PIC_DAYTIME_Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main_EN
))
{
/*ODO位数不同 KM位置不同*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0577_48_272
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0578_55_296
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_211_324
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0577_48_272
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0578_55_296
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0580_211_324
)
;
DISPLAY_NUM_ST
DisplayNumPara
;
uint16_t
ODONumber
;
ODONumber
=
ODO
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_DAY
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
DisplayNumPara
.
MinDigits
=
6
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
}
else
if
((
PIC_NIGHTTIME_Main_CH
)
&&
(
PIC_NIGHTTIME_Main_EN
))
else
if
((
Pic_mode
==
PIC_NIGHTTIME_Main_CH
)
||
(
Pic_mode
==
PIC_NIGHTTIME_Main_EN
))
{
/*ODO位数不同 KM位置不同*/
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0685_48_272
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0686_55_296
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_211_324
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0685_48_272
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0686_55_296
)
;
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0688_211_324
)
;
DISPLAY_NUM_ST
DisplayNumPara
;
uint16_t
ODONumber
;
ODONumber
=
ODO
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
DisplayNumPara
.
MinDigits
=
6
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
}
else
...
...
@@ -2697,9 +2680,16 @@ void AMT630H_GUI_BACKGRAND()
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
/* AMT630H_GUI_Telephone(Telephone); */
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
}
else
{
AMT630H_GUI_Fuel
(
0
);
AMT630H_GUI_Voltage
(
123
);
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
}
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
郑萍
@zhengping
·
Jul 31, 2024
Maintainer
电压显示
电压显示
Please
register
or
sign in
to reply
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
if
(
Get_VechileSpeedValid
()
==
1
)
{
AMT630H_GUI_VSpeed
(
Get_DispVechileSpeed
()
/
10
);
...
...
Firmware/Source/Component/Components.h
View file @
f6ebd86d
...
...
@@ -26,6 +26,10 @@
#include "AMT630H\AMT630H_Datas.h"
#include "Data_ESpeed.h"
#include "Data_VSpeed.h"
#include "Data_Coolant.h"
#include "Data_Fuel.h"
#include "Data_Coolant.h"
#include "Mileage\Services_Mileage_User.h"
#include "BackLight.h"
#include "RTC\RTE_RTC.h"
#include "CAN_Signal\CAN_Lib.h"
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
f6ebd86d
...
...
@@ -51,6 +51,7 @@ void Sys_100ms_Tasks(void)
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
Services_Mileage_Callback
();
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
1
);
}
static
uint16_t
task_2ms
=
0u
;
void
Sys_Exact_50us_Tasks
(
void
)
...
...
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