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
296942f1
Commit
296942f1
authored
Jul 22, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修改指示灯问题
parent
34473e0e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
33 deletions
+65
-33
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+23
-23
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+4
-3
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+1
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+29
-4
RTE_GPIO.c
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
+6
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+2
-2
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
296942f1
...
...
@@ -117,23 +117,19 @@ void Can_Set_Buff_042(uint8_t CopyData [])
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
Tcs
==
1
)
/*
亮
*/
if
(
Tcs
==
1
)
/*
TCS指示灯开启
*/
{
pCANMsg
->
Sig
.
TCS
=
1
;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
pCANMsg
->
Sig
.
TCS
=
0
;
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
}
else
if
(
Tcs
==
2
)
/*
灭
*/
else
if
(
Tcs
==
2
)
/*
禁止TCS指示灯开启
*/
{
pCANMsg
->
Sig
.
TCS
=
0
;
//
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
else
else
/*熄灭*/
{
pCANMsg
->
Sig
.
TCS
=
0
;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
pCANMsg
->
Sig
.
TCS
=
1
;
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
}
pCANMsg
->
Msg
[
7
]
=
0xff
;
}
...
...
@@ -202,10 +198,10 @@ void Can_Set_Buff_280(uint8_t CopyData [])
;
}
if
(
Tcs
==
1
)
{
pCANMsg
->
Sig
.
Tcs_Status
=
1
;
}
//
if(Tcs == 1)
//
{
//
pCANMsg->Sig.Tcs_Status = 1;
//
}
if
(
Side_bracket
==
1
)
{
pCANMsg
->
Sig
.
Side_bracket280
=
1
;
...
...
@@ -302,11 +298,14 @@ void Can_Set_Buff_001(uint8_t CopyData [])
{
pCANMsg
->
Sig
.
Motor_hert
=
1
;
}
if
(
Energy_recovery
==
2
)
/*能量回收*/
if
(
(
Energy_recovery
==
2
)
||
(
Energy_recovery
==
1
)
||
(
Energy_recovery
==
3
)
)
/*能量回收*/
{
pCANMsg
->
Sig
.
Msg_0x001_2b3t
=
1
;
}
if
(
motor_hot
==
1
)
{
pCANMsg
->
Sig
.
Msg_0x001_2b4t
=
1
;
}
}
void
Can_Set_Buff_021
(
uint8_t
CopyData
[])
...
...
@@ -663,18 +662,19 @@ void Can_Set_Buff_207(uint8_t CopyData [])
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
Tcs
==
1
)
if
(
Tcs
==
1
)
//TCS
{
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
else
if
(
Tcs
==
2
)
else
if
(
Tcs
==
2
)
//禁止TCS
{
pCANMsg
->
Sig
.
Tcs_
Control
=
1
;
pCANMsg
->
Sig
.
Tcs_
mode
=
0
;
}
else
else
//熄灭
{
;
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
}
}
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
296942f1
...
...
@@ -164,7 +164,8 @@ typedef union
//uint64_t :8;/*2byte*/
uint64_t
:
3
;
uint64_t
Msg_0x001_2b3t
:
1
;
uint64_t
:
4
;
uint64_t
Msg_0x001_2b4t
:
1
;
uint64_t
:
3
;
uint64_t
:
8
;
uint64_t
:
8
;
...
...
@@ -246,6 +247,8 @@ typedef union
{
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
TCS
:
4
;
uint64_t
:
2
;
...
...
@@ -255,8 +258,6 @@ typedef union
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
}
Sig
;
}
CANMsg207Union
;
...
...
YueJin_test_bench/source/Appliciation/Key.h
View file @
296942f1
...
...
@@ -123,6 +123,7 @@ extern uint16_t Eletricity;
extern
uint8_t
Hour
;
extern
uint8_t
Tcs
;
extern
uint8_t
Energy_recovery
;
extern
uint8_t
motor_hot
;
extern
uint8_t
Gear
;
extern
uint8_t
Ready
;
extern
uint8_t
Cruiste
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
296942f1
...
...
@@ -20,6 +20,7 @@ uint16_t Eletricity = 0;
uint8_t
Hour
=
0
;
uint8_t
Tcs
=
0
;
uint8_t
Energy_recovery
=
0
;
uint8_t
motor_hot
=
0
;
uint8_t
Gear
=
0
;
uint8_t
Ready
=
0
;
uint8_t
Cruiste
=
0
;
...
...
@@ -483,6 +484,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
0
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -492,6 +494,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
NFC_C_card
=
0
;
...
...
@@ -503,8 +506,9 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Signal_GPS
=
0
;
Eletricity
=
0
;
Hour
=
2
;
Tcs
=
1
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
1
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -514,6 +518,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
1
;
Right_Led
=
1
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
NFC_C_card
=
1
;
Hill_Descent_control
=
1
;
break
;
...
...
@@ -523,8 +528,9 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Signal_GPS
=
0
;
Eletricity
=
150
;
Hour
=
4
;
Tcs
=
0
;
Tcs
=
1
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -534,6 +540,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
1
;
LINE_OUT_NEG_05
=
1
;
NFC_C_card
=
2
;
Side_bracket
=
1
;
Hill_Descent_control
=
0
;
...
...
@@ -544,8 +551,9 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Signal_GPS
=
0
;
Eletricity
=
350
;
Hour
=
6
;
Tcs
=
0
;
Tcs
=
2
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
2
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -555,6 +563,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
NFC_C_card
=
0
;
Charging_connection_led
=
0
;
break
;
...
...
@@ -566,6 +575,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
8
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -575,6 +585,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
0
;
Charging_connection_led
=
1
;
break
;
case
5
:
...
...
@@ -585,6 +596,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
10
;
Tcs
=
0
;
Energy_recovery
=
2
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -594,6 +606,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
Side_bracket
=
1
;
Charging_connection_led
=
0
;
break
;
...
...
@@ -603,8 +616,9 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Signal_GPS
=
0
;
Eletricity
=
1000
;
Hour
=
12
;
Tcs
=
2
;
Tcs
=
0
;
Energy_recovery
=
1
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
1
;
Cruiste
=
1
;
...
...
@@ -614,6 +628,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
Side_bracket
=
0
;
break
;
case
7
:
...
...
@@ -624,6 +639,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
14
;
Tcs
=
0
;
Energy_recovery
=
3
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
3
;
Cruiste
=
0
;
...
...
@@ -633,6 +649,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
break
;
case
8
:
Vspeed
=
88
;
...
...
@@ -642,6 +659,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
16
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
1
;
Gear
=
0
;
Ready
=
2
;
Cruiste
=
0
;
...
...
@@ -651,6 +669,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
break
;
case
9
:
Vspeed
=
88
;
...
...
@@ -660,6 +679,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
18
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -669,6 +689,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
0
;
Right_Led
=
0
;
Headlights_Led
=
0
;
LINE_OUT_NEG_05
=
1
;
break
;
case
10
:
Vspeed
=
88
;
...
...
@@ -678,6 +699,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
20
;
Tcs
=
0
;
Energy_recovery
=
0
;
motor_hot
=
0
;
Gear
=
0
;
Ready
=
0
;
Cruiste
=
0
;
...
...
@@ -688,6 +710,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Right_Led
=
0
;
Headlights_Led
=
0
;
bluetooth_phone
=
1
;
LINE_OUT_NEG_05
=
1
;
break
;
case
11
:
Vspeed
=
88
;
...
...
@@ -697,6 +720,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Hour
=
1
;
Tcs
=
1
;
Energy_recovery
=
1
;
motor_hot
=
1
;
Gear
=
1
;
Ready
=
3
;
Cruiste
=
1
;
...
...
@@ -706,6 +730,7 @@ void User_CheckMode_Service(uint8_t CbkCycle)
Left_Led
=
1
;
Right_Led
=
1
;
Headlights_Led
=
1
;
LINE_OUT_NEG_05
=
0
;
Side_bracket
=
1
;
Hill_Descent_control
=
1
;
bluetooth_phone
=
0
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
View file @
296942f1
...
...
@@ -199,7 +199,12 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
GPIO_Config
(
&
gpio_temp
);
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_2
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
queren
=
0
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
296942f1
...
...
@@ -73,7 +73,7 @@
#define NEG_2_Ctrl GPIO_OUT_PORT09_PIN05
#define NEG_3_Ctrl GPIO_OUT_PORT09_PIN04
#define NEG_4_Ctrl GPIO_OUT_PORT09_PIN03
#define NEG_5_Ctrl GPIO_OUT_PORT09_PIN02
//
#define NEG_5_Ctrl GPIO_OUT_PORT09_PIN02
// #define NEG_6_Ctrl GPIO_OUT_PORT09_PIN01
#define NEG_7_Ctrl GPIO_OUT_PORT10_PIN07
#define NEG_8_Ctrl GPIO_OUT_PORT10_PIN03
...
...
@@ -85,7 +85,7 @@
#define LINE_SafeBelt_2 NEG_2_Ctrl
#define LINE_SafeBelt_3 NEG_3_Ctrl
#define LINE_SafeBelt_4 NEG_4_Ctrl
#define LINE_SafeBelt_5 NEG_5_Ctrl
//
#define LINE_SafeBelt_5 NEG_5_Ctrl
// #define LINE_SafeBelt_2_press NEG_6_Ctrl
#define LINE_SafeBelt_3_press NEG_7_Ctrl
...
...
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