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
98b525f4
Commit
98b525f4
authored
Nov 21, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:海外检测台增加写码功能
parent
ea3ba641
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
126 deletions
+145
-126
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+112
-106
Barcode_Scanner.h
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
+1
-0
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+6
-4
Check_Ctrl.h
YueJin_test_bench/source/Appliciation/Check_Ctrl.h
+1
-1
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+21
-12
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+4
-3
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
98b525f4
...
...
@@ -17,7 +17,7 @@ static UARTRxBuf_t UARTRxBuf;
static
UARTRxBuf_t
UARTRxBuf1
;
static
uint8_t
mDataBufPtr
[
1024
]
=
{
0
};
static
uint32_t
mDataBufLen
=
0
;
static
uint8_t
mDataBufPtr1
[
1024
]
=
{
0
};
uint8_t
mDataBufPtr1
[
1024
]
=
{
0
};
static
uint32_t
mDataBufLen1
=
0
;
uint8_t
BarCode
[
256
]
=
{
0
};
uint8_t
BarCode1
[
256
]
=
{
0
};
...
...
@@ -261,6 +261,11 @@ void datacheck(void)
{
writeflag
=
BarCode
[
16
];
RS485_TX_finish
=
0
;
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
uidread
[
i
]
=
BarCode
[
i
+
17
];
}
uidread
[
32
]
=
0xFF
;
}
switch
(
zhenduansendStep
)
{
...
...
@@ -383,15 +388,16 @@ uint8_t cmpresult = 3;
void
BarCodeDataGet
(
void
)
{
if
((
mDataBufPtr1
[
0
]
==
0x
59
)
&&
(
mDataBufPtr1
[
1
]
==
0x59
)
&&
(
mDataBufPtr1
[
39
]
!=
0x0
))
if
((
mDataBufPtr1
[
0
]
==
0x
33
)
&&
(
mDataBufPtr1
[
1
]
==
0x37
)
&&
(
mDataBufPtr1
[
2
]
==
0x31
))
{
memcpy
(
barcode_Msg
,
&
mDataBufPtr1
[
6
],
34
);
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
6
],
34
);
memcpy
(
barcode_Msg
,
&
mDataBufPtr1
[
0
],
32
);
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
0
],
32
);
Display_TFT_Clear
();
}
else
{
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
6
],
34
);
memset
(
barcode_Msg
,
0
,
3
4
);
memcpy
(
barcode_Msg1
,
&
mDataBufPtr1
[
0
],
32
);
memset
(
barcode_Msg
,
0
,
3
2
);
}
}
uint8_t
GetDataCompare
(
void
)
...
...
YueJin_test_bench/source/Appliciation/Barcode_Scanner.h
View file @
98b525f4
...
...
@@ -40,4 +40,5 @@ extern uint16_t lightnumber;
extern
uint8_t
btmac
[
6
];
extern
uint8_t
uidread
[
33
];
extern
uint8_t
writeflag
;
extern
uint8_t
mDataBufPtr1
[
1024
];
#endif
\ No newline at end of file
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
98b525f4
...
...
@@ -210,9 +210,9 @@ uint8_t Type_Clear = 0;
extern
uint8_t
BCM_FLAG_2014
=
0
;
uint32_t
loc_Type
=
0
;
uint8_t
erweima
[
64
]
;
void
Total_Check
(
void
)
{
uint8_t
erweima
[
64
]
;
uint8_t
cmperweima
[
34
];
uint8_t
yibiaoshuju
[
34
];
...
...
@@ -240,8 +240,8 @@ uint8_t yibiaoshuju[34];
// {
// erweima[i] = barcode_Msg[i];
// }
memcpy
(
erweima
,
barcode_Msg
,
3
4
);
erweima
[
3
4
]
=
0xFF
;
memcpy
(
erweima
,
barcode_Msg
,
3
2
);
erweima
[
3
2
]
=
0xFF
;
General_Number_Disp
(
erweima
,
3
,
90
);
if
(
writeflag
==
1
||
writeflag
==
3
)
{
...
...
@@ -251,11 +251,13 @@ uint8_t yibiaoshuju[34];
{
TFT_LCD_Draw_Bmp
(
200
,
90
+
40
,
(
uint8_t
*
)
gImage_cuo12
);
}
General_Number_Disp
(
uidread
,
3
,
180
);
break
;
case
1
:
// Buzzer_Warning();
memcpy
(
cmperweima
,
barcode_Msg1
,
3
4
);
memcpy
(
cmperweima
,
barcode_Msg1
,
3
2
);
// for(int i =0;i<34;i++)
...
...
YueJin_test_bench/source/Appliciation/Check_Ctrl.h
View file @
98b525f4
...
...
@@ -45,7 +45,7 @@ extern unsigned char KEYBUFFER [ 4 ];
extern
unsigned
int
CAN_Msg_Tx_Enable
;
extern
uint8_t
loc_Type_back
;
extern
uint8_t
LED_Waring
;
extern
uint8_t
erweima
[
64
];
void
SET_IPK_NONE
(
void
);
void
Clear_IPK_NONE
(
void
);
void
CHECK_IPK_COUNT
(
void
);
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
98b525f4
...
...
@@ -3692,24 +3692,33 @@ uint8_t uuidnumber2[UUID2_EFFECT_LEN + 1] = {0x30,0x33,0x39,0x33,0x32,0x33,0x31,
uint8_t
uuidmodel
=
0
;
void
UUID_Write
(
void
)
{
uint16_t
uuidcrc
=
0
;
uint8_t
i
;
//
uint16_t uuidcrc = 0;
//
uint8_t i;
memcpy
(
&
R485_0x80_msg
[
UUID1_MSG_START
],
uuidnumber1
,
UUID1_EFFECT_LEN
);
//
memcpy(&R485_0x80_msg[UUID1_MSG_START], uuidnumber1, UUID1_EFFECT_LEN);
memcpy
(
&
R485_0x80_msg
[
UUID2_MSG_START
],
uuidnumber2
,
UUID2_EFFECT_LEN
);
//
memcpy(&R485_0x80_msg[UUID2_MSG_START], uuidnumber2, UUID2_EFFECT_LEN);
for
(
i
=
0
;
i
<
UUID1_EFFECT_LEN
;
i
++
)
{
uuidcrc
+=
uuidnumber1
[
i
];
}
for
(
i
=
0
;
i
<
UUID2_EFFECT_LEN
;
i
++
)
// for (i = 0; i < UUID1_EFFECT_LEN; i++)
// {
// uuidcrc += uuidnumber1[i];
// }
// for (i = 0; i < UUID2_EFFECT_LEN; i++)
// {
// uuidcrc += uuidnumber2[i];
// }
// R485_0x80_msg[CRC_MSG_POS] = uuidcrc & 0xFF;
// uuidnumber2_increment_with_carry();
uint16_t
uuidcrc
=
0
;
for
(
int
i
=
0
;
i
<
UUID1_EFFECT_LEN
+
UUID2_EFFECT_LEN
;
i
++
)
{
uuidcrc
+=
uuidnumber2
[
i
];
uuidcrc
+=
erweima
[
i
];
}
R485_0x80_msg
[
CRC_MSG_POS
]
=
uuidcrc
&
0xFF
;
uuidnumber2_increment_with_carry
(
);
memcpy
(
&
R485_0x80_msg
[
UUID1_MSG_START
],
erweima
,
UUID1_EFFECT_LEN
+
UUID2_EFFECT_LEN
);
}
uint8_t
UUIDX
=
193
;
uint8_t
change
=
19
;
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
98b525f4
...
...
@@ -123,13 +123,14 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
{
if
(
writeflag
==
1
||
writeflag
==
3
)
{
R485_Send_0x47
();
// R485_Send_0x47();
UUID_Write
();
}
else
{
R485_Send_0x80
()
;
;
}
R485_Send_0x80
();
comparestart
=
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