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
4ac1c58c
Commit
4ac1c58c
authored
Jun 18, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:完成UID功能与贴图,后面可能改样式
parent
1ebf8d30
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
47 deletions
+109
-47
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+20
-4
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+2
-1
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+15
-2
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+4
-1
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+1
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+61
-38
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+4
-1
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+2
-0
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
4ac1c58c
...
@@ -468,9 +468,9 @@ extern uint8_t Data_786_4[8]= {0x30,0x00,0x00,0xAA,0xAA,0xAA,0xAA,0xAA};
...
@@ -468,9 +468,9 @@ extern uint8_t Data_786_4[8]= {0x30,0x00,0x00,0xAA,0xAA,0xAA,0xAA,0xAA};
extern
uint8_t
Data_786_5
[
8
]
=
{
0x02
,
0x10
,
0x02
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_5
[
8
]
=
{
0x02
,
0x10
,
0x02
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_6
[
8
]
=
{
0x02
,
0x27
,
0x05
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_6
[
8
]
=
{
0x02
,
0x27
,
0x05
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_7
[
8
]
=
{
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_7
[
8
]
=
{
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_8
[
8
]
=
{
0x10
,
0x23
,
0x2E
,
0x10
,
0x88
,
0x
31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_8
[
8
]
=
{
0x10
,
0x23
,
0x2E
,
0x10
,
0x88
,
0x
84
,
0x89
,
0x87
};
extern
uint8_t
Data_786_9
[
8
]
=
{
0x21
,
0x
31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_9
[
8
]
=
{
0x21
,
0x
84
,
0x79
,
0x87
,
0x72
,
0x77
,
0x32
,
0x75
};
extern
uint8_t
Data_786_10
[
8
]
=
{
0x22
,
0x
31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_10
[
8
]
=
{
0x22
,
0x
70
,
0x65
,
0x32
,
0x30
,
0x32
,
0x35
,
0x31
};
extern
uint8_t
Data_786_11
[
8
]
=
{
0x23
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_11
[
8
]
=
{
0x23
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_12
[
8
]
=
{
0x24
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_12
[
8
]
=
{
0x24
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_13
[
8
]
=
{
0x25
,
0x31
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_13
[
8
]
=
{
0x25
,
0x31
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
...
@@ -479,7 +479,7 @@ uint8_t UIDStep;
...
@@ -479,7 +479,7 @@ uint8_t UIDStep;
uint8_t
uidWrite
;
uint8_t
uidWrite
;
uint8_t
UIDGetstep
=
0
;
uint8_t
UIDGetstep
=
0
;
uint8_t
u8getUIDmsg
[
8
];
uint8_t
u8getUIDmsg
[
8
];
uint8_t
UIDNumber
2
[
19
]
=
{
84
,
89
,
87
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
2
,
0
,
2
,
5
,
0xFF
};
uint8_t
UIDNumber
[
17
]
=
{
84
,
89
,
87
,
84
,
79
,
87
,
72
,
77
,
2
,
75
,
70
,
65
,
2
,
0
,
2
,
5
,
0xFF
};
void
get_seed_msg
(
void
);
void
get_seed_msg
(
void
);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[])
void
Can_Set_Buff_786
(
uint8_t
CopyData
[])
{
{
...
@@ -595,6 +595,7 @@ void Can_Set_Buff_786(uint8_t CopyData [])
...
@@ -595,6 +595,7 @@ void Can_Set_Buff_786(uint8_t CopyData [])
}
}
break
;
break
;
case
5
:
case
5
:
Data_786_10
[
7
]
=
0x30
+
UIDNumber2
[
0
];
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
{
pCANMsg
->
Msg
[
i
]
=
Data_786_10
[
i
];
pCANMsg
->
Msg
[
i
]
=
Data_786_10
[
i
];
...
@@ -602,6 +603,13 @@ void Can_Set_Buff_786(uint8_t CopyData [])
...
@@ -602,6 +603,13 @@ void Can_Set_Buff_786(uint8_t CopyData [])
UIDStep
++
;
UIDStep
++
;
break
;
break
;
case
6
:
case
6
:
Data_786_11
[
1
]
=
0x30
+
UIDNumber2
[
1
];
Data_786_11
[
2
]
=
0x30
+
UIDNumber2
[
2
];
Data_786_11
[
3
]
=
0x30
+
UIDNumber2
[
3
];
Data_786_11
[
4
]
=
0x30
+
UIDNumber2
[
4
];
Data_786_11
[
5
]
=
0x30
+
UIDNumber2
[
5
];
Data_786_11
[
6
]
=
0x30
+
UIDNumber2
[
6
];
Data_786_11
[
7
]
=
0x30
+
UIDNumber2
[
7
];
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
{
pCANMsg
->
Msg
[
i
]
=
Data_786_11
[
i
];
pCANMsg
->
Msg
[
i
]
=
Data_786_11
[
i
];
...
@@ -609,6 +617,13 @@ void Can_Set_Buff_786(uint8_t CopyData [])
...
@@ -609,6 +617,13 @@ void Can_Set_Buff_786(uint8_t CopyData [])
UIDStep
++
;
UIDStep
++
;
break
;
break
;
case
7
:
case
7
:
Data_786_12
[
1
]
=
0x30
+
UIDNumber2
[
8
];
Data_786_12
[
2
]
=
0x30
+
UIDNumber2
[
9
];
Data_786_12
[
3
]
=
0x30
+
UIDNumber2
[
10
];
Data_786_12
[
4
]
=
0x30
+
UIDNumber2
[
11
];
Data_786_12
[
5
]
=
0x30
+
UIDNumber2
[
12
];
Data_786_12
[
6
]
=
0x30
+
UIDNumber2
[
13
];
Data_786_12
[
7
]
=
0x30
+
UIDNumber2
[
14
];
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
{
pCANMsg
->
Msg
[
i
]
=
Data_786_12
[
i
];
pCANMsg
->
Msg
[
i
]
=
Data_786_12
[
i
];
...
@@ -616,6 +631,7 @@ void Can_Set_Buff_786(uint8_t CopyData [])
...
@@ -616,6 +631,7 @@ void Can_Set_Buff_786(uint8_t CopyData [])
UIDStep
++
;
UIDStep
++
;
break
;
break
;
case
8
:
case
8
:
Data_786_13
[
1
]
=
0x30
+
UIDNumber2
[
15
];
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
{
pCANMsg
->
Msg
[
i
]
=
Data_786_13
[
i
];
pCANMsg
->
Msg
[
i
]
=
Data_786_13
[
i
];
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
4ac1c58c
...
@@ -260,7 +260,7 @@ typedef union
...
@@ -260,7 +260,7 @@ typedef union
}
Sig
;
}
Sig
;
}
CANMsg207Union
;
}
CANMsg207Union
;
extern
uint8_t
UIDNumber
2
[
19
];
extern
uint8_t
UIDNumber
[
17
];
void
CAN_MSG_COUNTER_PLUS
(
void
);
void
CAN_MSG_COUNTER_PLUS
(
void
);
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
);
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
);
...
@@ -284,5 +284,6 @@ extern uint8_t uidWrite;
...
@@ -284,5 +284,6 @@ extern uint8_t uidWrite;
extern
uint8_t
UIDGetstep
;
extern
uint8_t
UIDGetstep
;
extern
uint8_t
VSpeed
;
extern
uint8_t
VSpeed
;
extern
uint8_t
Student_Card
;
extern
uint8_t
Student_Card
;
extern
uint8_t
UIDStep
;
// uint8_t Student_Card_Last;
// uint8_t Student_Card_Last;
#endif
#endif
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
4ac1c58c
...
@@ -3071,6 +3071,11 @@ void Display_TFT_Clear(void)
...
@@ -3071,6 +3071,11 @@ void Display_TFT_Clear(void)
TFT_LCD_Draw_Box
(
0
,
0
,
239
,
319
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
TFT_LCD_Draw_Box
(
0
,
0
,
239
,
319
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
}
}
void
Display_SUCCESS_Clear
(
void
)
{
TFT_LCD_Draw_Box
(
0
,
200
,
239
,
225
,
TFT_LCD_FILL_FULL
,
TFT_LCD_TYPE_CLR
);
}
void
Display_Add
(
void
)
void
Display_Add
(
void
)
{
{
Display_Menu_Type
++
;
Display_Menu_Type
++
;
...
@@ -4084,8 +4089,16 @@ void Display_Version_Info(uint32_t ON_OFF)
...
@@ -4084,8 +4089,16 @@ void Display_Version_Info(uint32_t ON_OFF)
}
}
uint8_t
UUIDX
=
150
;
uint8_t
UIDNumber2
[
17
]
=
{
0
,
6
,
1
,
2
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0xFF
};
void
UIDDisplay
(
void
)
{
General_Number_Disp
(
UIDNumber
,
3
,
100
);
//固定UID数字
General_Number_Disp
(
UIDNumber2
,
3
,
125
);
//可调UID数字
uint8_t
UUIDS
[
2
]
=
{
45
,
0xFF
};
General_Number_Disp
(
UUIDS
,
UUIDX
,
140
);
//UID下——
TFT_LCD_Draw_Bmp
(
3
,
75
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y88
);
//UID写入
}
...
...
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
4ac1c58c
...
@@ -52,10 +52,12 @@ extern uint32_t odo_val_Back ;
...
@@ -52,10 +52,12 @@ extern uint32_t odo_val_Back ;
void
GeneralInfoDisp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
void
GeneralInfoDisp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
void
Display_Title_Info
(
void
);
void
Display_Title_Info
(
void
);
void
Display_Version_Info
(
uint32_t
ON_OFF
);
void
Display_Version_Info
(
uint32_t
ON_OFF
);
extern
void
UIDDisplay
();
extern
void
HW_Static_Current_Check
(
uint32_t
cmd
);
extern
void
HW_Static_Current_Check
(
uint32_t
cmd
);
void
HW_Voltage_Check
(
uint32_t
cmd
);
void
HW_Voltage_Check
(
uint32_t
cmd
);
void
Display_TFT_Clear
(
void
);
void
Display_TFT_Clear
(
void
);
extern
void
Display_SUCCESS_Clear
(
void
);
void
Display_Add
(
void
);
void
Display_Add
(
void
);
unsigned
int
Get_Display_Type
(
void
);
unsigned
int
Get_Display_Type
(
void
);
void
General_Number_Disp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
void
General_Number_Disp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
...
@@ -116,7 +118,8 @@ extern uint8_t canData1[8];
...
@@ -116,7 +118,8 @@ extern uint8_t canData1[8];
extern
uint8_t
canData2
[
14
];
extern
uint8_t
canData2
[
14
];
extern
uint8_t
canData3
[
10
];
extern
uint8_t
canData3
[
10
];
extern
uint8_t
canData4
[
8
];
extern
uint8_t
canData4
[
8
];
extern
uint8_t
UUIDX
;
extern
uint8_t
UIDNumber2
[
17
];
extern
uint8_t
can_car_return_Data
[
8
];
extern
uint8_t
can_car_return_Data
[
8
];
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#define PCodeText_Space_size 2//故障文字 英文空格的像素数
#endif
#endif
YueJin_test_bench/source/Appliciation/Key.h
View file @
4ac1c58c
...
@@ -135,6 +135,7 @@ extern uint8_t Hill_Descent_control;
...
@@ -135,6 +135,7 @@ extern uint8_t Hill_Descent_control;
extern
uint8_t
bluetooth_phone
;
extern
uint8_t
bluetooth_phone
;
extern
uint8_t
key_flag
;
extern
uint8_t
key_flag
;
extern
uint8_t
UIDMondel
;
extern
u8_All_Flag_t
All_Flag
;
extern
u8_All_Flag_t
All_Flag
;
extern
uint8_t
Diagnosis_banbenhao_flag
;
extern
uint8_t
Diagnosis_banbenhao_flag
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
4ac1c58c
...
@@ -49,7 +49,7 @@ u8_All_Flag_t All_Flag = {0};
...
@@ -49,7 +49,7 @@ u8_All_Flag_t All_Flag = {0};
uint8_t
Flag_SW6_Dis
[]
=
{
0x00
,
0xff
};
uint8_t
Flag_SW6_Dis
[]
=
{
0x00
,
0xff
};
uint8_t
UIDMondel
;
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW1
(
Key_Event_en_t
enKeyEvent
)
{
{
/*清零ODO*/
/*清零ODO*/
...
@@ -85,7 +85,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
...
@@ -85,7 +85,7 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
Student_Card_can_command
=
1
;
Student_Card_can_command
=
1
;
Display_TFT_Clear
();
Display_TFT_Clear
();
Study_Flag
=
1
;
Study_Flag
=
1
;
UIDMondel
=
0
;
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
@@ -98,33 +98,24 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
...
@@ -98,33 +98,24 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
uint8_t
UUIDX
=
197
;
uint8_t
UIDNumber
[
19
]
=
{
84
,
89
,
87
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
2
,
0
,
2
,
5
,
0xFF
};
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
// memset(&All_Flag, 0, sizeof(All_Flag));
Display_SUCCESS_Clear
();
// All_Flag.u8flag[2] = 1;
if
(
UIDMondel
==
0
)
{
// memset(canData1, 0, sizeof(canData1));/*清除上次CAN诊断接收的数据*/
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
// memset(canData4, 0, sizeof(canData4));
All_Flag
.
u8flag
[
2
]
=
1
;
Display_TFT_Clear
();
// Diagnosis_banbenhao_flag=1;/*CAN诊断起始信号*/
UIDMondel
=
1
;
}
Display_TFT_Clear
();
else
// TFT_LCD_Draw_Bmp(5, 50, ( uint8_t * )gImage_Dyy_words_1X6_Y16 ); //软件版本号
{
// TFT_LCD_Draw_Bmp(5, 100, ( uint8_t * )gImage_Dyy_words_2X6_Y46 ); //硬件版本号
UIDStep
=
0
;
// TFT_LCD_Draw_Bmp(0,200 , ( uint8_t * )gImage_Dyy_words_5X6_Y137 ); //静态电流
uidWrite
=
1
;
// TFT_LCD_Draw_Bmp(0, 220, ( uint8_t * )gImage_titlex0_y0);
UIDGetstep
=
0
;
// General_Number_Disp(banbenhao, 90, 230);/*显示检测台版本号*/
}
// Display_Can_Receive_Data(5,50);
General_Number_Disp
(
UIDNumber
,
85
,
120
);
//固定UID数字
General_Number_Disp
(
UIDNumber2
,
70
,
146
);
//可调UID数字
uint8_t
UUIDS
[
2
]
=
{
45
,
0xFF
};
General_Number_Disp
(
UUIDS
,
UUIDX
,
160
);
//UID下——
TFT_LCD_Draw_Bmp
(
3
,
120
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y88
);
//UID写入
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -136,12 +127,23 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
...
@@ -136,12 +127,23 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
uint8_t
change
=
15
;
void
Key_Operation_SW4
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW4
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
uidWrite
=
1
;
if
(
UIDMondel
)
UIDGetstep
=
0
;
{
Display_TFT_Clear
();
if
(
UIDNumber2
[
change
]
<
9
)
{
UIDNumber2
[
change
]
++
;
}
else
{
UIDNumber2
[
change
]
=
0
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -159,7 +161,20 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
...
@@ -159,7 +161,20 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
if
(
UIDMondel
)
{
Display_TFT_Clear
();
if
(
change
>
0
)
{
change
--
;
UUIDX
-=
10
;
}
else
{
change
=
15
;
UUIDX
=
150
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -172,15 +187,20 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
...
@@ -172,15 +187,20 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
if
(
UIDMondel
)
All_Flag
.
u8flag
[
6
]
=
1
;
{
Display_TFT_Clear
();
Check_Steps
=
0
;
if
(
change
>
0
)
Study_Flag
=
0
;
{
change
--
;
Display_TFT_Clear
();
UUIDX
-=
10
;
//General_Number_Disp(Flag_SW6_Dis, 200, 20);
}
else
{
change
=
15
;
UUIDX
=
150
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
@@ -201,6 +221,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
...
@@ -201,6 +221,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
Query_Card_can_command
=
1
;
Query_Card_can_command
=
1
;
Require_card_flag
=
1
;
Require_card_flag
=
1
;
Display_TFT_Clear
();
Display_TFT_Clear
();
UIDMondel
=
0
;
//Display_Chaka_Model();//查卡模式:
//Display_Chaka_Model();//查卡模式:
}
}
...
@@ -227,6 +248,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
...
@@ -227,6 +248,7 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
memset
(
canData2
,
0
,
sizeof
(
canData2
));
memset
(
canData2
,
0
,
sizeof
(
canData2
));
memset
(
canData3
,
0
,
sizeof
(
canData3
));
memset
(
canData3
,
0
,
sizeof
(
canData3
));
Study_Flag
=
0
;
Study_Flag
=
0
;
UIDMondel
=
0
;
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Display_TFT_Clear
();
Display_TFT_Clear
();
...
@@ -255,6 +277,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
...
@@ -255,6 +277,7 @@ void Key_Operation_SW9(Key_Event_en_t enKeyEvent)
/*清零ODO*/
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
UIDMondel
=
0
;
if
(
Check_Control_Mode
==
1
)
if
(
Check_Control_Mode
==
1
)
{
{
Check_Control_Mode
=
2
;
Check_Control_Mode
=
2
;
...
@@ -300,7 +323,7 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
...
@@ -300,7 +323,7 @@ void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
}
}
}
}
UIDMondel
=
0
;
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
4ac1c58c
...
@@ -143,7 +143,10 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
...
@@ -143,7 +143,10 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
Display_Can_Receive_Data
(
5
,
50
);
Display_Can_Receive_Data
(
5
,
50
);
Display_interface_learning_card
(
0
,
50
);
Display_interface_learning_card
(
0
,
50
);
Display_Chaka_Model
();
//查卡模式
Display_Chaka_Model
();
//查卡模式
if
(
UIDMondel
)
{
UIDDisplay
();
}
}
}
/*=================================================================*/
/*=================================================================*/
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
4ac1c58c
...
@@ -797,6 +797,7 @@ void RSCAN0_CH3_Receive(CAN_Frame_st_t *pstCANFrame)
...
@@ -797,6 +797,7 @@ void RSCAN0_CH3_Receive(CAN_Frame_st_t *pstCANFrame)
g_stRSCAN0Config
.
stRSCANCh3
.
pfnRSCANReadMsgCallBack
(
pstCANFrame
->
u32CANID
,
pstCANFrame
->
u8CANLEN
,
pstCANFrame
->
unCANData
.
u8CANData
);
g_stRSCAN0Config
.
stRSCANCh3
.
pfnRSCANReadMsgCallBack
(
pstCANFrame
->
u32CANID
,
pstCANFrame
->
u8CANLEN
,
pstCANFrame
->
unCANData
.
u8CANData
);
}
}
}
}
uint8_t
writesuccess
[
8
]
=
{
83
,
85
,
67
,
67
,
69
,
83
,
83
,
0xFF
};
uint8_t
u8get786msg
[
8
];
uint8_t
u8get786msg
[
8
];
uint8_t
seednum
[
4
]
=
{
0
};
uint8_t
seednum
[
4
]
=
{
0
};
uint8_t
seedresult
[
4
]
=
{
0
};
uint8_t
seedresult
[
4
]
=
{
0
};
...
@@ -976,6 +977,7 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
...
@@ -976,6 +977,7 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
{
{
UIDGetstep
=
6
;
UIDGetstep
=
6
;
uidWrite
=
0
;
uidWrite
=
0
;
General_Number_Disp
(
writesuccess
,
3
,
200
);
//写入成功
}
}
}
}
}
}
...
...
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