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
ca5ce2fa
Commit
ca5ce2fa
authored
Oct 08, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:完成燃油车
parent
80431918
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
13 deletions
+52
-13
g_Var.h
app_Headers/g_Var.h
+2
-0
app_CAN.c
app_Sources/app_CAN.c
+43
-6
bsp_CAN.c
bsp_Sources/bsp_CAN.c
+1
-1
bsp_System.c
bsp_Sources/bsp_System.c
+5
-5
gui_Display.h
gui_Headers/gui_Display.h
+1
-1
No files found.
app_Headers/g_Var.h
View file @
ca5ce2fa
...
...
@@ -21,6 +21,8 @@
EXTERN_VAR
volatile
_CanMsg
g_Msg18FF0113
;
EXTERN_VAR
volatile
_CanMsg
g_Msg0CFED926
;
EXTERN_VAR
volatile
_CanMsg
g_Msg18850000
;
EXTERN_VAR
volatile
_CanMsg
g_Msg18FF5100
;
EXTERN_VAR
volatile
_CanMsg
g_Msg18FF5000
;
EXTERN_VAR
volatile
_CanMsg
g_Msg240
;
//���� 100MM
EXTERN_VAR
volatile
_CanMsg
g_Msg12B
;
EXTERN_VAR
volatile
_CanMsg
g_Msg125
;
...
...
app_Sources/app_CAN.c
View file @
ca5ce2fa
...
...
@@ -176,6 +176,8 @@ void app_Can_handle(void)
{
api_SetTimer6
(
50
,(
_Clock
*
)
&
g_Clock
);
//100ms
g_bReturn
=
bsp_CANSendExtFrame
(
g_Msg0A31FFE8
.
id
,
g_Msg0A31FFE8
.
prio
,
g_Msg0A31FFE8
.
dlc
,
g_Msg0A31FFE8
.
data
);
g_bReturn
=
bsp_CANSendExtFrame
(
g_Msg18FF5000
.
id
,
g_Msg18FF5000
.
prio
,
g_Msg18FF5000
.
dlc
,
g_Msg18FF5000
.
data
);
g_bReturn
=
bsp_CANSendExtFrame
(
g_Msg18FF5100
.
id
,
g_Msg18FF5100
.
prio
,
g_Msg18FF5100
.
dlc
,
g_Msg18FF5100
.
data
);
// g_bReturn = bsp_CANSendExtFrame(g_Msg18FD0700.id,g_Msg18FD0700.prio,g_Msg18FD0700.dlc,g_Msg18FD0700.data); //1000
// g_bReturn = bsp_CANSendExtFrame(g_Msg18FEC600.id,g_Msg18FEC600.prio,g_Msg18FEC600.dlc,g_Msg18FEC600.data); //1000
// g_bReturn = bsp_CANSendExtFrame(g_Msg18850000.id,g_Msg18850000.prio,g_Msg18850000.dlc,g_Msg18850000.data); //1000
...
...
@@ -331,8 +333,13 @@ void app_Can_IdInit(void)
g_Msg18850000
.
prio
=
0
;
g_Msg18850000
.
dlc
=
8
;
g_Msg18FF5100
.
id
=
0X18FF5100
;
g_Msg18FF5100
.
prio
=
0
;
g_Msg18FF5100
.
dlc
=
8
;
g_Msg18FF5000
.
id
=
0X18FF5000
;
g_Msg18FF5000
.
prio
=
0
;
g_Msg18FF5000
.
dlc
=
8
;
}
...
...
@@ -673,6 +680,11 @@ void app_Can_handle_PA5(void) {
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x0
;
g_Msg0A30FFE8
.
data
[
0
].
bbyte
=
0x0
;
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x00
;
}
if
(
G_Button
.
LED_STEP
==
1
)
{
...
...
@@ -699,10 +711,15 @@ void app_Can_handle_PA5(void) {
g_Msg0A31FFE8
.
data
[
0
].
bbyte
=
0xBC
;
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x00
;
g_Msg0A30FFE8
.
data
[
0
].
bbyte
=
0x00
;
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x79
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x00
;
}
if
(
G_Button
.
LED_STEP
==
2
)
{
g_Msg12B
.
data
[
2
].
bbyte
=
0x03
;
g_Msg12B
.
data
[
2
].
bbyte
=
0x03
;
g_Msg12B
.
data
[
3
].
bbyte
=
0xE0
;
g_Msg240
.
data
[
4
].
bbyte
=
0
;
...
...
@@ -723,6 +740,11 @@ void app_Can_handle_PA5(void) {
g_Msg0A31FFE8
.
data
[
0
].
bbyte
=
0x72
;
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x01
;
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x80
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x00
;
}
if
(
G_Button
.
LED_STEP
==
3
)
{
...
...
@@ -749,10 +771,15 @@ g_Msg12B.data[2].bbyte=0x05;
g_Msg0A31FFE8
.
data
[
0
].
bbyte
=
0x30
;
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x02
;
g_Msg0A30FFE8
.
data
[
0
].
bbyte
=
0x00
;
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x80
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x00
;
}
if
(
G_Button
.
LED_STEP
==
4
)
{
g_Msg12B
.
data
[
2
].
bbyte
=
0x07
;
g_Msg12B
.
data
[
2
].
bbyte
=
0x07
;
g_Msg12B
.
data
[
3
].
bbyte
=
0xC0
;
g_Msg240
.
data
[
4
].
bbyte
=
0
;
...
...
@@ -775,10 +802,16 @@ g_Msg12B.data[2].bbyte=0x07;
g_Msg0A31FFE8
.
data
[
0
].
bbyte
=
0xE6
;
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x02
;
g_Msg0A30FFE8
.
data
[
0
].
bbyte
=
0x08
;
}
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x00
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x40
;
}
if
(
G_Button
.
LED_STEP
==
5
)
{
g_Msg12B
.
data
[
2
].
bbyte
=
0x09
;
g_Msg12B
.
data
[
2
].
bbyte
=
0x09
;
g_Msg12B
.
data
[
3
].
bbyte
=
0xB0
;
g_Msg240
.
data
[
4
].
bbyte
=
0x08
;
...
...
@@ -802,6 +835,10 @@ g_Msg12B.data[2].bbyte=0x09;
g_Msg0A31FFE8
.
data
[
1
].
bbyte
=
0x03
;
g_Msg0A30FFE8
.
data
[
0
].
bbyte
=
0x01
;
g_Msg18FF5000
.
data
[
7
].
bbyte
=
0x80
;
g_Msg18FF5100
.
data
[
1
].
bbyte
=
0x79
;
g_Msg18FF5100
.
data
[
2
].
bbyte
=
0x40
;
}
if
(
G_Button
.
LED_STEP
==
6
)
{
...
...
bsp_Sources/bsp_CAN.c
View file @
ca5ce2fa
...
...
@@ -30,7 +30,7 @@ void bsp_CAN_Init(void)
// CANBTR1=(10)|(3<<4); //��Ϊ1�β��� //2
CANBTR0_SJW
=
SJW_1Tq
;
//����ͬ��
CANBTR0_BRP
=
0
;
//one null
CANBTR0_BRP
=
1
;
//one null
CANIDAC_IDAM
=
IDAM_2_32Bit
;
...
...
bsp_Sources/bsp_System.c
View file @
ca5ce2fa
...
...
@@ -118,27 +118,27 @@ void GJ_CS10_JS_ECUOUT_N(void)
if
(
g_FRStep
==
1
)
{
// CS_FR=326; //20KM //===== CS_FR=651;10KM 12HZ =====//
ZS_FR
=
467
;
//1000r
ZS_FR
=
180
;
//1000r
}
if
(
g_FRStep
==
2
)
{
// CS_FR=163; //40KM
ZS_FR
=
234
;
//2000r
ZS_FR
=
88
;
//2000r
}
if
(
g_FRStep
==
3
)
{
// CS_FR=108; //60KM
ZS_FR
=
156
;
//3000
ZS_FR
=
60
;
//3000
}
if
(
g_FRStep
==
4
)
{
// CS_FR=81; //80KM
ZS_FR
=
117
;
//4000r
ZS_FR
=
40
;
//4000r
}
if
(
g_FRStep
==
5
)
{
// CS_FR=65; //100KM
ZS_FR
=
94
;
//5000
ZS_FR
=
40
;
//5000
}
if
(
g_FRStep
==
6
)
{
...
...
gui_Headers/gui_Display.h
View file @
ca5ce2fa
...
...
@@ -55,7 +55,7 @@
#define HIGH 1
#define LOW 0
#define MenuCn
10
#define MenuCn
5
#define Auto 1
#define Manu 0
...
...
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