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
ee2277fd
Commit
ee2277fd
authored
Sep 30, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:诊断04接指示灯电源值外发
parent
ee5117af
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
36 deletions
+93
-36
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+12
-12
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+58
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+1
-1
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+20
-20
api_RS485.h
YueJin_test_bench/source/Appliciation/api_RS485.h
+2
-2
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
ee2277fd
...
@@ -120,61 +120,61 @@ void datacheck(void)
...
@@ -120,61 +120,61 @@ void datacheck(void)
// General_Number_Disp(blename, 3, 165);
// General_Number_Disp(blename, 3, 165);
}
}
break
;
break
;
case
0x
4F
:
//接收诊断信息
case
0x
14
:
//接收诊断信息
{
{
switch
(
BarCode
[
6
])
switch
(
BarCode
[
7
])
{
{
case
0
:
case
0
:
LineGetSta
.
power1
=
(
BarCode
[
7
]
<<
8
|
BarCode
[
8
]);
LineGetSta
.
power1
=
(
BarCode
[
8
]
<<
8
|
BarCode
[
9
]);
if
(
LineGetSta
.
power1
<
24
)
if
(
LineGetSta
.
power1
<
24
)
{
{
powerstdio
=
1
;
powerstdio
=
1
;
}
}
break
;
break
;
case
1
:
case
1
:
LineGetSta
.
ble1
=
BarCode
[
7
];
LineGetSta
.
ble1
=
BarCode
[
8
];
if
(
LineGetSta
.
ble1
==
1
)
if
(
LineGetSta
.
ble1
==
1
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
2
:
case
2
:
LineGetSta
.
turnleft1
=
BarCode
[
7
];
LineGetSta
.
turnleft1
=
BarCode
[
8
];
if
(
LineGetSta
.
turnleft1
==
1
)
if
(
LineGetSta
.
turnleft1
==
3
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
3
:
case
3
:
LineGetSta
.
turnright1
=
BarCode
[
7
];
LineGetSta
.
turnright1
=
BarCode
[
8
];
if
(
LineGetSta
.
turnright1
==
1
)
if
(
LineGetSta
.
turnright1
==
3
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
4
:
case
4
:
LineGetSta
.
ABSlight1
=
BarCode
[
7
];
LineGetSta
.
ABSlight1
=
BarCode
[
8
];
if
(
LineGetSta
.
ABSlight1
==
1
)
if
(
LineGetSta
.
ABSlight1
==
1
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
5
:
case
5
:
LineGetSta
.
lowlight1
=
BarCode
[
7
];
LineGetSta
.
lowlight1
=
BarCode
[
8
];
if
(
LineGetSta
.
lowlight1
==
1
)
if
(
LineGetSta
.
lowlight1
==
1
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
6
:
case
6
:
LineGetSta
.
highlight1
=
BarCode
[
7
];
LineGetSta
.
highlight1
=
BarCode
[
8
];
if
(
LineGetSta
.
highlight1
==
1
)
if
(
LineGetSta
.
highlight1
==
1
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
}
}
break
;
break
;
case
7
:
case
7
:
LineGetSta
.
weizhilight1
=
BarCode
[
7
];
LineGetSta
.
weizhilight1
=
BarCode
[
8
];
if
(
LineGetSta
.
weizhilight1
==
1
)
if
(
LineGetSta
.
weizhilight1
==
1
)
{
{
line_stdio
=
1
;
line_stdio
=
1
;
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
ee2277fd
...
@@ -490,6 +490,21 @@ uint32_t R485_Send_0x04(void)
...
@@ -490,6 +490,21 @@ uint32_t R485_Send_0x04(void)
case
6
:
case
6
:
length
=
3
;
length
=
3
;
break
;
break
;
case
7
:
length
=
3
;
break
;
case
8
:
length
=
3
;
break
;
case
9
:
length
=
3
;
break
;
case
10
:
length
=
3
;
break
;
case
11
:
length
=
3
;
break
;
default:
default:
break
;
break
;
}
}
...
@@ -523,17 +538,59 @@ uint32_t R485_Send_0x04(void)
...
@@ -523,17 +538,59 @@ uint32_t R485_Send_0x04(void)
R485_zhenduan_Msg
[
1
]
=
0x50
;
R485_zhenduan_Msg
[
1
]
=
0x50
;
R485_zhenduan_Msg
[
2
]
=
0x0
;
R485_zhenduan_Msg
[
2
]
=
0x0
;
break
;
break
;
case
6
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x00
;
break
;
case
7
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x01
;
break
;
case
8
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x02
;
break
;
case
9
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x03
;
break
;
case
10
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x05
;
break
;
case
11
:
R485_zhenduan_Msg
[
0
]
=
0x22
;
R485_zhenduan_Msg
[
1
]
=
0xF2
;
R485_zhenduan_Msg
[
2
]
=
0x06
;
break
;
default:
default:
break
;
break
;
}
}
RS485_TX_finish
=
1
;
RS485_TX_finish
=
1
;
if
(
zhenduansendStep
!=
4
)
if
(
zhenduansendStep
!=
4
)
{
{
u32sendendflag
=
R485_Send
(
0x04
,
R485_zhenduan_Msg
,
length
);
u32sendendflag
=
R485_Send
(
0x04
,
R485_zhenduan_Msg
,
3
);
}
}
RS485_send_time
=
0
;
RS485_send_time
=
0
;
RS485_TX_finish
=
1
;
RS485_TX_finish
=
1
;
if
(
zhenduanflag
==
0
)
{
if
(
zhenduansendStep
<
11
)
{
zhenduansendStep
++
;
}
else
{
zhenduansendStep
=
6
;
}
}
}
}
RS485_TX_finish
=
1
;
RS485_TX_finish
=
1
;
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
ee2277fd
...
@@ -192,7 +192,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
...
@@ -192,7 +192,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
}
}
else
if
(
zhenduanflag
==
1
)
else
if
(
zhenduanflag
==
1
)
{
{
R485_Send_0x04
();
//
R485_Send_0x04();
R485_Send_0x80
();
R485_Send_0x80
();
}
}
}
}
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
ee2277fd
...
@@ -396,26 +396,26 @@ uint8_t RS485_User_Tx_Data(void)
...
@@ -396,26 +396,26 @@ uint8_t RS485_User_Tx_Data(void)
uint32_t
sendfinishflag
=
0
;
uint32_t
sendfinishflag
=
0
;
switch
(
RS485_TxControl
.
sendIndex
)
switch
(
RS485_TxControl
.
sendIndex
)
{
{
//
case RS485_Tx_ID04_Idx:
case
RS485_Tx_ID04_Idx
:
//
if(MENU_CHECK_STEP != 16)
if
(
MENU_CHECK_STEP
!=
16
)
//
{
{
//
sendfinishflag = R485_Send_0x04();
sendfinishflag
=
R485_Send_0x04
();
//
RS485_TX_finish = 1;
RS485_TX_finish
=
1
;
//
if(sendfinishflag == 0)
if
(
sendfinishflag
==
0
)
//
{
{
//
if(RS485_TX_finish == 1)
if
(
RS485_TX_finish
==
1
)
//
{
{
//
RS485_send_time = 0;
RS485_send_time
=
0
;
//
RS485_TxControl.sendIndex ++;
RS485_TxControl
.
sendIndex
++
;
//
}
}
//
}
}
//
}
}
//
else
else
//
{
{
//
RS485_TxControl.sendIndex ++;
RS485_TxControl
.
sendIndex
++
;
//
}
}
//
break;
break
;
case
RS485_Tx_IDA4_Idx
:
case
RS485_Tx_IDA4_Idx
:
if
((
MENU_CHECK_STEP
==
0
)
&&
(
clearOdoFlag
==
0
))
if
((
MENU_CHECK_STEP
==
0
)
&&
(
clearOdoFlag
==
0
))
...
@@ -580,7 +580,7 @@ void backsend(void)
...
@@ -580,7 +580,7 @@ void backsend(void)
{
{
if
(
clearOdoFlag
==
0
)
if
(
clearOdoFlag
==
0
)
{
{
backtime
=
1
;
backtime
=
3
;
}
}
else
else
{
{
...
...
YueJin_test_bench/source/Appliciation/api_RS485.h
View file @
ee2277fd
...
@@ -15,8 +15,8 @@
...
@@ -15,8 +15,8 @@
typedef
enum
typedef
enum
{
{
//
RS485_Tx_ID04_Idx = 0,
RS485_Tx_ID04_Idx
=
0
,
RS485_Tx_ID80_Idx
=
0
,
RS485_Tx_ID80_Idx
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD1_Idx
,
RS485_Tx_IDD1_Idx
,
...
...
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