Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
3e0c01f8
Commit
3e0c01f8
authored
Jun 28, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:删除里程全部内容
parent
a085e505
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
136 additions
and
768 deletions
+136
-768
RMR42E.uvguix.Administrator
...t/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvguix.Administrator
+136
-46
RMR42E.uvprojx
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvprojx
+0
-20
CommonInterface.c
...ware/Source/Application/CommonInterface/CommonInterface.c
+0
-22
CommonInterface.h
...ware/Source/Application/CommonInterface/CommonInterface.h
+0
-3
Components.h
Firmware/Source/Component/Components.h
+0
-2
Services_Mileage.h
Firmware/Source/Component/Mileage/Services_Mileage.h
+0
-375
Services_Mileage_User.c
Firmware/Source/Component/Mileage/Services_Mileage_User.c
+0
-274
Services_Mileage_User.h
Firmware/Source/Component/Mileage/Services_Mileage_User.h
+0
-23
libMileage.lib
Firmware/Source/Component/Mileage/libMileage.lib
+0
-0
libMileage_BAT32_V1.07.lib
Firmware/Source/Component/Mileage/libMileage_BAT32_V1.07.lib
+0
-0
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+0
-2
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+0
-1
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvguix.Administrator
View file @
3e0c01f8
This diff is collapsed.
Click to expand it.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvprojx
View file @
3e0c01f8
...
...
@@ -513,21 +513,6 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\BU98R10\BU98R10.h
</FilePath>
</File>
<File>
<FileName>
Services_Mileage.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\Mileage\Services_Mileage.h
</FilePath>
</File>
<File>
<FileName>
Services_Mileage_User.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Component\Mileage\Services_Mileage_User.c
</FilePath>
</File>
<File>
<FileName>
Services_Mileage_User.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\Mileage\Services_Mileage_User.h
</FilePath>
</File>
<File>
<FileName>
eeManager_Interface.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -658,11 +643,6 @@
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Component\Telltales\Telltales_user.c
</FilePath>
</File>
<File>
<FileName>
libMileage_BAT32_V1.07.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\Mileage\libMileage_BAT32_V1.07.lib
</FilePath>
</File>
<File>
<FileName>
PowerManagement.lib
</FileName>
<FileType>
4
</FileType>
...
...
Firmware/Source/Application/CommonInterface/CommonInterface.c
View file @
3e0c01f8
...
...
@@ -161,25 +161,3 @@ uint32_t Common_GetSocTime(void)
return
PowerSocTimeLine
;
}
/**
* @brief 公里转换英里
* @return 公里
*/
uint32_t
Data_Km_To_Mile
(
uint32_t
Km
)
{
// Km *= 621;
// Km /= 1000;
Km
*=
100
;
Km
/=
161
;
return
Km
;
}
/**
* @brief 英里转换公里
* @return 英里
*/
uint32_t
Data_Mile_To_Km
(
uint32_t
Mile
)
{
Mile
*=
161
;
Mile
/=
100
;
return
Mile
;
}
Firmware/Source/Application/CommonInterface/CommonInterface.h
View file @
3e0c01f8
...
...
@@ -74,8 +74,5 @@ extern uint32_t Common_GetIgnOnTime(void); /*ms*/
extern
uint32_t
Common_GetIgnOffTime
(
void
);
/*ms*/
extern
uint32_t
Data_Km_To_Mile
(
uint32_t
Km
);
extern
uint32_t
Data_Mile_To_Km
(
uint32_t
Mile
);
#endif
Firmware/Source/Component/Components.h
View file @
3e0c01f8
...
...
@@ -11,8 +11,6 @@
#include "System_Monitor\System_Monitor.h"
#include "Telltales\Telltales_Lib.h"
#include "Telltales\Telltales_user.h"
#include "Mileage\Services_Mileage.h"
#include "Mileage\Services_Mileage_User.h"
#include "Eeprom\eeManager_Interface.h"
#include "Eeprom\eepromManage.h"
#include "BU98R10\BU98R10.h"
...
...
Firmware/Source/Component/Mileage/Services_Mileage.h
deleted
100644 → 0
View file @
a085e505
This diff is collapsed.
Click to expand it.
Firmware/Source/Component/Mileage/Services_Mileage_User.c
deleted
100644 → 0
View file @
a085e505
#include "Components.h"
__align
(
4
)
uint8_t
DataMilleageBuf
[
Data_MEM_Block_Mileage
];
uint8_t
DataODOBuf
[
Data_MEM_Block_ODO
];
uint8_t
DataTripBuf
[
Data_MEM_Block_Trip
*
EM_TRIP_MAX
];
Mileage_t
g_WriteMileage
;
Mileage_t
g_ReadMileage
;
uint8_t
odo_writeState
;
uint8_t
odo_readState
;
static
uint32_t
Data_User_EEPROM_Read
(
uint16_t
u16BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
static
void
Data_User_EEPROM_Write
(
Data_EEPROM_Enum_t
BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
);
#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
uint32_t
Milleage_InitFlag
=
0U
;
/******************************************************************************
Function:Data_ODO_KL30Init
Description:
Input:
Output:
******************************************************************************/
void
Data_User_Mileage_KL30Init
(
void
)
{
uint32_t
TempBuf
[
20
]
=
{
0
};
Mileage_Init_t
MileInit
=
{
0
};
Mileage_Func_t
Func
=
{
0
};
ODO_Init_t
ODOInit
=
{
0
};
// EngODO_Init_t EngODOInit = {0};
Trip_Init_t
TripInit
[
4
]
=
{
0
};
Milleage_InitFlag
=
0U
;
// �������ݴ�EEPROM�ж�ȡ
(
void
)
Data_User_EEPROM_Read
(
EM_MILEAGE_BLOCK
,
TempBuf
,
1
);
if
(
TempBuf
[
0
]
==
0xFFFFFFFF
)
{
MileInit
.
Mileage
=
0u
;
}
else
{
MileInit
.
Mileage
=
TempBuf
[
0
];
}
Func
.
Get_Sys_IG_Sts
=
Common_Get_IG_Sts
;
Func
.
Get_Act_V_Speed_Valid
=
Common_Get_Act_V_Speed_Valid
;
Func
.
Get_Act_V_Speed
=
Common_Get_Act_V_Speed_ODO
;
Func
.
Get_TireSize
=
(
void
*
)
0
;
Func
.
EEPromWrite_Cbk
=
Data_User_EEPROM_Write
;
// ��ʱδ����
Data_Mileage_KL30_Init
(
DataMilleageBuf
,
&
MileInit
,
&
Func
);
(
void
)
Data_User_EEPROM_Read
(
EM_ODO_BLOCK
,
TempBuf
+
1
,
2
);
if
(
TempBuf
[
1
]
==
0xFFFFFFFF
)
{
ODOInit
.
Stamp
=
0
;
}
else
{
ODOInit
.
Stamp
=
TempBuf
[
1
];
}
if
(
TempBuf
[
1
]
==
0xFFFFFFFF
)
{
ODOInit
.
Offset
=
0
;
}
else
{
ODOInit
.
Offset
=
TempBuf
[
2
];
}
ODOInit
.
MaxValue
=
16103058
;
Data_ODO_KL30_Init
(
DataODOBuf
,
&
ODOInit
,
Func
.
EEPromWrite_Cbk
);
(
void
)
Data_User_EEPROM_Read
(
EM_TRIP_BLOCK
,
TempBuf
+
3
,
8
);
if
(
TempBuf
[
3
]
==
0XFFFFFFFF
)
{
TripInit
[
EM_TRIP_A
].
Stamp
=
0
;
}
else
{
TripInit
[
EM_TRIP_A
].
Stamp
=
TempBuf
[
3
];
}
TripInit
[
EM_TRIP_A
].
Offset
=
TempBuf
[
4
];
TripInit
[
EM_TRIP_A
].
MaxValue
=
16092
;
/* 最大999.9Mile 进行复位 */
TripInit
[
EM_TRIP_A
].
IsRestart
=
1u
;
TripInit
[
EM_TRIP_B
].
Stamp
=
0xFFFFFFFFu
;
TripInit
[
EM_TRIP_B
].
MaxValue
=
99999
;
TripInit
[
EM_TRIP_B
].
IsRestart
=
1u
;
TripInit
[
EM_TRIP_C
].
Stamp
=
0xFFFFFFFFu
;
TripInit
[
EM_TRIP_C
].
MaxValue
=
99999
;
TripInit
[
EM_TRIP_C
].
IsRestart
=
1u
;
TripInit
[
EM_TRIP_D
].
Stamp
=
0xFFFFFFFFu
;
TripInit
[
EM_TRIP_D
].
MaxValue
=
99999
;
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
=
0U
;
Func
.
Get_Sys_IG_Sts
=
Common_Get_IG_Sts
;
Func
.
Get_Act_V_Speed_Valid
=
Common_Get_Act_V_Speed_Valid
;
Func
.
Get_Act_V_Speed
=
Common_Get_Act_V_Speed_ODO
;
Func
.
Get_TireSize
=
(
void
*
)
0
;
Func
.
EEPromWrite_Cbk
=
Data_User_EEPROM_Write
;
// ��ʱδ����
Data_Mileage_Wakeup_Init
(
DataMilleageBuf
,
&
Func
);
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
)
{
switch
(
u16BlockID
)
{
case
EM_MILEAGE_BLOCK
:
odo_readState
=
eeprom_ReadODO
(
&
g_ReadMileage
);
u32Data
[
0
]
=
g_ReadMileage
.
Odo
/
100
;
break
;
case
EM_ODO_BLOCK
:
eeprom_ReadRecord
(
EEPROM_BLOCK_01
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_TRIP_BLOCK
:
eeprom_ReadRecord
(
EEPROM_BLOCK_03
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
default:
break
;
}
return
0
;
}
static
void
Data_User_EEPROM_Write
(
Data_EEPROM_Enum_t
BlockID
,
uint32_t
u32Data
[],
uint16_t
u16Len
)
{
// uint8_t i = 0u;
switch
(
BlockID
)
{
case
EM_MILEAGE_BLOCK
:
if
(
u32Data
[
0
]
==
0
)
{
eeprom_ClearOdoSection
();
}
else
{
g_WriteMileage
.
Odo
=
u32Data
[
0
]
*
100
;
odo_writeState
=
WRITE_FAIL
;
odo_writeState
=
eeprom_WriteODO
(
&
g_WriteMileage
,
distance_100m
,
1
);
}
break
;
case
EM_ODO_BLOCK
:
eeprom_WriteRecord
(
EEPROM_BLOCK_01
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
case
EM_TRIP_BLOCK
:
eeprom_WriteRecord
(
EEPROM_BLOCK_03
,
(
uint8_t
*
)
u32Data
,
u16Len
*
4
);
break
;
default:
break
;
}
}
void
Services_Mileage_Callback
(
void
)
{
Data_Mileage_ISR
();
Data_ODO_Processing
();
Data_Trip_Processing
();
Trip_Clear_Km_Service
();
}
/**
* @brief 获取大计里程值
* @return 根据当前单位输出对应大计里程值
*/
uint32_t
Get_ODO_Value
(
void
)
{
uint32_t
ODO
=
0
;
// if (Get_Dis_Unit() == 0) /* 公制 */
// {
// ODO = Data_ODO_Read();
// }
// else if (Get_Dis_Unit() == 1) /* 英制 */
// {
// ODO = Data_Km_To_Mile(Data_ODO_Read());
// }
// else /* 无效值,按照公里处理,理论上不会执行到这 */
// {
// ODO = Data_ODO_Read();
// }
return
ODO
;
}
/**
* @brief 获取小计里程值
* @return 根据当前单位输出对应小计里程值
*/
uint32_t
Get_Trip_Value
(
void
)
{
uint32_t
Trip
=
0
;
// if (Get_Dis_Unit() == 0) /* 公制 */
// {
// Trip = Data_Read_Trip(EM_TRIP_A);
// }
// else if (Get_Dis_Unit() == 1) /* 英制 */
// {
// Trip = Data_Km_To_Mile(Data_Read_Trip(EM_TRIP_A));
// }
// else /* 无效值,按照公里处理,理论上不会执行到这 */
// {
// Trip = Data_Read_Trip(EM_TRIP_A);
// }
return
Trip
;
}
uint32_t
testtrip
=
0
;
/**
* @brief 当前单位在KM时,小计里程大于999.9KM,主动触发小计清零
*
*/
void
Trip_Clear_Km_Service
(
void
)
{
// if (Get_Dis_Unit() == 0) /* 公制 */
// {
// if (Data_Read_Trip(EM_TRIP_A) > 9999) /* 当前单位在KM时,里程大于999.9KM进行清零 */
// {
// Data_Clear_Trip_All();
// }
// }
}
/**
* @brief 触发单位转换时调用,如当前单位英里且里程大于621Mile时,单位转换为公里后需主动写入小计里程为999.9KM;
* 需要单位转换标志位赋值后进行调用!!!
*
*/
void
Unit_Convert_Service
(
void
)
{
// if (Get_Dis_Unit() == 0) /* 公制 */
// {
// if (Data_Read_Trip(EM_TRIP_A) > 9999) /* 当前单位在KM时,里程大于999.9KM进行清零 */
// {
// Data_Write_Trip(EM_TRIP_A, 9999);
// }
// }
}
Firmware/Source/Component/Mileage/Services_Mileage_User.h
deleted
100644 → 0
View file @
a085e505
#ifndef __SERVICE_ODO_USER_H__
#define __SERVICE_ODO_USER_H__
//#define ONLY_CLEAR_ODO_MIL 0x01u /*仅根据距离信息进行ODO清除*/
//#define ONLY_CLEAR_ODO_NUM 0x01u /*仅根据次数信息进行ODO清除*/
#define CLEAR_ODO_NUM_MIL 0x01u
/*以距离信息以及次数信息进行ODO清除*/
#define ODO_CLEAR_NUM 5u
/*清除次数上限值 */
#define ODO_CLEAR_MIL 50000u
/*清除距离上限值 单位0.1KM*/
extern
uint8_t
ODO_Clear_Num_Value
;
void
Data_User_Mileage_KL30Init
(
void
);
void
Data_User_Mileage_WakeupInit
(
void
);
void
Services_Mileage_Callback
(
void
);
void
Data_ODO_KM_TO_MILE
(
void
);
void
Data_TRIP_KM_TO_MILE
(
void
);
uint32_t
Get_MileageInit_Status
(
void
);
extern
uint32_t
Get_ODO_Value
(
void
);
extern
uint32_t
Get_Trip_Value
(
void
);
extern
void
Trip_Clear_Km_Service
(
void
);
extern
void
Unit_Convert_Service
(
void
);
#endif
Firmware/Source/Component/Mileage/libMileage.lib
deleted
100644 → 0
View file @
a085e505
File deleted
Firmware/Source/Component/Mileage/libMileage_BAT32_V1.07.lib
deleted
100644 → 0
View file @
a085e505
File deleted
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
3e0c01f8
...
...
@@ -54,7 +54,6 @@ static void Power_KL30_Init(void)
LINE_IN_Init
();
LED_Driver_Init_Example
();
//注意顺序2
LED_Driver_Service_Immediate
();
Data_User_Mileage_KL30Init
();
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER0
,
400
,
64000000
);
TimerM_PWM_counter_Output_Init
(
TIMERM_COUNTER1
,
400
,
64000000
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER0
,
TIMERM_CHB
,
ActiveLevel_High
);
...
...
@@ -81,7 +80,6 @@ static void Power_Wakeup_Init(void)
Can_Init
();
eeprom_StoreInfo_Init
();
Analog_Signal_Conv_Init
();
Data_User_Mileage_WakeupInit
();
BU98R10_Init
();
Sys_WakeUp_Init
();
LINE_IN_Init
();
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
3e0c01f8
...
...
@@ -32,7 +32,6 @@ void Sys_5ms_Tasks(void)
void
Sys_10ms_Tasks
(
void
)
{
Line_In_Debounce_Service
(
10u
);
Data_Mileage_Write_EEPROM
();
Can_BusOff_Recover
(
10u
);
TYW_Check_Count
();
}
...
...
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