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
93f0c3b0
Commit
93f0c3b0
authored
Nov 27, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:里程服务函数初始化完成后调用
parent
4f6ead50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+10
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+11
-7
No files found.
Firmware/Source/Component/Mileage/Services_Mileage_User.c
View file @
93f0c3b0
...
...
@@ -25,7 +25,7 @@ static void Data_User_EEPROM_Write(Data_EEPROM_Enum_t BlockID, uint32_t u32Data[
#define EEPROM_BLOCK_05 0xC0
#define EEPROM_BLOCK_06 0xE0
uint32_t
Milleage_InitFlag
=
0U
;
/******************************************************************************
...
...
@@ -41,6 +41,7 @@ void Data_User_Mileage_KL30Init(void)
Mileage_Func_t
Func
=
{
0
};
ODO_Init_t
ODOInit
=
{
0
};
Trip_Init_t
TripInit
[
4
]
=
{
0
};
Milleage_InitFlag
=
0U
;
(
void
)
Data_User_EEPROM_Read
(
EM_MILEAGE_BLOCK
,
TempBuf
,
1
);
if
(
TempBuf
[
0
]
==
0xFFFFFFFF
)
...
...
@@ -112,11 +113,14 @@ void Data_User_Mileage_KL30Init(void)
// TripInit[EM_TRIP_D].IsRestart = 1u;
Data_Trip_KL30_Init
(
DataTripBuf
,
TripInit
,
EM_TRIP_MAX
,
Func
.
EEPromWrite_Cbk
);
Milleage_InitFlag
=
0X5AA53AA3UL
;
}
void
Data_User_Mileage_WakeupInit
(
void
)
{
Mileage_Func_t
Func
=
{
0
};
Milleage_InitFlag
=
0
;
Func
.
Get_Sys_IG_Sts
=
Common_Get_IG_Sts
;
Func
.
Get_Act_V_Speed_Valid
=
Common_Get_Act_V_Speed_Valid
;
...
...
@@ -128,9 +132,14 @@ void Data_User_Mileage_WakeupInit(void)
Data_ODO_Wakeup_Init
(
DataODOBuf
,
Func
.
EEPromWrite_Cbk
);
Data_Trip_Wakeup_Init
(
DataTripBuf
,
EM_TRIP_MAX
,
Func
.
EEPromWrite_Cbk
);
Milleage_InitFlag
=
0X5AA53AA3UL
;
}
uint32_t
Get_MileageInit_Status
(
void
)
{
return
Milleage_InitFlag
;
}
static
uint32_t
Data_User_EEPROM_Read
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
)
{
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
93f0c3b0
...
...
@@ -114,18 +114,22 @@ void Sys_Exact_50us_Tasks(void)
if
(
task_100ms
>=
2000U
)
{
task_100ms
=
0U
;
Data_Mileage_ISR
();
if
(
Get_MileageInit_Status
()
==
0X5AA53AA3UL
)
{
Data_Mileage_ISR
();
}
}
// if(g_u8GPIOTurnOver)
// {
// PORT->PM13 &= ~(1<<0);
// PORT->PSET13 = (1<<0);
// g_u8GPIOTurnOver = 0U;
// PORT->PM0 &= ~(1<<3);
// PORT->PSET0 = (1<<3);
// g_u8GPIOTurnOver = 0U;
// Gen_TimeDelay(10000u, 50u);
// }
// else
// {
// PORT->PM13 &= ~(1<<0
);
// PORT->PCLR13 = (1<<0
);
//
g_u8GPIOTurnOver = 1U;
// PORT->PM0 &= ~(1<<3
);
// PORT->PCLR0 = (1<<3
);
//
g_u8GPIOTurnOver = 1U;
// }
}
\ No newline at end of file
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