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
8c42b5aa
Commit
8c42b5aa
authored
Jul 15, 2024
by
时昊
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lijianshuang' into 'dev'
Lijianshuang See merge request
!49
parents
74355652
597f4ed7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
18 deletions
+28
-18
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+12
-6
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+1
-10
Services_Mileage_User.h
Firmware/Source/Component/Mileage/Services_Mileage_User.h
+13
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+2
-2
No files found.
Firmware/Source/Component/Key/Key_user.c
View file @
8c42b5aa
...
@@ -484,8 +484,8 @@ void MenuData_TCS_Init(void)
...
@@ -484,8 +484,8 @@ void MenuData_TCS_Init(void)
uint8_t
ClearODO_Flag
=
0
;
uint8_t
ClearODO_Flag
=
0
;
void
TYW_RESET_ODO
(
void
)
void
TYW_RESET_ODO
(
void
)
{
{
uint8_t
Clear_EE
[
1
]
=
{
0xff
};
uint8_t
Clear_EE
[
4
]
=
{
0xff
,
0xff
,
0xff
,
0xff
};
uint32_t
EE_Count
=
0U
;
if
(
SYS_OPR_STAT_IGN_ON
)
if
(
SYS_OPR_STAT_IGN_ON
)
{
{
if
(
ClearODO_Flag
<
1
)
if
(
ClearODO_Flag
<
1
)
...
@@ -494,10 +494,16 @@ void TYW_RESET_ODO(void)
...
@@ -494,10 +494,16 @@ void TYW_RESET_ODO(void)
{
{
ClearODO_Flag
=
1
;
ClearODO_Flag
=
1
;
Data_Mileage_Clear
();
Data_Mileage_Clear
();
for
(
EE_Count
=
0
;
EE_Count
<
255
;
EE_Count
++
)
eeprom_WriteRecord
(
EEPROM_BLOCK_00
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
{
eeprom_WriteRecord
(
EEPROM_BLOCK_01
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EE_Count
,
(
uint8_t
*
)
&
Clear_EE
,
1
);
eeprom_WriteRecord
(
EEPROM_BLOCK_02
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
}
eeprom_WriteRecord
(
EEPROM_BLOCK_03
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_04
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_05
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_06
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_07
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_08
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
eeprom_WriteRecord
(
EEPROM_BLOCK_09
,
(
uint8_t
*
)
&
Clear_EE
,
4
);
}
}
}
}
}
}
...
...
Firmware/Source/Component/Mileage/Services_Mileage_User.c
View file @
8c42b5aa
...
@@ -10,16 +10,7 @@ uint8_t odo_writeState;
...
@@ -10,16 +10,7 @@ uint8_t odo_writeState;
uint8_t
odo_readState
;
uint8_t
odo_readState
;
extern
uint32_t
NVM_User_Settings_Service
;
extern
uint32_t
NVM_User_Settings_Service
;
#define EEPROM_BLOCK_00 0x00
#define EEPROM_BLOCK_01 0x16
#define EEPROM_BLOCK_02 0x32
#define EEPROM_BLOCK_03 0x48
#define EEPROM_BLOCK_04 0x64
#define EEPROM_BLOCK_05 0x80
#define EEPROM_BLOCK_06 0x90
#define EEPROM_BLOCK_07 0xA0
#define EEPROM_BLOCK_08 0xB0
#define EEPROM_BLOCK_09 0xC0
uint32_t
Milleage_InitFlag
=
0U
;
uint32_t
Milleage_InitFlag
=
0U
;
...
...
Firmware/Source/Component/Mileage/Services_Mileage_User.h
View file @
8c42b5aa
#ifndef __SERVICE_ODO_USER_H__
#ifndef __SERVICE_ODO_USER_H__
#define __SERVICE_ODO_USER_H__
#define __SERVICE_ODO_USER_H__
//#define ONLY_CLEAR_ODO_MIL 0x01u /*仅根据距离信息进行ODO清除*/
//#define ONLY_CLEAR_ODO_MIL 0x01u /*仅根据距离信息进行ODO清除*/
//#define ONLY_CLEAR_ODO_NUM 0x01u /*仅根据次数信息进行ODO清除*/
//#define ONLY_CLEAR_ODO_NUM 0x01u /*仅根据次数信息进行ODO清除*/
#define CLEAR_ODO_NUM_MIL 0x01u
/*以距离信息以及次数信息进行ODO清除*/
#define CLEAR_ODO_NUM_MIL 0x01u
/*以距离信息以及次数信息进行ODO清除*/
...
@@ -8,6 +10,17 @@
...
@@ -8,6 +10,17 @@
#define ODO_CLEAR_NUM 5u
/*清除次数上限值 */
#define ODO_CLEAR_NUM 5u
/*清除次数上限值 */
#define ODO_CLEAR_MIL 50000u
/*清除距离上限值 单位0.1KM*/
#define ODO_CLEAR_MIL 50000u
/*清除距离上限值 单位0.1KM*/
#define EEPROM_BLOCK_00 0x00
#define EEPROM_BLOCK_01 0x16
#define EEPROM_BLOCK_02 0x32
#define EEPROM_BLOCK_03 0x48
#define EEPROM_BLOCK_04 0x64
#define EEPROM_BLOCK_05 0x80
#define EEPROM_BLOCK_06 0x90
#define EEPROM_BLOCK_07 0xA0
#define EEPROM_BLOCK_08 0xB0
#define EEPROM_BLOCK_09 0xC0
extern
uint8_t
ODO_Clear_Num_Value
;
extern
uint8_t
ODO_Clear_Num_Value
;
void
Data_User_Mileage_KL30Init
(
void
);
void
Data_User_Mileage_KL30Init
(
void
);
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
8c42b5aa
...
@@ -79,7 +79,7 @@ void Sys_50ms_Tasks(void)
...
@@ -79,7 +79,7 @@ void Sys_50ms_Tasks(void)
}
}
uint8_t
u8LEDDriverCheckCount
=
0U
;
uint8_t
u8LEDDriverCheckCount
=
0U
;
uint16_t
ljs_voltage
=
0
;
//
uint16_t ljs_voltage = 0;
void
Sys_100ms_Tasks
(
void
)
void
Sys_100ms_Tasks
(
void
)
{
{
if
((
PageType
!=
Page_Time_Hour
)
&&
(
PageType
!=
Page_Time_Minute
))
if
((
PageType
!=
Page_Time_Hour
)
&&
(
PageType
!=
Page_Time_Minute
))
...
@@ -95,7 +95,7 @@ void Sys_100ms_Tasks(void)
...
@@ -95,7 +95,7 @@ void Sys_100ms_Tasks(void)
S3_ServerCNTT
();
S3_ServerCNTT
();
//ECU_FaultCode_Processing_Service();
//ECU_FaultCode_Processing_Service();
Send_UUID_To_Esp32
();
Send_UUID_To_Esp32
();
ljs_voltage
=
ADC_Conv_Single_Channel
(
ADC_CH_KL15_VOLTAGE
);
//
ljs_voltage = ADC_Conv_Single_Channel(ADC_CH_KL15_VOLTAGE);
if
(
u8LEDDriverCheckCount
>=
10U
)
if
(
u8LEDDriverCheckCount
>=
10U
)
{
{
u8LEDDriverCheckCount
=
0U
;
u8LEDDriverCheckCount
=
0U
;
...
...
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