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
0b53c3a1
Commit
0b53c3a1
authored
Sep 30, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加ble蓝牙连接,简易导航
parent
ee2277fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
65 deletions
+40
-65
R485_Communication_Matrix.c
...est_bench/source/Appliciation/R485_Communication_Matrix.c
+17
-64
R485_Communication_Matrix.h
...est_bench/source/Appliciation/R485_Communication_Matrix.h
+1
-0
api_RS485.c
YueJin_test_bench/source/Appliciation/api_RS485.c
+20
-0
api_RS485.h
YueJin_test_bench/source/Appliciation/api_RS485.h
+2
-1
No files found.
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.c
View file @
0b53c3a1
...
@@ -608,6 +608,22 @@ uint32_t R485_Send_0xA4(void)
...
@@ -608,6 +608,22 @@ uint32_t R485_Send_0xA4(void)
return
u32sendendflag
;
return
u32sendendflag
;
}
}
uint32_t
R485_Send_0xB3
(
void
)
//蓝牙地址
{
memset
(
R485_IDB3h
.
Msg
,
0xFF
,
RS485_RX_ID0XB3_DATA_LEN
);
uint32_t
u32sendendflag
=
0
;
R485_IDB3h
.
Sig
.
BT_MAC1
=
name1
;
//蓝牙名
R485_IDB3h
.
Sig
.
BT_MAC2
=
name2
;
R485_IDB3h
.
Sig
.
BT_MAC3
=
0xA
;
R485_IDB3h
.
Sig
.
BT_MAC4
=
0xA
;
R485_IDB3h
.
Sig
.
BT_MAC5
=
0xA
;
R485_IDB3h
.
Sig
.
BT_MAC6
=
0xA
;
u32sendendflag
=
R485_Send
(
0xB3
,
R485_IDB3h
.
Msg
,
sizeof
(
R485_IDB3h
.
Msg
));
return
u32sendendflag
;
}
uint32_t
R485_Send_0x41
(
void
)
uint32_t
R485_Send_0x41
(
void
)
{
{
/**************0.437*********** */
/**************0.437*********** */
...
@@ -1283,70 +1299,7 @@ uint32_t R485_Send_0x41(void)
...
@@ -1283,70 +1299,7 @@ uint32_t R485_Send_0x41(void)
uint32_t
R485_Send_0x42
(
void
)
uint32_t
R485_Send_0x42
(
void
)
{
{
memset
(
R485_ID42h
.
Msg
,
0xFF
,
64
);
uint32_t
u32sendendflag
=
0
;
R485_ID42h
.
Sig
.
TPower
=
0
;
//T动力状态
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0
;
R485_ID42h
.
Sig
.
BLE_MAC01
=
name1
;
//发送mac地址
R485_ID42h
.
Sig
.
BLE_MAC02
=
name2
;
R485_ID42h
.
Sig
.
BLE_MAC03
=
0xA
;
R485_ID42h
.
Sig
.
BLE_MAC04
=
0xA
;
R485_ID42h
.
Sig
.
BLE_MAC05
=
0xA
;
R485_ID42h
.
Sig
.
BLE_MAC06
=
0xA
;
R485_ID42h
.
Sig
.
EggAnimation
=
0
;
switch
(
MENU_CHECK_STEP
)
{
case
0
:
break
;
case
1
:
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0x44
;
//母线电流
break
;
case
2
:
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0x74
;
//母线电流
break
;
case
3
:
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0xFA
;
//母线电流
break
;
case
4
:
R485_ID42h
.
Sig
.
SuperTPower
=
0x0
;
//超级T动力模式
R485_ID42h
.
Sig
.
TPower
=
0x1
;
//T动力状态
break
;
case
5
:
// R485_ID42h.Sig.nenglainhuishou = 0x1;
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0x17
;
break
;
case
6
:
// R485_ID42h.Sig.nenglainhuishou = 0x1;
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0x14
;
break
;
case
7
:
R485_ID42h
.
Sig
.
nenglainhuishou
=
0x1
;
R485_ID42h
.
Sig
.
TotalBatteryCurrent
=
0x0
;
break
;
case
8
:
break
;
case
9
:
break
;
case
10
:
break
;
case
11
:
break
;
case
12
:
break
;
case
13
:
break
;
case
14
:
R485_ID42h
.
Sig
.
PasswordUnlockCommand
=
0x1
;
R485_ID42h
.
Sig
.
PasswordCanbeEnter
=
0x2
;
break
;
default:
break
;
}
u32sendendflag
=
R485_Send
(
0x42
,
R485_ID42h
.
Msg
,
sizeof
(
R485_ID42h
.
Msg
));
// RS485_TX_finish = 1;
return
u32sendendflag
;
}
}
uint32_t
R485_Send_ble0x42
(
void
)
uint32_t
R485_Send_ble0x42
(
void
)
{
{
...
...
YueJin_test_bench/source/Appliciation/R485_Communication_Matrix.h
View file @
0b53c3a1
...
@@ -1873,6 +1873,7 @@ extern uint32_t R485_Send_0xD1(void);
...
@@ -1873,6 +1873,7 @@ extern uint32_t R485_Send_0xD1(void);
extern
uint32_t
R485_Send_0xD2
(
void
);
extern
uint32_t
R485_Send_0xD2
(
void
);
extern
uint32_t
R485_Send_0xD3
(
void
);
extern
uint32_t
R485_Send_0xD3
(
void
);
extern
uint32_t
R485_Send_0xA4
(
void
);
extern
uint32_t
R485_Send_0xA4
(
void
);
extern
uint32_t
R485_Send_0xB3
(
void
);
// extern uint32_t R485_Send_0x80(void);
// extern uint32_t R485_Send_0x80(void);
extern
uint32_t
R485_Send_0x04
(
void
);
extern
uint32_t
R485_Send_0x04
(
void
);
extern
uint8_t
barcode_Msg
[
64
];
extern
uint8_t
barcode_Msg
[
64
];
...
...
YueJin_test_bench/source/Appliciation/api_RS485.c
View file @
0b53c3a1
...
@@ -437,6 +437,26 @@ uint8_t RS485_User_Tx_Data(void)
...
@@ -437,6 +437,26 @@ uint8_t RS485_User_Tx_Data(void)
}
}
break
;
break
;
case
RS485_Tx_IDB3_Idx
:
if
((
clearOdoFlag
==
0
)
&&
(
BlueTooth
==
1
))
{
sendfinishflag
=
R485_Send_0xB3
();
RS485_TX_finish
=
1
;
if
(
sendfinishflag
==
0
)
{
if
(
RS485_TX_finish
==
1
)
{
RS485_send_time
=
0
;
RS485_TxControl
.
sendIndex
++
;
}
}
}
else
{
RS485_TxControl
.
sendIndex
++
;
}
break
;
case
RS485_Tx_IDD0_Idx
:
case
RS485_Tx_IDD0_Idx
:
if
((
MENU_CHECK_STEP
!=
16
)
&&
(
clearOdoFlag
==
0
))
if
((
MENU_CHECK_STEP
!=
16
)
&&
(
clearOdoFlag
==
0
))
{
{
...
...
YueJin_test_bench/source/Appliciation/api_RS485.h
View file @
0b53c3a1
...
@@ -18,6 +18,7 @@ typedef enum
...
@@ -18,6 +18,7 @@ typedef enum
RS485_Tx_ID04_Idx
=
0
,
RS485_Tx_ID04_Idx
=
0
,
RS485_Tx_ID80_Idx
,
RS485_Tx_ID80_Idx
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDA4_Idx
,
RS485_Tx_IDB3_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD0_Idx
,
RS485_Tx_IDD1_Idx
,
RS485_Tx_IDD1_Idx
,
RS485_Tx_IDD2_Idx
,
RS485_Tx_IDD2_Idx
,
...
@@ -75,5 +76,5 @@ extern uint8_t sendmsgAll[8];
...
@@ -75,5 +76,5 @@ extern uint8_t sendmsgAll[8];
extern
uint32_t
R485_Send
(
const
uint16_t
cmdID
,
const
uint8_t
*
pData
,
uint8_t
len
);
extern
uint32_t
R485_Send
(
const
uint16_t
cmdID
,
const
uint8_t
*
pData
,
uint8_t
len
);
extern
uint16_t
Yadi_CAL_Data_Sum
(
uint8_t
*
pu8LinData
,
uint8_t
u8LinLen
);
extern
uint16_t
Yadi_CAL_Data_Sum
(
uint8_t
*
pu8LinData
,
uint8_t
u8LinLen
);
extern
uint8_t
RS485_User_Tx_Data
(
void
);
extern
uint8_t
RS485_User_Tx_Data
(
void
);
void
backsend
(
void
);
extern
void
backsend
(
void
);
#endif
/* API_ADC_H_ */
#endif
/* API_ADC_H_ */
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