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
f6dc2673
Commit
f6dc2673
authored
Nov 11, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:写入功能完成
parent
547c70f6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
49 deletions
+48
-49
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+36
-36
Check_Ctrl.h
YueJin_test_bench/source/Appliciation/Check_Ctrl.h
+1
-0
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+1
-4
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+2
-0
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+8
-9
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
f6dc2673
...
...
@@ -304,47 +304,47 @@ void datacheck(void)
{
if
(
BarCode
[
5
]
==
0x50
&&
BarCode
[
6
]
==
0x3
)
{
zhenduansendStep
++
;
zhenduansendStep
=
3
;
RS485_TX_finish
=
0
;
}
}
break
;
case
1
:
if
(
BarCode
[
2
]
==
0x14
)
{
if
(
BarCode
[
5
]
==
0x67
&&
BarCode
[
6
]
==
0x1
)
{
seed_value
[
0
]
=
BarCode
[
7
];
seed_value
[
1
]
=
BarCode
[
8
];
seed_value
[
2
]
=
BarCode
[
9
];
seed_value
[
3
]
=
BarCode
[
10
];
get_key
();
zhenduansendStep
++
;
RS485_TX_finish
=
0
;
}
}
//
if(BarCode[2] == 0x14)
//
{
//
if(BarCode[5] == 0x67 && BarCode[6] == 0x1)
//
{
//
seed_value[0] = BarCode[7];
//
seed_value[1] = BarCode[8];
//
seed_value[2] = BarCode[9];
//
seed_value[3] = BarCode[10];
//
get_key();
//
zhenduansendStep++;
//
RS485_TX_finish = 0;
//
}
//
}
break
;
case
2
:
if
(
BarCode
[
2
]
==
0x14
)
{
if
(
BarCode
[
5
]
==
0x67
&&
BarCode
[
6
]
==
0x2
)
{
zhenduansendStep
++
;
RS485_TX_finish
=
0
;
}
else
if
(
BarCode
[
5
]
!=
0x67
)
{
zhenduansendStep
=
0
;
RS485_TX_finish
=
0
;
}
else
{
;
}
}
//
if(BarCode[2] == 0x14)
//
{
//
if(BarCode[5] == 0x67 && BarCode[6] == 0x2)
//
{
//
zhenduansendStep++;
//
RS485_TX_finish = 0;
//
}
//
else if(BarCode[5] != 0x67)
//
{
//
zhenduansendStep = 0;
//
RS485_TX_finish = 0;
//
}
//
else
//
{
//
;
//
}
//
}
break
;
case
3
:
if
(
BarCode
[
2
]
==
0x14
)
if
(
BarCode
[
2
]
==
0x14
)
//写码
{
if
((
BarCode
[
5
]
==
0x6E
)
&&
(
BarCode
[
6
]
==
0x50
)
&&
(
BarCode
[
7
]
==
0
))
{
...
...
@@ -353,7 +353,7 @@ void datacheck(void)
saomafinish
=
1
;
waittimer
=
0
;
}
if
(
BarCode
[
5
]
==
0x7F
&&
BarCode
[
6
]
==
0x2E
&&
BarCode
[
7
]
==
0x78
)
if
(
BarCode
[
5
]
==
0x7F
&&
BarCode
[
6
]
==
0x2E
&&
BarCode
[
7
]
==
0x78
)
//等待后重发10 03
{
if
(
waittimer
>=
2
)
{
...
...
@@ -366,8 +366,9 @@ void datacheck(void)
waittimer
++
;
}
}
if
(
BarCode
[
5
]
==
0x7F
&&
BarCode
[
6
]
==
0x2E
&&
BarCode
[
7
]
==
0x31
)
if
(
BarCode
[
5
]
==
0x7F
&&
BarCode
[
6
]
==
0x2E
&&
BarCode
[
7
]
==
0x31
)
//写入内容不对
{
zhenduansendStep
=
0
;
RS485_TX_finish
=
0
;
}
}
...
...
@@ -377,7 +378,7 @@ void datacheck(void)
}
break
;
case
5
:
if
(
BarCode
[
0
]
==
0x59
&&
BarCode
[
1
]
==
0x44
)
if
(
BarCode
[
0
]
==
0x59
&&
BarCode
[
1
]
==
0x44
)
//扫码
{
if
(((
BarCode
[
arraynum
])
==
0x4A
)
&&
((
BarCode
[
arraynum
-
1
])
==
0x4B
))
{
...
...
@@ -427,7 +428,6 @@ void datacheck(void)
uint8_t
cmpresult
=
3
;
void
BarCodeDataGet
(
void
)
{
if
((
mDataBufPtr1
[
0
]
==
0x59
)
&&
(
mDataBufPtr1
[
1
]
==
0x59
)
&&
(
mDataBufPtr1
[
39
]
!=
0x0
))
{
memcpy
(
barcode_Msg
,
&
mDataBufPtr1
[
6
],
34
);
...
...
YueJin_test_bench/source/Appliciation/Check_Ctrl.h
View file @
f6dc2673
...
...
@@ -46,6 +46,7 @@ extern unsigned int CAN_Msg_Tx_Enable;
extern
uint8_t
loc_Type_back
;
extern
uint8_t
LED_Waring
;
extern
uint8_t
writefail
[
5
];
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 @
f6dc2673
...
...
@@ -4776,10 +4776,7 @@ void Display_Version_Info(uint32_t ON_OFF)
uint8_t wuliao[16];
// for(int i =0;i < 16; i++)
// {
// wuliao[i] = barcode_Msg[i];
// }
wuliao[0] = R485_IDB4h.Sig.MaterialCode01;
wuliao[1] = R485_IDB4h.Sig.MaterialCode02;
wuliao[2] = R485_IDB4h.Sig.MaterialCode03;
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
f6dc2673
...
...
@@ -18,6 +18,8 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent) //下一步
MENU_CHECK_STEP_ADD
(
);
zhenduansendStep
=
0
;
zhenduanflag
=
Data_Mode_Dot
;
memset
(
erweima
,
0
,
64
);
memset
(
barcode_Msg
,
0
,
64
);
}
}
}
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
f6dc2673
...
...
@@ -638,19 +638,18 @@ uint32_t R485_Send_0x04(void)
case
0
:
R485_zhenduan_Msg
[
0
]
=
0x10
;
R485_zhenduan_Msg
[
1
]
=
0x03
;
zhenduansendStep
=
3
;
break
;
case
1
:
R485_zhenduan_Msg
[
0
]
=
0x27
;
R485_zhenduan_Msg
[
1
]
=
0x1
;
//
R485_zhenduan_Msg[0] = 0x27;
//
R485_zhenduan_Msg[1] = 0x1;
break
;
case
2
:
R485_zhenduan_Msg
[
0
]
=
0x27
;
R485_zhenduan_Msg
[
1
]
=
0x2
;
R485_zhenduan_Msg
[
2
]
=
key_array
[
0
];
R485_zhenduan_Msg
[
3
]
=
key_array
[
1
];
R485_zhenduan_Msg
[
4
]
=
key_array
[
2
];
R485_zhenduan_Msg
[
5
]
=
key_array
[
3
];
//
R485_zhenduan_Msg[0] = 0x27;
//
R485_zhenduan_Msg[1] = 0x2;
//
R485_zhenduan_Msg[2] = key_array[0];
//
R485_zhenduan_Msg[3] = key_array[1];
//
R485_zhenduan_Msg[4] = key_array[2];
//
R485_zhenduan_Msg[5] = key_array[3];
break
;
case
3
:
R485_zhenduan_Msg
[
0
]
=
0x2E
;
...
...
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