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
e39754aa
Commit
e39754aa
authored
Jul 31, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:草地车老化台
parent
305e954a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
183 additions
and
15 deletions
+183
-15
APP_CAN.c
Test_Bench/Api_Sources/APP_CAN.c
+33
-1
APP_Test.c
Test_Bench/Api_Sources/APP_Test.c
+117
-10
APP_Test.h
Test_Bench/App_Headers/APP_Test.h
+22
-2
Globals_Var.h
Test_Bench/App_Headers/Globals_Var.h
+6
-1
USBDM.ini
Test_Bench/USBDM.ini
+5
-1
No files found.
Test_Bench/Api_Sources/APP_CAN.c
View file @
e39754aa
...
...
@@ -101,6 +101,11 @@ void Format_CAN_Msg()
CanMsg_402
.
ID
=
0x402
;
CanMsg_18202922
.
ID
=
0x18202922
;
CanMsg_125
.
ID
=
0x125
;
CanMsg_157
.
ID
=
0x157
;
CanMsg_SOC
.
ID
=
0x18203020
;
CanMsg_SOC1
.
ID
=
0x18200A20
;
CanMsg_SOC2
.
ID
=
0x18200A21
;
CanMsg_38E
.
ID
=
0x38E
;
CanMsg_101
.
Length
=
8
;
...
...
@@ -110,6 +115,11 @@ void Format_CAN_Msg()
CanMsg_402
.
Length
=
8
;
CanMsg_18202922
.
Length
=
8
;
CanMsg_125
.
Length
=
8
;
CanMsg_157
.
Length
=
8
;
CanMsg_SOC
.
Length
=
8
;
CanMsg_SOC1
.
Length
=
8
;
CanMsg_SOC2
.
Length
=
8
;
CanMsg_38E
.
Length
=
8
;
CanMsg_101
.
ID_EN
=
1
;
CanMsg_111
.
ID_EN
=
1
;
...
...
@@ -118,6 +128,11 @@ void Format_CAN_Msg()
CanMsg_402
.
ID_EN
=
1
;
CanMsg_18202922
.
ID_EN
=
1
;
CanMsg_125
.
ID_EN
=
1
;
CanMsg_157
.
ID_EN
=
1
;
CanMsg_SOC
.
ID_EN
=
1
;
CanMsg_SOC1
.
ID_EN
=
1
;
CanMsg_SOC2
.
ID_EN
=
1
;
CanMsg_38E
.
ID_EN
=
1
;
}
void
Disable_CAN_Tx
(
void
){
...
...
@@ -127,6 +142,13 @@ void Disable_CAN_Tx(void){
CanMsg_37B
.
ID_EN
=
0
;
CanMsg_402
.
ID_EN
=
0
;
CanMsg_12B
.
ID_EN
=
0
;
CanMsg_402
.
ID_EN
=
0
;
CanMsg_18202922
.
ID_EN
=
0
;
CanMsg_125
.
ID_EN
=
0
;
CanMsg_157
.
ID_EN
=
0
;
CanMsg_SOC
.
ID_EN
=
0
;
CanMsg_SOC1
.
ID_EN
=
0
;
CanMsg_SOC2
.
ID_EN
=
0
;
}
void
Set_Pin
(
INT16U
pin
)
...
...
@@ -154,7 +176,7 @@ void App_Can_Proc(void)
}
if
(
GetCtrlTime
(
CANMsgSend_10
0
ms
)
>=
10
){
if
(
GetCtrlTime
(
CANMsgSend_10ms
)
>=
10
){
// ClearCtrlTime(CANMsgSend_10ms);
//bReturn = Api_CANSendFrame((CAN_message *)&CanMsg_101);
// Clear_CAN_Msg((CAN_message *)&CanMsg_101);
...
...
@@ -175,6 +197,16 @@ void App_Can_Proc(void)
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_18202922
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_125
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_125
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_157
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_157
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_SOC
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_SOC
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_SOC1
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_SOC1
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_SOC2
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_SOC2
);
bReturn
=
Api_CANSendFrame
((
CAN_message
*
)
&
CanMsg_38E
);
Clear_CAN_Msg
((
CAN_message
*
)
&
CanMsg_38E
);
//bReturn = Api_CANSendFrame((CAN_message *)&CanMessageID18FEDCD5);
//bReturn = Api_CANSendFrame((CAN_message *)&CanMessageID18FEDED5);
...
...
Test_Bench/Api_Sources/APP_Test.c
View file @
e39754aa
...
...
@@ -96,62 +96,166 @@ void APP_ICM_Proc(void) /*zh321*/ /*FS04*/
// Disable_CAN_Tx();
// CAN_lost_flag = 0;
// }
CurValueStr
[
MMCU_PowerMode
].
val
=
2
;
if
(
count_flag_a
==
1
)
{
{
//Format_CAN_Msg();
CurValueStr
[
MMCU_PowerMode
].
val
=
2
;
switch
(
Key
.
CAN_Step
)
{
// CurValueStr[ ].val = ;
// CurValueStr[ ].val = ;
// CurValueStr[ ].val = ;
// CurValueStr[ ].val = ;
// CurValueStr[ ].val = ;
case
1
:
{
//CurValueStr[ENUM_VSpeed ].val
CurValueStr
[
MBMS_Soc1
].
val
=
10
;
CurValueStr
[
MBMS_Soc2
].
val
=
10
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
0
;
CurValueStr
[
MBMS_StatSoc
].
val
=
10
;
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
].
val
=
0
;
}
break
;
case
2
:
{
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
30
;
CurValueStr
[
MBMS_Soc2
].
val
=
30
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
2
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
1
;
CurValueStr
[
MBMS_StatSoc
].
val
=
30
;
CurValueStr
[
MMCU_SeatDetectState
].
val
=
0
;
}
break
;
case
3
:
{
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
].
val
=
0
;
CurValueStr
[
MMCU_SeatDetectState
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
50
;
CurValueStr
[
MBMS_Soc2
].
val
=
50
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
2
;
CurValueStr
[
MBMS_StatSoc
].
val
=
50
;
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
0
;
}
break
;
case
4
:
{
CurValueStr
[
MMCU_SeatDetectState
].
val
=
0
;
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
70
;
CurValueStr
[
MBMS_Soc2
].
val
=
70
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
70
;
CurValueStr
[
MMCU_PowerMode
].
val
=
2
;
}
break
;
case
5
:
{
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
0
;
CurValueStr
[
MMCU_PowerMode
].
val
=
3
;
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
}
break
;
case
6
:
{
CurValueStr
[
MMCU_PowerMode
].
val
=
5
;
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
1
;
CurValueStr
[
MBMS_TOTALSigCharg
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
//CurValueStr[MBMS_TOTALSigAcc ].val = 0;
//CurValueStr[MBMS_TOTALSigCharg ].val = 1;
CurValueStr
[
BMCU_PTOSwicthState
].
val
=
0
;
}
break
;
case
7
:
{
CurValueStr
[
MMCU_PowerMode
].
val
=
2
;
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
0
;
CurValueStr
[
MBMS_TOTALSigCharg
].
val
=
0
;
CurValueStr
[
BMCU_PTOSwicthState
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
}
break
;
case
8
:
{
CurValueStr
[
BMCU_PTOSwicthState
].
val
=
0
;
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
}
break
;
case
9
:
{
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
].
val
=
0
;
//刀盘过载
CurValueStr
[
MMCU_SeatDetectState
].
val
=
0
;
//座椅检测
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
0
;
//钥匙接入
CurValueStr
[
MBMS_TOTALSigCharg
].
val
=
0
;
//充电指示灯
CurValueStr
[
MMCU_PowerMode
].
val
=
2
;
// READY灯
CurValueStr
[
BMCU_PTOSwicthState
].
val
=
0
;
}
break
;
case
10
:
{
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
].
val
=
1
;
//刀盘过载
CurValueStr
[
MMCU_SeatDetectState
].
val
=
1
;
//座椅检测
CurValueStr
[
MBMS_TOTALSigAcc
].
val
=
1
;
//钥匙接入
CurValueStr
[
MBMS_TOTALSigCharg
].
val
=
1
;
//充电指示灯
CurValueStr
[
MMCU_PowerMode
].
val
=
3
;
// READY灯 充电灯和ready冲突
CurValueStr
[
BMCU_PTOSwicthState
].
val
=
1
;
CurValueStr
[
MBMS_Soc1
].
val
=
100
;
CurValueStr
[
MBMS_Soc2
].
val
=
100
;
CurValueStr
[
MMCU_TravelSpeedGear
].
val
=
0
;
CurValueStr
[
MMCU_ParkingGearState
].
val
=
1
;
CurValueStr
[
BMCU_BladeSpeedGear
].
val
=
3
;
CurValueStr
[
MBMS_StatSoc
].
val
=
100
;
}
break
;
case
11
:
...
...
@@ -165,6 +269,9 @@ void APP_ICM_Proc(void) /*zh321*/ /*FS04*/
}
break
;
}
}
else
{
//Disable_CAN_Tx();
}
}
...
...
Test_Bench/App_Headers/APP_Test.h
View file @
e39754aa
...
...
@@ -51,13 +51,24 @@ enum
ABS_Warning_Lamp
,
ECU_Warning_Lamp
,
//MBMS_TOTALSigCharg, //充电指示灯
MBMS_TOTALSigCharg
,
//充电指示灯 18202922
MBMS_TOTALSigAcc
,
MMCU_PowerMode
,
//125
MMCU_TravelSpeedGear
,
MMCU_SeatDetectState
,
MMCU_ParkingGearState
,
BMCU_PTOSwicthState
,
BMCU_BladeSpeedGear
,
MBMS_Soc1
,
MBMS_Soc2
,
MBMS_StatSoc
,
BMCU_Moto1_Locked_RotorFault
,
CAN_List_Num
,
};
...
...
@@ -80,7 +91,8 @@ static const s_CAN_List CAN_List[] =
{
&
CanMsg_402
,
7
,
7
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
ECU_Warning_Lamp
],
Motorola
},
//{&CanMsg_18202922, 0, 1, 1, 0, Offset_Plus, 1, 1, &CurValueStr[MBMS_TOTALSigCharg ], Motorola},
{
&
CanMsg_18202922
,
0
,
0
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MBMS_TOTALSigCharg
],
Motorola
},
{
&
CanMsg_18202922
,
0
,
1
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MBMS_TOTALSigAcc
],
Motorola
},
{
&
CanMsg_125
,
0
,
2
,
4
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MMCU_PowerMode
],
Motorola
},
...
...
@@ -88,7 +100,15 @@ static const s_CAN_List CAN_List[] =
{
&
CanMsg_125
,
2
,
1
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MMCU_SeatDetectState
],
Motorola
},
{
&
CanMsg_125
,
2
,
7
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MMCU_ParkingGearState
],
Motorola
},
{
&
CanMsg_157
,
0
,
3
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMCU_PTOSwicthState
],
Motorola
},
{
&
CanMsg_157
,
0
,
4
,
3
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMCU_BladeSpeedGear
],
Motorola
},
{
&
CanMsg_SOC1
,
4
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MBMS_Soc1
],
Motorola
},
{
&
CanMsg_SOC2
,
4
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MBMS_Soc2
],
Motorola
},
{
&
CanMsg_SOC
,
4
,
0
,
8
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
MBMS_StatSoc
],
Motorola
},
{
&
CanMsg_38E
,
1
,
0
,
1
,
0
,
Offset_Plus
,
1
,
1
,
&
CurValueStr
[
BMCU_Moto1_Locked_RotorFault
],
Motorola
},
};
...
...
Test_Bench/App_Headers/Globals_Var.h
View file @
e39754aa
...
...
@@ -115,7 +115,12 @@
EXTERN_VAR
CAN_message
CanMsg_402
;
EXTERN_VAR
CAN_message
CanMsg_18202922
;
EXTERN_VAR
CAN_message
CanMsg_125
;
EXTERN_VAR
CAN_message
CanMsg_157
;
EXTERN_VAR
CAN_message
CanMsg_SOC
;
EXTERN_VAR
CAN_message
CanMsg_SOC1
;
EXTERN_VAR
CAN_message
CanMsg_SOC2
;
EXTERN_VAR
CAN_message
CanMsg_38E
;
extern
CAN_message
CanMsg_101
;
extern
CAN_message
CanMsg_111
;
...
...
Test_Bench/USBDM.ini
View file @
e39754aa
...
...
@@ -10,7 +10,7 @@ Target=USBDM
Layout
=
C_layout.hwl
LoadDialogOptions
=
AUTOERASEANDFLASH RUNANDSTOPAFTERLOAD="main"
CPU
=
HC12
MainFrame
=
0,1,-1,-1,-1,-1,1
68,202,1320,867
MainFrame
=
0,1,-1,-1,-1,-1,1
398,-920,2550,-255
TOOLBAR
=
57600 57601 32795 0 57635 57634 57637 0 57671 57669 0 32777 32776 32782 32780 32781 32778 0 32806
AEFWarningDialog
=
FALSE
...
...
@@ -55,3 +55,7 @@ File0=C_layout.hwl
File1
=
File2
=
File3
=
[Recent HI-WAVE FindProcedure Search]
Search0
=
count_flag_a
Search1
=
Key.CAN_Step
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