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
094022e6
Commit
094022e6
authored
Jun 06, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改界面显示BUG
parent
d39739f7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
115 additions
and
94 deletions
+115
-94
project.gpj
YueJin_test_bench/ghs/project.gpj
+1
-0
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+49
-8
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+35
-50
CAN_Communication_Matrix.c
...test_bench/source/Appliciation/CAN_Communication_Matrix.c
+2
-1
CAN_Communication_Matrix.h
...test_bench/source/Appliciation/CAN_Communication_Matrix.h
+1
-0
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+5
-7
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+13
-7
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+9
-21
No files found.
YueJin_test_bench/ghs/project.gpj
View file @
094022e6
...
...
@@ -50,6 +50,7 @@ primaryTarget=v800_standalone.tgt
-Onone
-O0
-G
C:\Users\ADMINI~1\AppData\Local\Temp\vmware-Administrator\VMwareDnD\596ee05a\-2KFA-EV1ܹ淶V2.3_250602.docx
.\group\Application.gpj
.\group\Driver.gpj
.\group\System.gpj
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
094022e6
...
...
@@ -117,19 +117,26 @@ void Can_Set_Buff_042(uint8_t CopyData [])
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
Tcs
==
1
)
if
(
Tcs
==
1
)
/*亮*/
{
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
pCANMsg
->
Sig
.
TCS
=
1
;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
else
if
(
Tcs
==
2
)
else
if
(
Tcs
==
2
)
/*灭*/
{
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
pCANMsg
->
Sig
.
TCS
=
0
;
//
//pCANMsg->Sig.Tcs_Control = 1;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
else
{
;
pCANMsg
->
Sig
.
TCS
=
0
;
pCANMsg
->
Sig
.
Tcs_mode
=
0
;
pCANMsg
->
Sig
.
Tcs_Control
=
0
;
}
pCANMsg
->
Msg
[
7
]
=
0xff
;
}
void
Can_Set_Buff_480
(
uint8_t
CopyData
[])
...
...
@@ -247,7 +254,7 @@ void Can_Set_Buff_202(uint8_t CopyData [])
{
pCANMsg
->
Sig
.
Ready
=
3
;
}
if
(
Fault
==
1
)
{
pCANMsg
->
Sig
.
Fault
=
1
;
...
...
@@ -287,6 +294,10 @@ void Can_Set_Buff_001(uint8_t CopyData [])
{
pCANMsg
->
Sig
.
Motor_hert
=
1
;
}
// if( == 1)
// {
// pCANMsg->Sig.Msg_0x001_2b3t = 1;
// }
}
void
Can_Set_Buff_021
(
uint8_t
CopyData
[])
...
...
@@ -408,4 +419,34 @@ void Can_Set_Buff_786(uint8_t CopyData [])
}
}
\ No newline at end of file
}
void
Can_Set_Buff_207
(
uint8_t
CopyData
[])
{
uint8_t
i
=
0u
;
uint32_t
wtemp
=
0u
;
CANMsg207Union
*
pCANMsg
;
pCANMsg
=
(
CANMsg207Union
*
)
CopyData
;
if
(
pCANMsg
!=
(
void
*
)
0
)
{
for
(
i
=
0u
;
i
<
8u
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
0u
;
}
}
if
(
Tcs
==
1
)
{
pCANMsg
->
Sig
.
Tcs_mode
=
1
;
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
}
else
if
(
Tcs
==
2
)
{
pCANMsg
->
Sig
.
Tcs_Control
=
1
;
}
else
{
;
}
}
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
094022e6
...
...
@@ -100,15 +100,18 @@ typedef union
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
Energy_status
:
1
;
uint64_t
:
1
;
uint64_t
:
3
;
uint64_t
Tcs_Status
:
1
;
uint64_t
Energy_recovery
:
2
;
uint64_t
:
2
;
uint64_t
:
1
;
uint64_t
:
3
;
uint64_t
Energy_status
:
1
;
uint64_t
:
2
;
uint64_t
Side_bracket280
:
1
;
uint64_t
:
3
;
uint64_t
:
1
;
uint64_t
Energy_recovery
:
2
;
uint64_t
:
8
;
uint64_t
:
8
;
...
...
@@ -116,31 +119,6 @@ typedef union
}
Sig
;
}
CANMsg280Union
;
// typedef union
// {
// uint8_t Msg [ 8 ];
// struct
// {
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :1;
// uint64_t Energy_recovery:2;
// uint64_t Tcs_Status:1;
// uint64_t :1;
// uint64_t Side_bracket:1;
// uint64_t :1;
// uint64_t Energy_status:1;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// } Sig;
// } CANMsg280Union;
typedef
union
{
uint8_t
Msg
[
8
];
...
...
@@ -183,7 +161,11 @@ typedef union
uint64_t
Motor_hert
:
1
;
uint64_t
:
3
;
uint64_t
:
8
;
//uint64_t :8;/*2byte*/
uint64_t
:
3
;
uint64_t
Msg_0x001_2b3t
:
1
;
uint64_t
:
4
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
...
...
@@ -213,26 +195,7 @@ typedef union
}
Sig
;
}
CANMsg021Union
;
//NFC
// typedef union
// {
// uint8_t Msg [ 8 ];
// struct
// {
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :8;
// uint64_t :7;
// uint64_t NFC_C_card:1;
// uint64_t :8;
// uint64_t :8;
// } Sig;
// } CANMsg284Union;
typedef
union
{
uint8_t
Msg
[
8
];
...
...
@@ -276,6 +239,27 @@ typedef union
}
CANMsg786Union
;
typedef
union
{
uint8_t
Msg
[
8
];
struct
{
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
TCS
:
4
;
uint64_t
:
2
;
uint64_t
Tcs_mode
:
1
;
uint64_t
Tcs_Control
:
1
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
uint64_t
:
8
;
}
Sig
;
}
CANMsg207Union
;
void
CAN_MSG_COUNTER_PLUS
(
void
);
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
);
...
...
@@ -291,6 +275,7 @@ void Can_Set_Buff_001(uint8_t CopyData []);
void
Can_Set_Buff_021
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_284
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_207
(
uint8_t
CopyData
[]);
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return1
();
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return2
();
...
...
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.c
View file @
094022e6
...
...
@@ -21,7 +21,8 @@ const st_CAN_SendAttribute CAN_CH4_CANSendAttr[CAN_CH4_ID_SEND_TOTAL] =
{
0x001
,
100ul
*
1000ul
,
40ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_11
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_001
,
(
void
*
)
0
},
//电机过热
{
0x021
,
100ul
*
1000ul
,
45ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_12
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_021
,
(
void
*
)
0
},
//电池过热
{
0x284
,
100ul
*
1000ul
,
50ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_13
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_284
,
(
void
*
)
0
},
//NFC
{
0x786
,
100ul
*
1000ul
,
55ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_14
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_786
,
(
void
*
)
0
},
//诊断
{
0x786
,
100ul
*
1000ul
,
55ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_14
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_786
,
(
void
*
)
0
},
//诊断硬件软件版本号
{
0x207
,
100ul
*
1000ul
,
60ul
,
0u
,
MSG_STD
,
RSCAN_CHANNEL_BUF_15
,
8u
,
CAN_MSG_TX_CYCLE
,
Can_Set_Buff_207
,
(
void
*
)
0
},
//诊断
};
const
st_CANMsgAttribute
CAN_CH4_CAN_MSG_CONST_ARRAY
[
CAN_CH4_ID_TOTAL_MAX
]
=
...
...
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.h
View file @
094022e6
...
...
@@ -31,6 +31,7 @@ typedef enum
CAN_CH4_ID_021
,
CAN_CH4_ID_284
,
CAN_CH4_ID_786
,
CAN_CH4_ID_207
,
CAN_CH4_ID_SEND_TOTAL
,
}
CAN_CH4_CAN_MSG_SEND_ID_t
;
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
094022e6
...
...
@@ -2960,12 +2960,10 @@ void Display_PageNum(void)
{
Clear_TFT_Time
=
0
;
TFT_LCD_Draw_Box
(
170
,
20
,
223
,
45
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
if
(
All_Flag
.
u8flag
[
4
]
==
1
)
if
(
All_Flag
.
u8flag
[
6
]
==
1
)
{
Display_Num
(
200
,
20
,
Check_Steps
,
100
);
//步骤
}
//Display_Num(20,280,Version,100);//版本号
}
...
...
@@ -4373,15 +4371,15 @@ void Display_interface_learning_card(uint16_t X,uint8_t Y)
}
for
(
uint8_t
i
=
0
;
i
<
7
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
3
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
succeed
[
i
]]);
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
5
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
succeed
[
i
]]);
}
for
(
uint8_t
i
=
0
;
i
<
4
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
6
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
fail
[
i
]]);
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
10
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
fail
[
i
]]);
}
for
(
uint8_t
i
=
0
;
i
<
7
;
i
++
)
{
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
9
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
sameID
[
i
]]);
TFT_LCD_Draw_Bmp
(
X
+
i
*
10
,
Y
+
15
0
,
(
uint8_t
*
)
FONT_TABLE_15
[
ptr
->
sameID
[
i
]]);
}
}
...
...
@@ -4533,7 +4531,7 @@ void Get_CAN_CH4_ID_750_Diagnosis_return1()
//版本号显示
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
)
{
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
3
]
==
1
)
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
8
]
==
1
)
{
TFT_LCD_Draw_Bmp
(
X
,
Y
,
(
uint8_t
*
)
gImage_Dyy_words_1X6_Y16
);
//软件版本号
TFT_LCD_Draw_Bmp
(
X
,
Y
+
50
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
...
...
YueJin_test_bench/source/Appliciation/Key.h
View file @
094022e6
...
...
@@ -78,15 +78,21 @@ typedef struct
typedef
union
{
uint8_t
u8flag
[
8
];
uint8_t
u8flag
[
16
];
struct
{
uint8_t
u8_SW_2
:
1
;
uint8_t
u8_SW_6
:
1
;
uint8_t
u8_SW_7
:
1
;
uint8_t
u8_SW_8
:
1
;
uint8_t
u8_SW_10
:
1
;
uint8_t
:
3
;
uint16_t
u16_SW_0
:
1
;
uint16_t
u16_SW_1
:
1
;
uint16_t
u16_SW_2
:
1
;
uint16_t
u16_SW_3
:
1
;
uint16_t
u16_SW_4
:
1
;
uint16_t
u16_SW_5
:
1
;
uint16_t
u16_SW_6
:
1
;
uint16_t
u16_SW_7
:
1
;
uint16_t
u16_SW_8
:
1
;
uint16_t
u16_SW_9
:
1
;
uint16_t
u16_SW_10
:
1
;
uint16_t
:
5
;
}
KEY_flag
;
}
u8_All_Flag_t
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
094022e6
...
...
@@ -32,13 +32,14 @@ uint8_t key_flag = 0;
u8_All_Flag_t
All_Flag
=
{
0
};
uint8_t
detection_flag
=
0
;
// All_Flag.KEY.Key1 = 0;
uint8_t
Flag_SW6_Dis
[]
=
{
0x00
,
0xff
};
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
{
...
...
@@ -69,7 +70,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
0
]
=
1
;
All_Flag
.
u8flag
[
2
]
=
1
;
Display_TFT_Clear
();
Display_Chaka_Model
();
//查卡模式
...
...
@@ -134,19 +135,12 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
1
]
=
1
;
if
(
detection_flag
==
0
)
{
detection_flag
=
1
;
}
else
{
detection_flag
=
0
;
}
All_Flag
.
u8flag
[
6
]
=
1
;
Check_Steps
=
0
;
Display_TFT_Clear
();
//General_Number_Disp(Flag_SW6_Dis, 200, 20);
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
...
@@ -161,7 +155,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
2
]
=
1
;
All_Flag
.
u8flag
[
7
]
=
1
;
Check_Steps
=
0
;
Display_TFT_Clear
();
//界面学卡:
...
...
@@ -182,15 +176,12 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
3
]
=
1
;
All_Flag
.
u8flag
[
8
]
=
1
;
memset
(
canData1
,
0
,
sizeof
(
canData1
)
*
sizeof
(
canData1
[
0
]));
/*清除上次CAN诊断接收的数据*/
memset
(
canData4
,
0
,
sizeof
(
canData4
)
*
sizeof
(
canData4
[
0
]));
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Display_TFT_Clear
();
//版本号界面
//Display_Version_Info(1);
Display_Can_Receive_Data
(
5
,
50
);
...
...
@@ -242,13 +233,10 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
//All_Flag.u8flag[1] = 1;/*按键6*/
All_Flag
.
u8flag
[
4
]
=
1
;
/*按键10*/
if
(
Check_Control_Mode
==
2
)
{
// if((( All_Flag.u8flag[0] == 0) && ( All_Flag.u8flag[1] == 0)&& ( All_Flag.u8flag[2] == 0) && (( All_Flag.u8flag[3] == 0))))
if
(
detection_flag
==
1
)
All_Flag
.
u8flag
[
10
]
==
1
;
if
(((
All_Flag
.
u8flag
[
8
]
==
0
)
&&
(
All_Flag
.
u8flag
[
2
]
==
0
)
&&
(
All_Flag
.
u8flag
[
7
]
==
0
)
&&
((
All_Flag
.
u8flag
[
6
]
==
1
)))
)
{
Check_Steps
++
;
Display_flag
(
Check_Steps
);
...
...
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