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
7c0f8b94
Commit
7c0f8b94
authored
Jul 15, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加一键读取版本号功能,增加外部版本号,修改内部版本号
parent
d8ef9815
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
185 additions
and
203 deletions
+185
-203
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+104
-130
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+6
-2
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+0
-6
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+41
-10
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+7
-17
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+27
-38
No files found.
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
7c0f8b94
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
7c0f8b94
...
...
@@ -55,6 +55,9 @@ void change_UDS_DID(void);
void
resetchangeUDSfuc
(
void
);
void
resetpowerfuel
(
void
);
void
UIDWrite
(
void
);
extern
void
Get_SW_msg
(
void
);
extern
void
Get_SWIN_msg
(
void
);
extern
void
Get_HW_msg
(
void
);
extern
uint8_t
UIDcode1
[
33
];
extern
uint8_t
UIDcode2
[
33
];
extern
uint8_t
UIDNumber
[
19
];
...
...
@@ -62,11 +65,12 @@ extern uint8_t change;
extern
uint8_t
localNum
;
extern
uint8_t
zhenduanstep
;
extern
uint8_t
UIDStep
;
extern
uint8_t
readstopflag
;
extern
uint8_t
UIDStep
;
extern
uint8_t
begin714
;
extern
uint8_t
UIDresult
;
extern
uint8_t
writebeing
;
extern
uint8_t
u8get714msg
[
8
];
extern
uint8_t
UIDdelay
;
extern
uint8_t
SWINtestresult
;
extern
uint8_t
SWtestresult
;
extern
uint8_t
HWtestresult
;
#endif
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
7c0f8b94
...
...
@@ -557,7 +557,6 @@ void Read_IPK_Session_Type(void)//请求仪表发送 软硬件版本号 等数
}
}
uint8_t
LED_Waring
=
0
;
extern
uint8_t
resetflag
;
void
Function_Check_Ctrl
(
uint32_t
cmd
)
{
uint8_t
p
[
20
];
...
...
@@ -582,11 +581,6 @@ void Function_Check_Ctrl(uint32_t cmd)
{
case
0
:
{
if
(
resetflag
==
0
)
{
// POWER_CTRL_KL30 = 1u; //B+
// POWER_CTRL_KL15 = 1u; //KL15
}
/*负控*/
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
7c0f8b94
...
...
@@ -105,6 +105,42 @@ const unsigned char gImage_Dyy_words_13X0_Y0[]={/*Byte Size122*/
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X40U
,
0X70U
,
0X3eU
,
0X1fU
,
0X07U
,
0X5eU
,
0X5cU
,
0X47U
,
0X7fU
,
0X7fU
,
0X7bU
,
0X7fU
,
0X6fU
,
0X67U
,
0X60U
,
0X60U
,
0X7fU
,
0X7fU
,
0X3fU
,
0X3fU
,
0X17U
,
0X1fU
,
0XffU
,
0X7fU
,
0X25U
,
0X25U
,
0X7fU
,
0X7fU
,
0X07U
,
0X03U
,};
const
unsigned
char
gImage_pic_01X0_Y01
[]
=
{
/*Byte Size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
,
0X00U
,
0X7eU
,
0X22U
,
0X22U
,
0X22U
,
0X22U
,
0X22U
,
0X7eU
,
0X00U
,
0X7fU
,
0X00U
,
0X10U
,
0X11U
,
0X0eU
,
0X00U
,
0X08U
,
0X08U
,
0X08U
,
0X08U
,
0X7fU
,
0X04U
,
0X04U
,
0X44U
,
0X20U
,
0X10U
,
0X0eU
,
0X01U
,
0X06U
,
0X18U
,
0X20U
,
0X40U
,
0X00U
,
0X00U
,
0X00U
,
0XffU
,
0X00U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0XffU
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X00U
,
0X70U
,
0X0fU
,
0X01U
,
0X01U
,
0X7fU
,
0X00U
,
0X30U
,
0X0fU
,
0X40U
,
0X21U
,
0X16U
,
0X18U
,
0X26U
,
0X41U
,
0X40U
,
0X10U
,
0X08U
,
0X04U
,
0X02U
,
0X09U
,
0X08U
,
0X08U
,
0X7fU
,
0X08U
,
0X08U
,
0X09U
,
0X02U
,
0X04U
,
0X08U
,
0X10U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X03U
,
0X02U
,
0X02U
,
0X22U
,
0X42U
,
0X42U
,
0X42U
,
0X3aU
,
0X06U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X20U
,
0X00U
,
0X00U
,
};
const
unsigned
char
gImage_pic_02X0_Y02
[]
=
{
/*Byte Size242*/
120U
,
16U
,
0X00U
,
0X00U
,
0Xf8U
,
0X08U
,
0X08U
,
0X08U
,
0X08U
,
0X08U
,
0Xc8U
,
0X7fU
,
0X88U
,
0X08U
,
0X08U
,
0X08U
,
0X08U
,
0Xf8U
,
0X00U
,
0X00U
,
0X88U
,
0X88U
,
0Xa8U
,
0X89U
,
0X8eU
,
0Xc8U
,
0Xa8U
,
0X88U
,
0X00U
,
0XfeU
,
0X02U
,
0Xc2U
,
0X3aU
,
0X06U
,
0X00U
,
0X08U
,
0Xc8U
,
0Xb8U
,
0X8eU
,
0Xe8U
,
0X88U
,
0X88U
,
0Xa8U
,
0X20U
,
0X1eU
,
0X09U
,
0Xe8U
,
0X08U
,
0X08U
,
0X68U
,
0X18U
,
0X00U
,
0Xc0U
,
0X20U
,
0Xf0U
,
0X0eU
,
0X81U
,
0X60U
,
0X1eU
,
0X10U
,
0X10U
,
0XfeU
,
0X10U
,
0X10U
,
0X10U
,
0X10U
,
0X00U
,
0X00U
,
0X00U
,
0XfeU
,
0X20U
,
0X3fU
,
0X20U
,
0X20U
,
0X00U
,
0XfeU
,
0X22U
,
0Xe2U
,
0X22U
,
0X22U
,
0X21U
,
0Xe1U
,
0X01U
,
0X10U
,
0X10U
,
0X10U
,
0X10U
,
0X90U
,
0X50U
,
0X30U
,
0XffU
,
0X30U
,
0X50U
,
0X90U
,
0X10U
,
0X10U
,
0X10U
,
0X10U
,
0X00U
,
0X00U
,
0X40U
,
0X40U
,
0X5eU
,
0X52U
,
0Xd2U
,
0X52U
,
0X52U
,
0X52U
,
0X52U
,
0X52U
,
0X52U
,
0X5eU
,
0X40U
,
0X40U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X40U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X7fU
,
0X00U
,
0X04U
,
0X04U
,
0X02U
,
0X01U
,
0X00U
,
0X00U
,
0X00U
,
0X01U
,
0X42U
,
0X44U
,
0X40U
,
0X3fU
,
0X00U
,
0X00U
,
0X00U
,
0X7eU
,
0X22U
,
0X22U
,
0X22U
,
0X22U
,
0X22U
,
0X7eU
,
0X00U
,
0X7fU
,
0X00U
,
0X10U
,
0X11U
,
0X0eU
,
0X00U
,
0X08U
,
0X08U
,
0X08U
,
0X08U
,
0X7fU
,
0X04U
,
0X04U
,
0X44U
,
0X20U
,
0X10U
,
0X0eU
,
0X01U
,
0X06U
,
0X18U
,
0X20U
,
0X40U
,
0X00U
,
0X00U
,
0X00U
,
0XffU
,
0X00U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0XffU
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X02U
,
0X00U
,
0X70U
,
0X0fU
,
0X01U
,
0X01U
,
0X7fU
,
0X00U
,
0X30U
,
0X0fU
,
0X40U
,
0X21U
,
0X16U
,
0X18U
,
0X26U
,
0X41U
,
0X40U
,
0X10U
,
0X08U
,
0X04U
,
0X02U
,
0X09U
,
0X08U
,
0X08U
,
0X7fU
,
0X08U
,
0X08U
,
0X09U
,
0X02U
,
0X04U
,
0X08U
,
0X10U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X03U
,
0X02U
,
0X02U
,
0X22U
,
0X42U
,
0X42U
,
0X42U
,
0X3aU
,
0X06U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X20U
,
0X00U
,
0X00U
,
};
//硬件版本:
const
unsigned
char
gImage_Dyy_words_2X6_Y46
[]
=
{
/*Byte Size154*/
76U
,
16U
,
...
...
@@ -4190,7 +4226,6 @@ uint8_t nowbanbenhaohoumian = 22;
const
uint16_t
banebenhao1
[]
=
{
35
,
25
};
const
uint16_t
banebenhao2
[]
=
{
190
,
180
};
const
uint16_t
banebenhao3
[]
=
{
105
,
95
};
extern
uint8_t
SWtestresult
;
extern
uint8_t
HWtestresult
;
extern
uint8_t
PNtestresult
;
extern
uint8_t
ruanjianbanbenhao
[
8
];
...
...
@@ -4227,17 +4262,13 @@ void Display_Version_Info(uint32_t ON_OFF)
loc_Type_back
=
loc_Type
;
}
TFT_LCD_Draw_Bmp
(
3
,
50
,
(
uint8_t
*
)
gImage_Dyy_words_1X6_Y16
);
//软件版本号
TFT_LCD_Draw_Bmp
(
3
,
50
,
(
uint8_t
*
)
gImage_pic_01X0_Y01
);
//软件外部版本号
TFT_LCD_Draw_Bmp
(
3
,
75
,
(
uint8_t
*
)
gImage_pic_02X0_Y02
);
//软件内部版本号
const
uint16_t
Currenttest
[]
=
{
180
,
170
};
if
(
SWtestresult
==
1
&&
HWtestresult
==
1
&&
PNtestresult
==
1
)
{
// General_Number_Disp(ruanjianbanbenhao, 105, 25);
// General_Number_Disp(yingjianbanbenhao, 105, 50);
// General_Number_Disp(lingjianhao, 15, 100);
}
TFT_LCD_Draw_Bmp
(
3
,
75
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
3
,
100
,
(
uint8_t
*
)
gImage_Dyy_words_2X6_Y46
);
//硬件版本号
TFT_LCD_Draw_Bmp
(
3
,
25
,
(
uint8_t
*
)
gImage_JCT_01X0_Y0
);
//检测台版本号
TFT_LCD_Draw_Bmp
(
3
,
120
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y75
);
//写入UID
TFT_LCD_Draw_Bmp
(
3
,
225
,
(
uint8_t
*
)
gImage_JCT_08X0_Y0
);
//读取UID
...
...
@@ -4264,7 +4295,7 @@ void Display_Version_Info(uint32_t ON_OFF)
// TFT_LCD_Draw_Bmp(3, 160, ( uint8_t * )gImage_Alarm_12_WordX6_Y165); //24脚输出占空比
// TFT_LCD_Draw_Bmp(210, 160, ( uint8_t * )gImage_Alarm_13_ImageX222_Y166); //%
// TFT_LCD_Draw_Bmp(3, 290, ( uint8_t * )gImage_gImage_checkVX6_Y165 ); //检测台版本号
uint8_t
mbuff
[
10
]
=
{
2
,
0
,
2
,
5
,
97
,
0
,
5
,
2
,
8
,
0xff
};
uint8_t
mbuff
[
10
]
=
{
2
,
0
,
2
,
5
,
97
,
0
,
7
,
1
,
5
,
0xff
};
General_Number_Disp
(
mbuff
,
115
,
25
);
//检测台版本号
General_Number_Disp
(
UIDNumber
,
85
,
120
);
//固定UID数字
General_Number_Disp
(
UIDNumber2
,
70
,
146
);
//可调UID数字
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
7c0f8b94
...
...
@@ -3,7 +3,6 @@
#include "Display_Info.h"
#include "Check_Ctrl.h"
#include "CAN_APP.h"
extern
uint8_t
resetflag
;
void
Key_Operation_SW5
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
...
...
@@ -105,12 +104,13 @@ void Key_Operation_SW7(Key_Event_en_t enKeyEvent)
{
}
}
void
Key_Operation_SW
8
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW
3
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
begin714
=
0
;
UIDresult
=
0
;
writebeing
=
1
;
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -152,17 +152,7 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
writeflag
=
1
;
zhenduanstep
=
11
;
UIDStep
=
0
;
writebeing
=
1
;
// if(UIDNumber2[change] < 9)
// {
// UIDNumber2[change]++;
// }
// else
// {
// UIDNumber2[change] = 0;
// }
Display_TFT_Clear_UID2
();
}
else
if
((
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
&&
(
MENU_CHECK_STEP
==
10
))
...
...
@@ -212,12 +202,12 @@ Key_Real_Status_en_t Key_Real_sw7(void)
}
return
enKeyRealStatus
;
}
Key_Real_Status_en_t
Key_Real_sw
8
(
void
)
Key_Real_Status_en_t
Key_Real_sw
3
(
void
)
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
if
(
SW
8
==
0U
)
if
(
SW
3
==
0U
)
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
}
...
...
@@ -251,7 +241,7 @@ const Key_Attribute_st_t stKeyAttribute [ KEY_NUM_MAX ] = {
{
KEY_TYPE_LINE
,
Key_Real_sw5
,
Key_Operation_SW5
},
//SW5
{
KEY_TYPE_LINE
,
Key_Real_sw4
,
Key_Operation_SW4
},
//SW4
{
KEY_TYPE_LINE
,
Key_Real_sw7
,
Key_Operation_SW7
},
{
KEY_TYPE_LINE
,
Key_Real_sw
8
,
Key_Operation_SW8
},
{
KEY_TYPE_LINE
,
Key_Real_sw
3
,
Key_Operation_SW3
},
{
KEY_TYPE_LINE
,
Key_Real_sw2
,
Key_Operation_SW2
},
//SW2-
{
KEY_TYPE_LINE
,
Key_Real_sw1
,
Key_Operation_SW1
},
//SW1+
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
7c0f8b94
...
...
@@ -33,6 +33,18 @@ void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void)
TFT_LCD_Display_Update_Service
(
);
Get_PN_msg
();
// Get_UID_msg();
if
(
SWINtestresult
==
1
)
{
Get_SWIN_msg
();
}
if
(
SWtestresult
==
1
)
{
Get_SW_msg
();
}
if
(
HWtestresult
==
1
)
{
Get_HW_msg
();
}
}
/*============================================================================*/
...
...
@@ -59,12 +71,8 @@ void Sys_Run_Mode_5ms_Tasks_Group(void)
------------------------------------------------------------------------------*/
uint32_t
fakedelay
=
0
;
uint32_t
send0x714time
=
0
;
uint8_t
cycleflag
=
0
;
uint8_t
getmsgfinish
=
0
;
extern
uint8_t
SWtestresult
;
extern
uint8_t
HWtestresult
;
extern
uint8_t
PNtestresult
;
extern
uint8_t
resetflag
;
extern
uint8_t
fuelreset1
;
extern
uint8_t
fuelreset2
;
extern
uint8_t
fuelreset3
;
...
...
@@ -109,10 +117,8 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
else
{
change_UDS_DID
();
// cycleflag = 1;
}
if
(
resetflag
==
0
)
{
if
(
MENU_CHECK_STEP
==
0
)
{
if
(
send0x714time
<
4
)
...
...
@@ -127,7 +133,6 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
send0x714time
=
0
;
}
}
}
else
{
...
...
@@ -135,27 +140,11 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
}
can_submit
();
}
if
(
writeflag
==
1
)
{
UIDWrite
();
}
// if(getmsgfinish == 0)
// {
// if(cycleflag == 0)
// {
// }
// else
// {
// send_0x714_fuc();
// // cycleflag = 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