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
0b629104
Commit
0b629104
authored
8 months ago
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:大计里程显示及存储
parent
8a8bfc0b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
30 deletions
+75
-30
CommonInterface.c
Firmware/Source/Application/CommonInterface.c
+12
-12
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+59
-16
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+2
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+2
-1
No files found.
Firmware/Source/Application/CommonInterface.c
View file @
0b629104
...
...
@@ -106,18 +106,18 @@ void Common_Input_Para(void)
Common_Set_IG_Sts
(
COMMON_POWER_ON
);
Common_Set_IG_Sts_Valid
(
COMMON_Valid
);
//
Common_Set_Act_V_Speed(Get_ActualVechileSpeed());
//
Common_Set_Disp_V_Speed(Get_DispVechileSpeed());
//
if (Get_VechileSpeedValid() == COMMON_Valid)
//
{
//
Common_Set_Act_V_Speed_Valid(COMMON_Valid);
//
Common_Set_Disp_V_Speed_Valid(COMMON_Valid);
//
}
//
else
//
{
//
Common_Set_Act_V_Speed_Valid(COMMON_InValid);
//
Common_Set_Disp_V_Speed_Valid(COMMON_InValid);
//
}
Common_Set_Act_V_Speed
(
Get_ActualVechileSpeed
());
Common_Set_Disp_V_Speed
(
Get_DispVechileSpeed
());
if
(
Get_VechileSpeedValid
()
==
COMMON_Valid
)
{
Common_Set_Act_V_Speed_Valid
(
COMMON_Valid
);
Common_Set_Disp_V_Speed_Valid
(
COMMON_Valid
);
}
else
{
Common_Set_Act_V_Speed_Valid
(
COMMON_InValid
);
Common_Set_Disp_V_Speed_Valid
(
COMMON_InValid
);
}
PowerIgnOffTimeLine
=
0ul
;
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
0b629104
...
...
@@ -28,6 +28,7 @@ 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
();
/*设置菜单*/
...
...
@@ -2150,9 +2151,9 @@ static void AMT630H_GUI_TIME(uint16_t Hour, uint16_t Minute)
if
((
Pic_mode
==
PIC_DAYTIME_Main_CH
)
||
(
Pic_mode
==
PIC_DAYTIME_Main_EN
))
{
/*外部接收小时和分钟*/
if
(
FLASH_SYNC_1Hz
)
if
(
FLASH_SYNC_1Hz
)
{
SetPagePicFree
(
GRAPHICS_PAGE_0
,
Pic_0522_916_503
,
918
,
501
);
SetPagePicFree
(
GRAPHICS_PAGE_0
,
Pic_0522_916_503
,
918
,
501
);
}
DISPLAY_NUM_ST
DisplayNumPara
;
uint16_t
HourNumber
;
...
...
@@ -2241,7 +2242,10 @@ static void AMT630H_GUI_Fuel(uint16_t Fuel)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0550_715_533
);
/*F*/
if
(
FuelLevel
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
}
else
{
...
...
@@ -2255,7 +2259,10 @@ static void AMT630H_GUI_Fuel(uint16_t Fuel)
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0660_715_533
);
/*F*/
if
(
FuelLevel
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
if
(
FLASH_SYNC_1Hz
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0552_503_529
);
/*黄色燃油灯*/
}
}
else
{
...
...
@@ -2415,25 +2422,51 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
}
/*大计里程显示函数*/
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
)
static
void
AMT630H_GUI_ODO
(
uint32_t
ODO
,
uint8_t
mode
)
{
uint8_t
ODO_bit
=
0U
;
uint32_t
ODO_temp
=
ODO
;
uint16_t
ODO_index
=
0U
;
if
(
ODO_temp
==
0
)
{
ODO_bit
=
1
;
}
else
{
while
(
ODO_temp
!=
0U
)
{
ODO_bit
++
;
ODO_temp
/=
10U
;
}
}
ODO_index
=
53U
+
(
ODO_bit
*
24U
);
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
);
if
(
mode
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0578_55_296
);
}
else
{
}
/*ODO位数不同 KM位置不同*/
SetPagePicFree
(
GRAPHICS_PAGE_0
,
Pic_0580_91_324
,
(
ODO_index
+
10U
),
324U
);
DISPLAY_NUM_ST
DisplayNumPara
;
uint32_t
ODONumber
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_DAY
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
x
=
(
ODO_index
-
24U
)
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNumPara
.
MinDigits
=
ODO_bit
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
}
...
...
@@ -2441,19 +2474,29 @@ static void AMT630H_GUI_ODO(uint32_t ODO)
{
/*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
);
if
(
mode
==
0
)
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0686_55_296
);
}
else
{
}
/*ODO位数不同 KM位置不同*/
SetPagePicFree
(
GRAPHICS_PAGE_0
,
Pic_0688_211_324
,
(
ODO_index
+
10U
),
324U
);
DISPLAY_NUM_ST
DisplayNumPara
;
uint32_t
ODONumber
;
ODONumber
=
ODO
;
DisplayNumPara
.
NumList
=
NumbeList_ODO_NIGHT
;
DisplayNumPara
.
x
=
173
;
DisplayNumPara
.
x
=
(
ODO_index
-
24U
)
;
DisplayNumPara
.
NumInterval
=
GROUP_PIC_DIR_LEFT
|
24
;
DisplayNumPara
.
y
=
GROUP_PIC_USE_PSD_Y_POS
;
DisplayNumPara
.
DecimalNum
=
0
;
DisplayNumPara
.
MinDigits
=
6
;
DisplayNumPara
.
MinDigits
=
ODO_bit
;
DisplayNum
(
GRAPHICS_PAGE_0
,
&
DisplayNumPara
,
ODONumber
);
}
...
...
@@ -2690,9 +2733,9 @@ void AMT630H_GUI_BACKGRAND()
AMT630H_GUI_TIME
(
Get_Dis_Hour_Time
(),
Get_Dis_Minute_Time
());
/* AMT630H_GUI_Telephone(Telephone); */
AMT630H_GUI_Fuel
(
2
);
AMT630H_GUI_Fuel
(
0
);
AMT630H_GUI_Voltage
(
123
);
AMT630H_GUI_ODO
(
123456
);
AMT630H_GUI_ODO
(
Get_ODO_Value
()
/
10
,
0
);
if
(
Get_VechileSpeedValid
()
==
1
)
{
AMT630H_GUI_VSpeed
(
Get_DispVechileSpeed
()
/
10
);
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/Key/Key_user.c
View file @
0b629104
...
...
@@ -55,6 +55,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
case
KEY_EVENT_LONG_PRESS_3
:
//5s
break
;
case
KEY_EVENT_LONG_PRESS_4
:
//10s
TYW_RESET_ODO
();
break
;
case
KEY_EVENT_OFF_TO_ON
:
break
;
...
...
@@ -310,7 +311,7 @@ void TYW_RESET_ODO(void)
{
if
(
ClearODO_Flag
<
1
)
{
//if((Get_DispVechileSpeed() >= 1200)&&(Get_DispEngineSpeed() >= 11
000))
if
((
Get_DispVechileSpeed
()
>=
1990
)
&&
(
Get_DispEngineSpeed
()
>=
12
000
))
{
ClearODO_Flag
=
1
;
Data_Mileage_Clear
();
...
...
This diff is collapsed.
Click to expand it.
Firmware/Source/System/Sys_Task_List.c
View file @
0b629104
...
...
@@ -28,6 +28,7 @@ void Sys_10ms_Tasks(void)
{
Line_In_Debounce_Service
(
10u
);
Key_Service
();
Data_Mileage_Write_EEPROM
();
Key_Clear_Time
();
Key_TimeOut_Service
();
Fuel_R_Cal
(
10u
);
...
...
@@ -49,7 +50,7 @@ void Sys_100ms_Tasks(void)
{
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
1
);
Services_Mileage_Callback
(
);
}
static
uint16_t
task_2ms
=
0u
;
void
Sys_Exact_50us_Tasks
(
void
)
...
...
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