Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
575b117c
Commit
575b117c
authored
Dec 19, 2024
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:EC02更新老化台
parent
0ed24376
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
653 additions
and
372 deletions
+653
-372
API_RTC.c
Test_Bench/Api_Sources/API_RTC.c
+1
-1
APP_CAN.c
Test_Bench/Api_Sources/APP_CAN.c
+248
-40
APP_Test.c
Test_Bench/Api_Sources/APP_Test.c
+239
-291
APP_Test.h
Test_Bench/App_Headers/APP_Test.h
+123
-30
Globals_Var.h
Test_Bench/App_Headers/Globals_Var.h
+42
-10
No files found.
Test_Bench/Api_Sources/API_RTC.c
View file @
575b117c
...
...
@@ -421,7 +421,7 @@ interrupt void Api_RTC_isr(void)
if
(
direction_espeed
==
1
)
{
k
++
;
if
(
k
>
1
2
)
if
(
k
>
1
1
)
{
direction_espeed
=
0
;
}
...
...
Test_Bench/Api_Sources/APP_CAN.c
View file @
575b117c
This diff is collapsed.
Click to expand it.
Test_Bench/Api_Sources/APP_Test.c
View file @
575b117c
This diff is collapsed.
Click to expand it.
Test_Bench/App_Headers/APP_Test.h
View file @
575b117c
...
...
@@ -31,49 +31,142 @@ typedef struct{
unsigned
char
SignalLen
;
unsigned
int
Offset
;
unsigned
char
fOffset
;
unsigned
int
Factor_1
;
/*Denominator of Resolution*/
/*���ȵķ�ĸ*/
unsigned
int
Factor_2
;
/*Numerator of Resolution*/
/*���ȵķ���*/
unsigned
int
Factor_1
;
unsigned
int
Factor_2
;
s_CurValue
*
CurValue
;
unsigned
char
fFormat
;
}
s_CAN_List
;
enum
{
ENUM_VSpeed
=
0
,
//����
ENUM_RSpeed
,
//�??�??
ENUM_WaterTemp
,
// 温度
TCS_Warning_Lamp
,
//前轮胎压
TCS_Work_Mode
,
//后轮胎压
ISG_Ready
,
ISG_Power
,
ISG_Power_Enable
,
CAN_List_Num
,
};
ABS_VehicleSpeed
=
0
,
ABS_Warning_Lamp
,
BCM_PositionLightIndication
,
BCM_TurnLeftandRightIndication
,
BCM_TurnRightIndication
,
BCM_TurnLeftIndication
,
BCM_LowBeamIndication
,
BCM_HighBeamIndication
,
TCS_WarningLamp
,
TCS_WorkSt
,
TCS_Control
,
MCU_GearPosition
,
MCU_ReadyStatus
,
MCU_CruiseSwitchActive
,
MCU_LimpingMode
,
MCU_EnergyRecIntensitySet
,
MCU_OperationMode
,
MCU_MotorTemperature
,
MCU_AutoHoldSta
,
MCU_ControllerWorkingState
,
MCU_CruiseState
,
MCU_MotorSpeed
,
BCM_PowerOnStatus
,
BMS1_SOH
,
BMS1_PACKTotalSOC
,
BMS1_PACKTotalCurrent
,
BMS1_PACKInTotalVoltage
,
MCU_HighestFaultPrompt
,
ICU_RemainrvMile
,
ICU_Speed
,
BMS2_SOH
,
BMS2_PACKTotalSOC
,
BMS2_PACKTotalCurrent
,
BMS2_PACKInTotalVoltage
,
BMS1_HighestFaultPrompt
,
BMS2_HighestFaultPrompt
,
BMS_ChargerConnectSignal
,
BCM_RTCDate_Valid
,
BCM_RTCDate_Second
,
BCM_RTCDate_Minute
,
BCM_RTCDate_Hour
,
BCM_RTCDate_Day
,
BCM_RTCDate_Month
,
BCM_RTCDate_Year
,
BCM_MetricMilesSwitchSet
,
CAN_List_Num
,
};
EXTERN_APP_TEST
volatile
s_CurValue
CurValueStr
[
CAN_List_Num
];
static
const
s_CAN_List
CAN_List
[]
=
{
{
&
CanMsg_101
,
2
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ENUM_VSpeed
],
Motorola
},
{
&
CanMsg_101
,
1
,
0
,
16
,
0
,
Offset_Plus
,
100
,
25
,
&
CurValueStr
[
ENUM_RSpeed
],
Motorola
},
{
&
CanMsg_101
,
5
,
0
,
16
,
273
,
Offset_Minus
,
10
,
1
,
&
CurValueStr
[
ENUM_WaterTemp
],
Motorola
},
{
&
CanMsg_
37B
,
3
,
2
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
TCS_Warning_Lamp
],
Motorola
},
{
&
CanMsg_
37B
,
3
,
4
,
4
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
TCS_Work_Mode
],
Motorola
},
{
&
CanMsg_
0xC2
,
1
,
2
,
14
,
0
,
Offset_Plus
,
128
,
1
,
&
CurValueStr
[
ABS_VehicleSpeed
],
Motorola
},
{
&
CanMsg_
0xC2
,
1
,
0
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ABS_Warning_Lamp
],
Motorola
},
{
&
CanMsg_111
,
4
,
1
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ISG_Ready
],
Motorola
},
{
&
CanMsg_111
,
4
,
2
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ISG_Power
],
Motorola
},
{
&
CanMsg_111
,
4
,
4
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ISG_Power_Enable
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
5
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_PositionLightIndication
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
4
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_TurnLeftandRightIndication
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
3
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_TurnRightIndication
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
2
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_TurnLeftIndication
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
1
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_LowBeamIndication
],
Motorola
},
{
&
CanMsg_0xC3
,
0
,
0
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_HighBeamIndication
],
Motorola
},
};
{
&
CanMsg_0xC1
,
5
,
3
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
TCS_WarningLamp
],
Motorola
},
{
&
CanMsg_0xC1
,
5
,
1
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
TCS_WorkSt
],
Motorola
},
{
&
CanMsg_0xC1
,
5
,
0
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
TCS_Control
],
Motorola
},
{
&
CanMsg_0x81
,
0
,
5
,
3
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_GearPosition
],
Motorola
},
{
&
CanMsg_0x81
,
0
,
0
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_ReadyStatus
],
Motorola
},
{
&
CanMsg_0x81
,
1
,
1
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_CruiseSwitchActive
],
Motorola
},
{
&
CanMsg_0x82
,
0
,
7
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_LimpingMode
],
Motorola
},
{
&
CanMsg_0x82
,
0
,
2
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_EnergyRecIntensitySet
],
Motorola
},
{
&
CanMsg_0x82
,
0
,
0
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_OperationMode
],
Motorola
},
{
&
CanMsg_0xB2
,
7
,
0
,
8
,
40
,
Offset_Minus
,
1
,
1
,
&
CurValueStr
[
MCU_MotorTemperature
],
Motorola
},
{
&
CanMsg_0xB2
,
1
,
4
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_AutoHoldSta
],
Motorola
},
{
&
CanMsg_0xB2
,
1
,
0
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_ControllerWorkingState
],
Motorola
},
{
&
CanMsg_0xB3
,
6
,
3
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_CruiseState
],
Motorola
},
{
&
CanMsg_0xB3
,
1
,
0
,
16
,
10000
,
Offset_Minus
,
1
,
1
,
&
CurValueStr
[
MCU_MotorSpeed
],
Motorola
},
{
&
CanMsg_0x122
,
0
,
0
,
3
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_PowerOnStatus
],
Motorola
},
{
&
CanMsg_0x212
,
7
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS1_SOH
],
Motorola
},
{
&
CanMsg_0x212
,
4
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS1_PACKTotalSOC
],
Motorola
},
{
&
CanMsg_0x212
,
3
,
0
,
16
,
3000
,
Offset_Minus
,
10
,
1
,
&
CurValueStr
[
BMS1_PACKTotalCurrent
],
Motorola
},
{
&
CanMsg_0x212
,
1
,
0
,
16
,
0
,
Offset_Plus
,
10
,
1
,
&
CurValueStr
[
BMS1_PACKInTotalVoltage
],
Motorola
},
{
&
CanMsg_0x217
,
7
,
6
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MCU_HighestFaultPrompt
],
Motorola
},
{
&
CanMsg_0x218
,
6
,
0
,
10
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ICU_RemainrvMile
],
Motorola
},
{
&
CanMsg_0x218
,
0
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ICU_Speed
],
Motorola
},
{
&
CanMsg_0x221
,
7
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS2_SOH
],
Motorola
},
{
&
CanMsg_0x221
,
4
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS2_PACKTotalSOC
],
Motorola
},
{
&
CanMsg_0x221
,
3
,
0
,
16
,
3000
,
Offset_Minus
,
1
,
10
,
&
CurValueStr
[
BMS2_PACKTotalCurrent
],
Motorola
},
{
&
CanMsg_0x221
,
1
,
0
,
16
,
0
,
Offset_Plus
,
1
,
10
,
&
CurValueStr
[
BMS2_PACKInTotalVoltage
],
Motorola
},
{
&
CanMsg_0x310
,
7
,
6
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS1_HighestFaultPrompt
],
Motorola
},
{
&
CanMsg_0x312
,
7
,
6
,
2
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS2_HighestFaultPrompt
],
Motorola
},
{
&
CanMsg_0x321
,
0
,
3
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMS_ChargerConnectSignal
],
Motorola
},
{
&
CanMsg_0x353
,
5
,
6
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Valid
],
Motorola
},
{
&
CanMsg_0x353
,
5
,
0
,
6
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Second
],
Motorola
},
{
&
CanMsg_0x353
,
4
,
0
,
6
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Minute
],
Motorola
},
{
&
CanMsg_0x353
,
3
,
0
,
5
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Hour
],
Motorola
},
{
&
CanMsg_0x353
,
2
,
0
,
5
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Day
],
Motorola
},
{
&
CanMsg_0x353
,
1
,
0
,
4
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Month
],
Motorola
},
{
&
CanMsg_0x353
,
0
,
0
,
5
,
2015
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_RTCDate_Year
],
Motorola
},
{
&
CanMsg_0x21F
,
2
,
6
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BCM_MetricMilesSwitchSet
],
Motorola
},
};
extern
unsigned
int
switchon
;
extern
unsigned
int
miletime
;
extern
unsigned
int
lost_flag
;
extern
unsigned
int
mileflag
;
extern
unsigned
int
CAN_init_flag
;
extern
unsigned
int
water_value
;
extern
unsigned
int
count_flag_a
;
extern
unsigned
int
speed_value
;
extern
unsigned
int
canfinish
;
extern
unsigned
int
canover
;
EXTERN_APP_TEST
void
APP_Button_Proc
(
void
);
EXTERN_APP_TEST
void
Message_Value_Calculate
(
s_CAN_List
list
);
...
...
Test_Bench/App_Headers/Globals_Var.h
View file @
575b117c
...
...
@@ -109,16 +109,48 @@
/*zh:*/
/*CS08 test*/
EXTERN_VAR
CAN_message
CanMessageID0CFF7F03
;
EXTERN_VAR
CAN_message
CanMsg_101
;
EXTERN_VAR
CAN_message
CanMsg_111
;
EXTERN_VAR
CAN_message
CanMsg_37B
;
extern
CAN_message
CanMsg_101
;
extern
CAN_message
CanMsg_111
;
extern
CAN_message
CanMsg_37B
;
// EXTERN_VAR CAN_message CanMsg_101;
// EXTERN_VAR CAN_message CanMsg_111;
// EXTERN_VAR CAN_message CanMsg_37B;
EXTERN_VAR
CAN_message
CanMsg_0xC2
;
EXTERN_VAR
CAN_message
CanMsg_0xC3
;
EXTERN_VAR
CAN_message
CanMsg_0xC1
;
EXTERN_VAR
CAN_message
CanMsg_0x81
;
EXTERN_VAR
CAN_message
CanMsg_0x82
;
EXTERN_VAR
CAN_message
CanMsg_0xB2
;
EXTERN_VAR
CAN_message
CanMsg_0xB3
;
EXTERN_VAR
CAN_message
CanMsg_0x122
;
EXTERN_VAR
CAN_message
CanMsg_0x212
;
EXTERN_VAR
CAN_message
CanMsg_0x217
;
EXTERN_VAR
CAN_message
CanMsg_0x218
;
EXTERN_VAR
CAN_message
CanMsg_0x221
;
EXTERN_VAR
CAN_message
CanMsg_0x310
;
EXTERN_VAR
CAN_message
CanMsg_0x312
;
EXTERN_VAR
CAN_message
CanMsg_0x321
;
EXTERN_VAR
CAN_message
CanMsg_0x353
;
EXTERN_VAR
CAN_message
CanMsg_0x21F
;
// extern CAN_message CanMsg_101;
// extern CAN_message CanMsg_111;
// extern CAN_message CanMsg_37B;
extern
CAN_message
CanMsg_0xC2
;
extern
CAN_message
CanMsg_0xC3
;
extern
CAN_message
CanMsg_0xC1
;
extern
CAN_message
CanMsg_0x81
;
extern
CAN_message
CanMsg_0x82
;
extern
CAN_message
CanMsg_0xB2
;
extern
CAN_message
CanMsg_0xB3
;
extern
CAN_message
CanMsg_0x122
;
extern
CAN_message
CanMsg_0x212
;
extern
CAN_message
CanMsg_0x217
;
extern
CAN_message
CanMsg_0x218
;
extern
CAN_message
CanMsg_0x221
;
extern
CAN_message
CanMsg_0x310
;
extern
CAN_message
CanMsg_0x312
;
extern
CAN_message
CanMsg_0x321
;
extern
CAN_message
CanMsg_0x353
;
extern
CAN_message
CanMsg_0x21F
;
/**/
/*:zh*/
...
...
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