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
1b87c8ef
Commit
1b87c8ef
authored
Oct 07, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加读写UUID功能
parent
945a3bb5
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
326 additions
and
216 deletions
+326
-216
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+6
-0
Barcode_Scanner.h
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
+1
-0
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+237
-147
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+6
-2
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+58
-49
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+18
-18
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
1b87c8ef
...
...
@@ -49,6 +49,7 @@ uint8_t get_num_buf[34];
uint8_t
comparestart
;
uint8_t
blename
[
5
];
uint8_t
btmac
[
6
];
uint8_t
uidread
[
33
];
uint8_t
firstpowerflag
=
0
;
uint16_t
lightnumber
=
0
;
uint8_t
writeflag
=
0
;
...
...
@@ -140,6 +141,11 @@ void datacheck(void)
recvflag111
=
1
;
RS485_TX_finish
=
0
;
// General_Number_Disp(blename, 3, 165);
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
uidread
[
i
]
=
BarCode
[
i
+
17
];
}
uidread
[
32
]
=
0xFF
;
}
break
;
case
0x4F
:
...
...
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
View file @
1b87c8ef
...
...
@@ -38,5 +38,6 @@ extern uint8_t recvflag111;
extern
uint8_t
firstpowerflag
;
extern
uint16_t
lightnumber
;
extern
uint8_t
btmac
[
6
];
extern
uint8_t
uidread
[
33
];
extern
uint8_t
writeflag
;
#endif
\ No newline at end of file
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
1b87c8ef
This diff is collapsed.
Click to expand it.
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
1b87c8ef
...
...
@@ -49,6 +49,9 @@ enum DisplayFont
extern
unsigned
int
Display_Menu_Type
;
extern
uint32_t
odo_val_Back
;
extern
uint8_t
uuidmodel
;
extern
uint8_t
UUIDX
;
extern
uint8_t
change
;
void
GeneralInfoDisp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
void
Display_Title_Info
(
void
);
void
Display_Version_Info
(
uint32_t
ON_OFF
);
...
...
@@ -56,6 +59,7 @@ void Display_Version_Info(uint32_t ON_OFF);
extern
void
HW_Static_Current_Check
(
uint32_t
cmd
);
void
HW_Voltage_Check
(
uint32_t
cmd
);
void
Display_TFT_Clear
(
void
);
void
Display_TFT_Clear_UID
(
void
);
void
Display_Add
(
void
);
unsigned
int
Get_Display_Type
(
void
);
void
General_Number_Disp
(
unsigned
char
*
p
,
unsigned
short
x
,
unsigned
short
y
);
...
...
@@ -77,7 +81,7 @@ void Buzzer_Start(void);
void
Buzzer_Stop
(
void
);
extern
void
Buzzer_Init
(
void
);
extern
void
Buzzer_Warning
(
void
);
extern
void
UUID_Write
(
void
);
void
GUI_General_Digit_Display
(
uint32_t
Digit
,
const
uint8_t
*
Font
[],
uint8_t
Len
,
uint8_t
Blank
,
const
uint16_t
*
px
,
uint16_t
y
);
...
...
@@ -90,7 +94,7 @@ extern const uint8_t *Num_09[];
extern
const
uint8_t
*
Num_10_03
[];
extern
const
uint8_t
*
Num_13
[];
extern
const
uint8_t
*
Num_30
[];
extern
uint8_t
uuidnumber2
[
21
];
extern
const
uint8_t
*
Letter_Num_11
[];
extern
uint32_t
loc_Current_0
;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
1b87c8ef
...
...
@@ -5,26 +5,32 @@
#include "Barcode_Scanner.h"
#include "Task.h"
#include "string.h"
#define R485_CLEAR_START 11 // 起始索引
#define R485_CLEAR_LEN 33 // 清零长度(元素个数)
void
Key_Operation_SW5
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// Display_Add( );
// Display_TFT_Clear( );
// }
if
(
firstpowerflag
==
2
)
if
(
uuidmodel
==
0
)
{
MENU_CHECK_STEP_ADD
(
);
if
(
firstpowerflag
==
2
)
{
MENU_CHECK_STEP_ADD
(
);
}
}
else
{
if
(
uuidnumber2
[
change
]
<
0x39
)
{
uuidnumber2
[
change
]
++
;
}
else
{
uuidnumber2
[
change
]
=
0x30
;
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -41,40 +47,35 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
}
}
}
// else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
// {
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// Display_Add( );
// Display_TFT_Clear( );
// }
// }
else
{
}
}
void
Key_Operation_SW4
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
// if ( (LED_Waring == 1) || (UDS_Warning_Voltage ==1))
// {
// ;
// }
// else
// {
// Display_Sub( );
// Display_TFT_Clear( );
// }
if
(
firstpowerflag
==
2
)
if
(
uuidmodel
==
0
)
{
MENU_CHECK_STEP_SUB
();
if
(
firstpowerflag
==
2
)
{
MENU_CHECK_STEP_SUB
();
}
}
else
{
Display_TFT_Clear_UID
();
if
(
UUIDX
>
0
)
{
UUIDX
-=
10
;
change
--
;
}
else
{
change
=
19
;
UUIDX
=
190
;
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
...
...
@@ -183,6 +184,17 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
if
(
firstpowerflag
==
2
)
{
if
(
Auto_ONOFF
!=
0
)
{
Auto_ONOFF
=
0
;
}
else
{
Auto_ONOFF
=
1
;
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
...
...
@@ -233,21 +245,18 @@ void Key_Operation_SW1(Key_Event_en_t enKeyEvent)
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
if
(
firstpowerflag
==
2
)
if
(
uuidmodel
==
1
)
{
if
(
Auto_ONOFF
!=
0
)
{
Auto_ONOFF
=
0
;
}
else
{
Auto_ONOFF
=
1
;
}
UUID_Write
();
}
uuidmodel
=
1
;
Display_TFT_Clear
();
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
uuidmodel
=
0
;
Display_TFT_Clear
();
memset
(
&
R485_0x80_msg
[
R485_CLEAR_START
],
0
,
R485_CLEAR_LEN
);
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
1b87c8ef
...
...
@@ -631,14 +631,14 @@ void Sys_Exact_100ms_Tasks(void)
startIGONtime
++
;
if
(
startIGONtime
%
20
==
0
)
{
if
(
R485_0x80_msg
[
11
]
<
5
)
{
R485_0x80_msg
[
11
]
++
;
}
else
{
R485_0x80_msg
[
11
]
=
0
;
}
//
if(R485_0x80_msg[11] < 5)
//
{
//
R485_0x80_msg[11]++;
//
}
//
else
//
{
//
R485_0x80_msg[11] = 0;
//
}
}
}
...
...
@@ -653,16 +653,16 @@ void Sys_Exact_100ms_Tasks(void)
clearodotimeflash
++
;
if
(
clearodotimeflash
%
20
==
0
)
{
if
(
R485_0x80_msg
[
11
]
<
5
)
{
R485_0x80_msg
[
11
]
++
;
R485_0x80_msg
[
10
]
++
;
}
else
{
R485_0x80_msg
[
11
]
=
0
;
R485_0x80_msg
[
10
]
=
0
;
}
//
if (R485_0x80_msg[11] < 5)
//
{
//
R485_0x80_msg[11]++;
//
R485_0x80_msg[10]++;
//
}
//
else
//
{
//
R485_0x80_msg[11] = 0;
//
R485_0x80_msg[10] = 0;
//
}
}
// CHECK_IPK_COUNT( );
}
...
...
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