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
f90683e6
Commit
f90683e6
authored
Jul 31, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zhengping' into 'dev'
Zhengping See merge request
!10
parents
51fcd388
22c0a344
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
122 additions
and
345 deletions
+122
-345
Data_Coolant.c
Firmware/Source/Application/Data_Coolant.c
+30
-199
Data_Fuel.c
Firmware/Source/Application/Data_Fuel.c
+24
-78
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
+3
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+2
-2
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+7
-0
No files found.
Firmware/Source/Application/Data_Coolant.c
View file @
f90683e6
#include "Data_Coolant.h"
#include "Components.h"
#define Coolant_DATA_TIME 25u
/*这里填写多长时间采集一个数据,单位ms*/
#define Coolant_DATA_NUM 20u
/*燃油电阻采集数据总数 最大255*/
#define Coolant_CAL_START 5u
/*数据排序后取中间部分计算平均:起始*/
...
...
@@ -65,7 +63,7 @@ void Coolant_R_Cal(uint8_t deltaTime)
uint32_t
temp32
;
static
uint16_t
timeCount
=
0
;
if
(
g_u8CoolantStateInitFlag
)
if
(
g_u8CoolantStateInitFlag
)
{
CoolantR
=
ADC_Read_Signal
(
ADC_CH_COOLANT_TEMP1_R
);
}
...
...
@@ -123,26 +121,26 @@ void Coolant_R_Cal(uint8_t deltaTime)
void
Coolant_State_Check
(
uint8_t
deltaTime
)
{
if
(
CoolantR
<
30
)
{
/*短路3*/
g_u16CoolantSensorOpenTime
=
0
;
g_u16CoolantSensorNormalTime
=
0
;
if
((
g_u16CoolantSensorShortTime
>
3000
)
||
((
g_u8CoolantStateInitFlag
)
&&
(
g_u16CoolantSensorShortTime
>
3000
)))
{
CoolantSensorState
=
CoolantSensorShortCircuit
;
g_u8DesCoolantSetp
=
0
;
g_u8CurCoolantSetp
=
6
;
g_u8CoolantStateInitFlag
=
0
;
g_u8CoolantInitFlag
=
1
;
g_u8CoolantDir
=
Coolant_SEG_UP
;
}
else
{
g_u16CoolantSensorShortTime
+=
deltaTime
;
}
}
else
if
(
CoolantR
>
31
00
)
{
/*开路 3
1
0*/
//
if (CoolantR < 30)
//
{ /*短路3*/
//
g_u16CoolantSensorOpenTime = 0;
//
g_u16CoolantSensorNormalTime = 0;
//
if ((g_u16CoolantSensorShortTime > 3000) || ((g_u8CoolantStateInitFlag) && (g_u16CoolantSensorShortTime > 3000)))
//
{
//
CoolantSensorState = CoolantSensorShortCircuit;
//
g_u8DesCoolantSetp = 0;
//
g_u8CurCoolantSetp = 6;
//
g_u8CoolantStateInitFlag = 0;
//
g_u8CoolantInitFlag = 1;
//
g_u8CoolantDir = Coolant_SEG_UP;
//
}
//
else
//
{
//
g_u16CoolantSensorShortTime += deltaTime;
//
}
//
}
if
(
CoolantR
>
30
00
)
{
/*开路 3
0
0*/
g_u16CoolantSensorShortTime
=
0
;
g_u16CoolantSensorNormalTime
=
0
;
if
((
g_u16CoolantSensorOpenTime
>
3000
)
||
((
g_u8CoolantStateInitFlag
)
&&
(
g_u16CoolantSensorOpenTime
>
3000
)))
...
...
@@ -179,127 +177,15 @@ void Coolant_Gauges_Cal(uint8_t deltaTime)
{
static
uint16_t
time
=
0
;
if
((
CoolantSensorState
==
CoolantSensorNormal
)
&&
(
CoolantR
<=
3100
)
&&
(
CoolantR
>=
30
))
{
/*采集完第一组数据后,开始计算燃油格数*/
if
(
g_u8CoolantADCompleteFlg
)
if
((
CoolantSensorState
==
CoolantSensorNormal
)
&&
(
CoolantR
<=
3000
))
// && (CoolantR >= 30)
{
if
(
CoolantR
<
180
)
{
if
(
g_u8CoolantInitFlag
)
{
CoolantRBak
=
CoolantR
;
}
/*根据回差计算走动方向*/
if
(
g_u8CoolantDir
==
Coolant_SEG_UP
)
{
if
(
CoolantR
>=
CoolantRBak
+
RETURN_DIFFERENCE
)
{
g_u8CoolantDir
=
Coolant_SEG_DOWN
;
CoolantRBak
=
CoolantR
;
}
if
(
CoolantR
<
CoolantRBak
)
{
CoolantRBak
=
CoolantR
;
}
}
else
{
if
(
CoolantRBak
>=
CoolantR
+
RETURN_DIFFERENCE
)
{
g_u8CoolantDir
=
Coolant_SEG_UP
;
CoolantRBak
=
CoolantR
;
}
if
(
CoolantR
>
CoolantRBak
)
{
CoolantRBak
=
CoolantR
;
}
}
/*计算目标格数*/
if
(
g_u8CoolantDir
==
Coolant_SEG_UP
)
{
if
(((
g_u8DesCoolantSetp
==
5
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<
30
))
{
g_u8DesCoolantSetp
=
6
;
}
else
if
(((
g_u8DesCoolantSetp
==
4
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<
160
))
{
g_u8DesCoolantSetp
=
5
;
}
else
if
(((
g_u8DesCoolantSetp
==
3
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<
300
))
{
g_u8DesCoolantSetp
=
4
;
}
else
if
(((
g_u8DesCoolantSetp
==
2
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<
500
))
{
g_u8DesCoolantSetp
=
3
;
}
else
if
(((
g_u8DesCoolantSetp
==
1
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<
790
))
{
g_u8DesCoolantSetp
=
2
;
}
else
if
(((
g_u8DesCoolantSetp
==
0
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
<=
3100
))
{
g_u8DesCoolantSetp
=
1
;
}
}
else
if
(
g_u8CoolantDir
==
Coolant_SEG_DOWN
)
{
if
(((
g_u8DesCoolantSetp
==
1
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>
3100
))
{
g_u8DesCoolantSetp
=
0
;
}
else
if
(((
g_u8DesCoolantSetp
==
2
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>=
790
))
{
g_u8DesCoolantSetp
=
1
;
}
else
if
(((
g_u8DesCoolantSetp
==
3
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>=
500
))
{
g_u8DesCoolantSetp
=
2
;
}
else
if
(((
g_u8DesCoolantSetp
==
4
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>=
300
))
{
g_u8DesCoolantSetp
=
3
;
}
else
if
(((
g_u8DesCoolantSetp
==
5
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>=
160
))
{
g_u8DesCoolantSetp
=
4
;
}
else
if
(((
g_u8DesCoolantSetp
==
6
)
||
g_u8CoolantInitFlag
)
&&
(
CoolantR
>=
30
))
{
g_u8DesCoolantSetp
=
5
;
}
}
g_u8DesCoolantSetp
=
1
;
}
/*IGN ON 1秒/故障恢复后,开始走格 立即指向当前格 20220704*/
if
(
Common_GetIgnOnTime
()
>=
3000
)
else
if
(
CoolantR
>
220
)
{
time
+=
deltaTime
;
if
(
g_u8CoolantInitFlag
)
{
g_u8CoolantInitFlag
=
0
;
time
=
0
;
g_u8CurCoolantSetp
=
g_u8DesCoolantSetp
;
}
if
(
time
>=
15000
)
{
/* 15S变化一格 */
time
=
0
;
if
(
g_u8CurCoolantSetp
<
g_u8DesCoolantSetp
)
{
g_u8CurCoolantSetp
++
;
}
else
if
(
g_u8CurCoolantSetp
>
g_u8DesCoolantSetp
)
{
g_u8CurCoolantSetp
--
;
}
}
if
(
g_u8CurCoolantSetp
==
g_u8DesCoolantSetp
)
{
time
=
0
;
}
g_u8DesCoolantSetp
=
0
;
}
}
}
...
...
@@ -313,67 +199,12 @@ void Coolant_Cal_Sevice(uint8_t deltaTime)
Coolant_Gauges_Cal
(
deltaTime
);
}
uint8_t
Get_CurCoolantSetp
(
void
)
uint8_t
Get_CurCoolantSetp
State
(
void
)
{
uint8_t
u8CurCoolantSetp
=
g_u8CurCoolantSetp
;
if
(
CoolantSensorState
==
CoolantSensorOpenCircuit
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurCoolantSetp
=
6
;
}
else
{
u8CurCoolantSetp
=
0
;
}
}
else
if
(
CoolantSensorState
==
CoolantSensorShortCircuit
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurCoolantSetp
=
7
;
}
else
{
u8CurCoolantSetp
=
0
;
}
}
else
if
(
u8CurCoolantSetp
==
1
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurCoolantSetp
=
1
;
}
else
{
u8CurCoolantSetp
=
0
;
}
}
else
{
;
}
return
u8CurCoolantSetp
;
return
g_u8DesCoolantSetp
;
}
CoolantSensorSts_t
Get_Coolant_Sensor_State
(
void
)
{
uint8_t
u8CurCoolantSetp
=
0
;
if
(
CoolantSensorState
==
CoolantSensorOpenCircuit
||
g_u8CurCoolantSetp
==
1u
)
{
if
(
FLASH_SYNC_1Hz
)
{
u8CurCoolantSetp
=
2
;
}
else
{
u8CurCoolantSetp
=
0
;
}
}
else
{
u8CurCoolantSetp
=
1u
;
}
return
u8CurCoolantSetp
;
return
CoolantSensorState
;
}
Firmware/Source/Application/Data_Fuel.c
View file @
f90683e6
...
...
@@ -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.h
View file @
f90683e6
...
...
@@ -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 @
f90683e6
...
...
@@ -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
))
{
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
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
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
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
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); */
AMT630H_GUI_Fuel
(
0
);
AMT630H_GUI_Voltage
(
123
);
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
if
(
Get_Fuel_Sensor_State
()
==
FuelSensorNormal
)
{
AMT630H_GUI_Fuel
(
Get_CurFuelSetp
());
}
else
{
AMT630H_GUI_Fuel
(
0
);
}
AMT630H_GUI_Voltage
((
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
))
/
10
);
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 @
f90683e6
...
...
@@ -26,6 +26,9 @@
#include "AMT630H\AMT630H_Datas.h"
#include "Data_ESpeed.h"
#include "Data_VSpeed.h"
#include "Data_Coolant.h"
#include "Data_Fuel.h"
#include "Mileage\Services_Mileage_User.h"
#include "BackLight.h"
#include "RTC\RTE_RTC.h"
#include "CAN_Signal\CAN_Lib.h"
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
f90683e6
...
...
@@ -66,7 +66,7 @@ static void Power_KL30_Init(void)
Menu_User_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
//
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
}
static
void
Power_Wakeup_Init
(
void
)
...
...
@@ -90,7 +90,7 @@ static void Power_Wakeup_Init(void)
Menu_User_WAKEUP
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
//
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
}
static
void
Power_LVP_Init
(
void
)
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
f90683e6
...
...
@@ -32,6 +32,7 @@ void Sys_10ms_Tasks(void)
Key_Clear_Time
();
Key_TimeOut_Service
();
Fuel_R_Cal
(
10u
);
Coolant_R_Cal
(
10u
);
}
void
Sys_20ms_Tasks
(
void
)
...
...
@@ -46,11 +47,17 @@ void Sys_50ms_Tasks(void)
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
}
void
Sys_100ms_Tasks
(
void
)
{
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
Coolant_Cal_Sevice
(
100u
);
Services_Mileage_Callback
();
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
1
);
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
}
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