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
a265a6b9
Commit
a265a6b9
authored
Jun 16, 2025
by
huangguoqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修复模式切换间显示bug
parent
ec5b69ef
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
75 deletions
+75
-75
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+21
-0
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+1
-2
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+43
-43
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+8
-5
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+2
-25
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
a265a6b9
...
@@ -556,3 +556,24 @@ void Can_Set_Buff_207(uint8_t CopyData [])
...
@@ -556,3 +556,24 @@ void Can_Set_Buff_207(uint8_t CopyData [])
;
;
}
}
}
}
void
CAN_Msg_Steps_100ms
()
{
if
(
Student_Card_can_command
==
1
)
{
Student_Card
++
;
}
else
{
Student_Card
=
0
;
}
if
(
Query_Card_can_command
==
1
)
{
Query_Card
++
;
}
else
{
Query_Card
=
0
;
}
}
\ No newline at end of file
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
a265a6b9
...
@@ -278,8 +278,7 @@ void Can_Set_Buff_284(uint8_t CopyData []);
...
@@ -278,8 +278,7 @@ void Can_Set_Buff_284(uint8_t CopyData []);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_207
(
uint8_t
CopyData
[]);
void
Can_Set_Buff_207
(
uint8_t
CopyData
[]);
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return1
();
void
CAN_Msg_Steps_100ms
();
extern
void
Get_CAN_CH4_ID_750_Diagnosis_return2
();
extern
uint8_t
VSpeed
;
extern
uint8_t
VSpeed
;
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
a265a6b9
...
@@ -4502,52 +4502,55 @@ extern uint8_t test2[] = {0x01,0x02,0x03,0x04,0xE1,0xF2,0xA3,0xB4};
...
@@ -4502,52 +4502,55 @@ extern uint8_t test2[] = {0x01,0x02,0x03,0x04,0xE1,0xF2,0xA3,0xB4};
void
Display_Chaka_Model
(
void
)
void
Display_Chaka_Model
(
void
)
{
{
if
(
All_Flag
.
u8flag
[
7
]
==
1
)
if
(
Require_card_flag
==
1
)
{
{
Display_Num
(
0
,
0
,
can_car_return_Data
[
6
],
1
);
if
(
Require_card_flag
==
1
)
Display_buffer_ID
(
20
,
150
);
Display_buffer_ID
(
20
,
170
);
Display_buffer_ID
(
20
,
190
);
Display_buffer_ID
(
20
,
210
);
Display_buffer_ID
(
20
,
230
);
Display_buffer_ID
(
20
,
250
);
if
(
can_car_return_Data
[
1
]
==
1
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
150
);
}
else
if
(
can_car_return_Data
[
1
]
==
2
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
170
);
}
else
if
(
can_car_return_Data
[
1
]
==
3
)
{
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
190
);
Display_Num
(
0
,
0
,
can_car_return_Data
[
6
],
1
);
}
else
if
(
can_car_return_Data
[
1
]
==
4
)
Display_buffer_ID
(
20
,
150
);
{
Display_buffer_ID
(
20
,
170
);
Display_buffer_Data
(
can_car_return_Data
,
60
,
210
);
Display_buffer_ID
(
20
,
190
);
}
Display_buffer_ID
(
20
,
210
);
else
if
(
can_car_return_Data
[
1
]
==
5
)
Display_buffer_ID
(
20
,
230
);
{
Display_buffer_ID
(
20
,
250
);
Display_buffer_Data
(
can_car_return_Data
,
60
,
230
);
if
(
can_car_return_Data
[
1
]
==
1
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
150
);
}
else
if
(
can_car_return_Data
[
1
]
==
2
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
170
);
}
else
if
(
can_car_return_Data
[
1
]
==
3
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
190
);
}
else
if
(
can_car_return_Data
[
1
]
==
4
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
210
);
}
else
if
(
can_car_return_Data
[
1
]
==
5
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
230
);
}
else
if
(
can_car_return_Data
[
1
]
==
6
)
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
250
);
Require_card_flag
=
0
;
}
}
}
else
if
(
can_car_return_Data
[
1
]
==
6
)
if
(
can_car_return_Data
[
1
]
==
6
)
{
{
Display_buffer_Data
(
can_car_return_Data
,
60
,
250
);
Require_card_flag
=
0
;
Require_card_flag
=
0
;
memset
(
can_car_return_Data
,
0
,
sizeof
(
can_car_return_Data
));
}
}
}
}
if
(
can_car_return_Data
[
1
]
==
6
)
{
Require_card_flag
=
0
;
memset
(
can_car_return_Data
,
0
,
sizeof
(
can_car_return_Data
));
}
}
}
void
Display_buffer_ID
(
uint16_t
X
,
uint8_t
Y
)
void
Display_buffer_ID
(
uint16_t
X
,
uint8_t
Y
)
{
{
...
@@ -4743,17 +4746,14 @@ const uint16_t CurrentDigitNum15PosX_2[] = {108,98};
...
@@ -4743,17 +4746,14 @@ const uint16_t CurrentDigitNum15PosX_2[] = {108,98};
uint8_t
banbenhao
[
5
]
=
{
0x56
,
0x31
,
0x30
,
0x32
,
0xff
};
uint8_t
banbenhao
[
5
]
=
{
0x56
,
0x31
,
0x30
,
0x32
,
0xff
};
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
)
void
Display_Can_Receive_Data
(
uint16_t
X
,
uint8_t
Y
)
{
{
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
8
]
==
1
)
if
(
canData3
[
9
]
==
0XFF
&&
canData2
[
13
]
==
0XFF
&&
All_Flag
.
u8flag
[
8
]
==
1
)
{
{
General_Number_Disp
(
canData2
,
X
+
70
,
Y
);
General_Number_Disp
(
canData2
,
X
+
70
,
Y
);
General_Number_Disp
(
canData3
,
X
+
70
,
Y
+
50
);
General_Number_Disp
(
canData3
,
X
+
70
,
Y
+
50
);
GUI_General_Digit_Display
(
text5
[
0
],
Num_15
,
1
,
0
,
CurrentDigitNum15PosX_1
,
200
);
GUI_General_Digit_Display
(
text5
[
0
],
Num_15
,
1
,
0
,
CurrentDigitNum15PosX_1
,
200
);
TFT_LCD_Draw_Bmp
(
85
,
195
,
(
uint8_t
*
)
FONT_TABLE
[
37
]
);
TFT_LCD_Draw_Bmp
(
85
,
195
,
(
uint8_t
*
)
FONT_TABLE
[
37
]
);
/*.*/
GUI_General_Digit_Display
(
text5
[
1
],
Num_15
,
2
,
0
,
CurrentDigitNum15PosX_2
,
200
);
GUI_General_Digit_Display
(
text5
[
1
],
Num_15
,
2
,
0
,
CurrentDigitNum15PosX_2
,
200
);
}
}
}
}
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
a265a6b9
...
@@ -151,7 +151,7 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
...
@@ -151,7 +151,7 @@ void Key_Operation_SW6(Key_Event_en_t enKeyEvent)
All_Flag
.
u8flag
[
6
]
=
1
;
All_Flag
.
u8flag
[
6
]
=
1
;
Check_Steps
=
0
;
Check_Steps
=
0
;
Study_Flag
=
0
;
Display_TFT_Clear
();
Display_TFT_Clear
();
//General_Number_Disp(Flag_SW6_Dis, 200, 20);
//General_Number_Disp(Flag_SW6_Dis, 200, 20);
...
@@ -172,6 +172,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
...
@@ -172,6 +172,7 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
7
]
=
1
;
All_Flag
.
u8flag
[
7
]
=
1
;
Check_Steps
=
0
;
Check_Steps
=
0
;
Study_Flag
=
0
;
Query_Card_can_command
=
1
;
Query_Card_can_command
=
1
;
Require_card_flag
=
1
;
Require_card_flag
=
1
;
//Display_TFT_Clear();
//Display_TFT_Clear();
...
@@ -198,16 +199,18 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
...
@@ -198,16 +199,18 @@ void Key_Operation_SW8(Key_Event_en_t enKeyEvent)
memset
(
canData1
,
0
,
sizeof
(
canData1
));
/*清除上次CAN诊断接收的数据*/
memset
(
canData1
,
0
,
sizeof
(
canData1
));
/*清除上次CAN诊断接收的数据*/
memset
(
canData4
,
0
,
sizeof
(
canData4
));
memset
(
canData4
,
0
,
sizeof
(
canData4
));
memset
(
canData2
,
0
,
sizeof
(
canData2
));
memset
(
canData3
,
0
,
sizeof
(
canData3
));
Study_Flag
=
0
;
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Diagnosis_banbenhao_flag
=
1
;
/*CAN诊断起始信号*/
Display_TFT_Clear
();
Display_TFT_Clear
();
TFT_LCD_Draw_Bmp
(
5
,
50
,
(
uint8_t
*
)
gImage_Dyy_words_1X6_Y16
);
//软件版本号
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
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
5
,
100
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
0
,
200
,
(
uint8_t
*
)
gImage_Dyy_words_5X6_Y137
);
//静态电流
TFT_LCD_Draw_Bmp
(
5
,
200
,
(
uint8_t
*
)
gImage_Dyy_words_5X6_Y137
);
//静态电流
TFT_LCD_Draw_Bmp
(
0
,
220
,
(
uint8_t
*
)
gImage_titlex0_y0
);
TFT_LCD_Draw_Bmp
(
0
,
220
,
(
uint8_t
*
)
gImage_titlex0_y0
);
General_Number_Disp
(
banbenhao
,
90
,
230
);
/*显示检测台版本号*/
General_Number_Disp
(
banbenhao
,
90
,
230
);
/*显示检测台版本号*/
Display_Can_Receive_Data
(
5
,
50
);
//
Display_Can_Receive_Data(5,50);
}
}
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
a265a6b9
...
@@ -139,31 +139,8 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
...
@@ -139,31 +139,8 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
// POWER_CTRL_KL30_B = 1;
// POWER_CTRL_KL30_B = 1;
//POWER_CTRL_KL15 = 1;
//POWER_CTRL_KL15 = 1;
if
(
Student_Card_can_command
==
1
)
CAN_Msg_Steps_100ms
();
{
Display_Can_Receive_Data
(
5
,
50
);
Student_Card
++
;
}
else
{
Student_Card
=
0
;
}
// if(Student_Card>=6)
// {
// Student_Card=0;
// }
if
(
Query_Card_can_command
==
1
)
{
Query_Card
++
;
}
else
{
Query_Card
=
0
;
}
Display_interface_learning_card
(
0
,
50
);
Display_interface_learning_card
(
0
,
50
);
Display_Chaka_Model
();
//查卡模式
Display_Chaka_Model
();
//查卡模式
...
...
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