Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QJ_500-7c
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
时昊
QJ_500-7c
Commits
d222e351
Commit
d222e351
authored
May 07, 2024
by
薛小虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: 底板串口接收丢帧,添加打印测试
parent
6ed34a29
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
6 deletions
+50
-6
app_Ble_User.c
qianjiang/main/app_Ble_User.c
+16
-3
app_Ble_User.h
qianjiang/main/app_Ble_User.h
+1
-1
gatts_table_creat_demo.c
qianjiang/main/gatts_table_creat_demo.c
+31
-0
main_user.c
qianjiang/main/main_user.c
+2
-2
No files found.
qianjiang/main/app_Ble_User.c
View file @
d222e351
...
@@ -23,7 +23,7 @@ app_Ble_Rec_Data_Ctrl_Struct RecCtrl;
...
@@ -23,7 +23,7 @@ app_Ble_Rec_Data_Ctrl_Struct RecCtrl;
uint8_t
Wifi_OTA_Request
=
0
;
uint8_t
Wifi_OTA_Request
=
0
;
uint8_t
ble_key
[
32
]
=
"1BJ7J8S"
;
uint8_t
ble_key
[
32
]
=
"1BJ7J8S"
;
uint8_t
ble_uerid
[
3
2
]
=
{
0
}
;
uint8_t
ble_uerid
[
3
3
]
=
"tywtywtywtywtywtywtywtywtywtyw01"
;
uint8_t
ble_pwd
[
32
]
=
{
0
};
uint8_t
ble_pwd
[
32
]
=
{
0
};
uint8_t
flavor
[
4
]
=
{
0x33
,
0
,
0
,
0
};
uint8_t
flavor
[
4
]
=
{
0x33
,
0
,
0
,
0
};
...
@@ -392,6 +392,7 @@ void Ble_Msg_RequestNavi_RLY(void )
...
@@ -392,6 +392,7 @@ void Ble_Msg_RequestNavi_RLY(void )
void
Ble_MsgRec_Navi_Analysis
(
void
)
void
Ble_MsgRec_Navi_Analysis
(
void
)
{
{
uint32_t
aaa
=
0
;
//Navi data
//Navi data
Ble_Navi_Data
.
Navi_Sts
=
BleRecData
.
Msg
.
Param
[
0
];
Ble_Navi_Data
.
Navi_Sts
=
BleRecData
.
Msg
.
Param
[
0
];
Ble_Navi_Data
.
Navi_Turn
=
BleRecData
.
Msg
.
Param
[
1
];
Ble_Navi_Data
.
Navi_Turn
=
BleRecData
.
Msg
.
Param
[
1
];
...
@@ -401,8 +402,20 @@ void Ble_MsgRec_Navi_Analysis(void )
...
@@ -401,8 +402,20 @@ void Ble_MsgRec_Navi_Analysis(void )
Ble_Navi_Data
.
Navi_Dte
[
3
]
=
BleRecData
.
Msg
.
Param
[
5
];
Ble_Navi_Data
.
Navi_Dte
[
3
]
=
BleRecData
.
Msg
.
Param
[
5
];
printf
(
"Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x
\r\n
"
,
\
aaa
=
Ble_Navi_Data
.
Navi_Dte
[
3
];
Ble_Navi_Data
.
Navi_Sts
,
Ble_Navi_Data
.
Navi_Turn
,
Ble_Navi_Data
.
Navi_Dte
[
0
],
Ble_Navi_Data
.
Navi_Dte
[
1
],
Ble_Navi_Data
.
Navi_Dte
[
2
],
Ble_Navi_Data
.
Navi_Dte
[
3
]);
aaa
<<=
8
;
aaa
|=
Ble_Navi_Data
.
Navi_Dte
[
2
];
aaa
<<=
8
;
aaa
|=
Ble_Navi_Data
.
Navi_Dte
[
1
];
aaa
<<=
8
;
aaa
|=
Ble_Navi_Data
.
Navi_Dte
[
0
];
// printf("navi sts = %x; navi turn = %d; navi dest = %ld\n", Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, aaa);
// printf("Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x\r\n",
// Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, Ble_Navi_Data.Navi_Dte[0], Ble_Navi_Data.Navi_Dte[1], Ble_Navi_Data.Navi_Dte[2],Ble_Navi_Data.Navi_Dte[3]);
Ble_User
.
Navi_Updat
=
1
;
Ble_User
.
Navi_Updat
=
1
;
Ble_User
.
Navi_T
=
0
;
Ble_User
.
Navi_T
=
0
;
...
...
qianjiang/main/app_Ble_User.h
View file @
d222e351
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdlib.h>
extern
uint8_t
ble_uerid
[
3
2
];
extern
uint8_t
ble_uerid
[
3
3
];
typedef
enum
typedef
enum
{
{
Ble_Idle
=
0
,
Ble_Idle
=
0
,
...
...
qianjiang/main/gatts_table_creat_demo.c
View file @
d222e351
...
@@ -81,6 +81,37 @@ void init_Uart(void) {
...
@@ -81,6 +81,37 @@ void init_Uart(void) {
int
bsp_Uart_Send_Data
(
uint8_t
*
data
,
unsigned
int
len
)
int
bsp_Uart_Send_Data
(
uint8_t
*
data
,
unsigned
int
len
)
{
{
uint32_t
aaa
=
0
;
if
(
data
[
4
]
==
0x01
&&
data
[
5
]
==
0x33
)
{
printf
(
"data[5] = %x "
,
data
[
5
]);
printf
(
"data[6] = %x "
,
data
[
6
]);
printf
(
"data[7] = %x "
,
data
[
7
]);
printf
(
"data[8] = %x "
,
data
[
8
]);
printf
(
"data[9] = %x "
,
data
[
9
]);
printf
(
"data[10] = %x "
,
data
[
10
]);
printf
(
"
\n
"
);
printf
(
"navi sts data[5] = %x "
,
data
[
5
]);
printf
(
"navi turn data[6] = %d "
,
data
[
6
]);
aaa
=
data
[
10
];
aaa
<<=
8
;
aaa
|=
data
[
9
];
aaa
<<=
8
;
aaa
|=
data
[
8
];
aaa
<<=
8
;
aaa
|=
data
[
7
];
printf
(
"navi dest = %ld
\n
"
,
aaa
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
int
txBytes
=
uart_write_bytes
(
UART_NUM_1
,
data
,
len
);
int
txBytes
=
uart_write_bytes
(
UART_NUM_1
,
data
,
len
);
uart_wait_tx_idle_polling
(
UART_NUM_1
);
uart_wait_tx_idle_polling
(
UART_NUM_1
);
return
txBytes
;
return
txBytes
;
...
...
qianjiang/main/main_user.c
View file @
d222e351
...
@@ -93,8 +93,8 @@ static void Sys_Run_Tasks(void *arg)
...
@@ -93,8 +93,8 @@ static void Sys_Run_Tasks(void *arg)
{
{
testcnt
=
0
;
testcnt
=
0
;
printf
(
"BT_User.BT_Sts = %d
\r\n
"
,
BT_User
.
BT_Sts
);
//
printf("BT_User.BT_Sts = %d\r\n", BT_User.BT_Sts);
printf
(
"Ble_User.Ble_Sts = %d
\r\n
"
,
Ble_User
.
Ble_Sts
);
//
printf("Ble_User.Ble_Sts = %d\r\n", Ble_User.Ble_Sts);
// esp_log_buffer_hex(TAG, peer_addr, 6);
// esp_log_buffer_hex(TAG, peer_addr, 6);
...
...
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