Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
09513099
Commit
09513099
authored
Jun 04, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:依据规范变更,增加胎压学习存储
parent
5ca8aafa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
Services_Mileage.h
Firmware/Source/Component/Mileage/Services_Mileage.h
+1
-0
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+16
-1
No files found.
Firmware/Source/Component/Mileage/Services_Mileage.h
View file @
09513099
...
...
@@ -54,6 +54,7 @@ typedef enum
EM_Maintenance_BLOCK
,
/**< 保养里程 */
EM_Maintenance_Firstflg
,
/**< 保养标志 */
EM_MenuData_Tcs_Val
,
/**< TCS开关标志 */
EM_MenuData_TPMS_LEARN
,
/**< TPMS学习结果 */
}
Data_EEPROM_Enum_t
;
typedef
void
(
*
EEPromWrite
)(
Data_EEPROM_Enum_t
BlockID
,
Millib_uint32_t
u32Data
[],
Millib_uint16_t
u16Len
);
...
...
Firmware/Source/Component/Mileage/Services_Mileage_User.c
View file @
09513099
...
...
@@ -19,7 +19,7 @@ extern uint32_t NVM_User_Settings_Service;
#define EEPROM_BLOCK_06 96
#define EEPROM_BLOCK_07 112
#define EEPROM_BLOCK_08 128
#define EEPROM_BLOCK_09 144
uint32_t
Milleage_InitFlag
=
0U
;
...
...
@@ -39,6 +39,7 @@ void Data_User_Mileage_KL30Init(void)
ODO_Init_t
ODOInit
=
{
0
};
uint32_t
Maintenance_Firstflg
[
1u
]
=
{
0
};
Trip_Init_t
TripInit
[
4
]
=
{
0
};
uint32_t
TPMSLearn
[
2
]
=
{
0
,
0
};
Milleage_InitFlag
=
0U
;
// �������ݴ�EEPROM�ж�ȡ
(
void
)
Data_User_EEPROM_Read
(
EM_MILEAGE_BLOCK
,
TempBuf
,
1
);
...
...
@@ -118,6 +119,14 @@ void Data_User_Mileage_KL30Init(void)
Data_User_EEPROM_Write
(
EM_MenuData_Tcs_Val
,
&
MenuData
.
Tcs_Val
,
1u
);
}
Data_User_EEPROM_Read
(
EM_MenuData_TPMS_LEARN
,
TempBuf
,
2u
);
if
(
TempBuf
[
0u
]
==
0xFFFFFFFF
)
{
TPMSLearn
[
0
]
=
MenuData
.
TPMS_Front_Learn
;
TPMSLearn
[
1
]
=
MenuData
.
TPMS_Rear_Learn
;
Data_User_EEPROM_Write
(
EM_MenuData_TPMS_LEARN
,
TPMSLearn
,
2u
);
}
Milleage_InitFlag
=
0X5AA53AA3UL
;
}
...
...
@@ -173,6 +182,9 @@ uint32_t Get_MileageInit_Status(void)
case
EM_MenuData_Tcs_Val
:
eeprom_ReadRecord
(
EEPROM_BLOCK_08
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_MenuData_TPMS_LEARN
:
eeprom_ReadRecord
(
EEPROM_BLOCK_09
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
default:
break
;
...
...
@@ -218,6 +230,9 @@ uint32_t Get_MileageInit_Status(void)
case
EM_MenuData_Tcs_Val
:
eeprom_WriteRecord
(
EEPROM_BLOCK_08
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_MenuData_TPMS_LEARN
:
eeprom_WriteRecord
(
EEPROM_BLOCK_09
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
default:
break
;
}
...
...
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