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
90ec0dd3
Commit
90ec0dd3
authored
Jul 18, 2024
by
薛小虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加蓝牙内部版本号与底板交互
parent
50382e07
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
2 deletions
+33
-2
Protocol_User.c
qianjiang/main/Protocol_User.c
+25
-0
Protocol_User.h
qianjiang/main/Protocol_User.h
+3
-0
app_Ble_User.c
qianjiang/main/app_Ble_User.c
+1
-0
main_user.c
qianjiang/main/main_user.c
+1
-1
main_user.h
qianjiang/main/main_user.h
+3
-1
No files found.
qianjiang/main/Protocol_User.c
View file @
90ec0dd3
...
...
@@ -33,6 +33,8 @@
#include <stdbool.h>
#include <stdio.h>
#include "main_user.h"
#define TAG "Prot_User"
...
...
@@ -251,6 +253,8 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)
{
bsp_Ble_Init
();
SW_Send_Cnt_Set
(
150
);
// printf("get uuid and init ble!!! \r\n");
}
...
...
@@ -377,7 +381,21 @@ void Uart_Send_Id02_Pro(void)
}
void
Uart_Send_Id13
(
void
)
{
uint8_t
wtemp
[
3
]
=
{
0
};
wtemp
[
0
]
=
BL_INTERNAL_SW_YEAR
;
wtemp
[
1
]
=
BL_INTERNAL_SW_MONTH
;
wtemp
[
2
]
=
BL_INTERNAL_SW_DAY
;
Protocol_Send
(
0x13
,
wtemp
,
3
);
}
uint16_t
SW_Send_Cnt
=
0
;
void
SW_Send_Cnt_Set
(
uint16_t
val
)
{
SW_Send_Cnt
=
val
;
}
void
Prot_Send_Msg_Process
(
void
)
{
...
...
@@ -403,5 +421,12 @@ void Prot_Send_Msg_Process(void )
Prot_User
.
TimeDelay
=
0
;
//printf("send 0x01 0x02 \r\n");
}
SW_Send_Cnt
++
;
if
(
SW_Send_Cnt
>=
200
)
{
Uart_Send_Id13
();
SW_Send_Cnt
=
0
;
}
}
}
qianjiang/main/Protocol_User.h
View file @
90ec0dd3
...
...
@@ -39,4 +39,7 @@ void Prot_Send_Msg_Process(void );
void
Uart_Send_Id12_Pro
(
void
);
void
SW_Send_Cnt_Set
(
uint16_t
val
);
#endif
qianjiang/main/app_Ble_User.c
View file @
90ec0dd3
...
...
@@ -621,6 +621,7 @@ void Ble_DisConnect_Event_Pro(void )
Ble_Clear_Rx_Buffer
();
BleTime
.
TimeReqCnt
=
0
;
}
...
...
qianjiang/main/main_user.c
View file @
90ec0dd3
...
...
@@ -138,7 +138,7 @@ void app_main(void)
bsp_Uart_Init
();
// printf("KL30 INIT OVER~~~~~~\r\n");
ESP_LOGE
(
"MAIN"
,
"Internal Sw = %f"
,
Inter_SW
);
//
ESP_LOGE("MAIN", "Internal Sw = %f", Inter_SW);
xTaskCreatePinnedToCore
(
Sys_Run_Tasks
,
"Sys_Run_Tasks"
,
4096
,
NULL
,
3
,
NULL
,
1
);
}
...
...
qianjiang/main/main_user.h
View file @
90ec0dd3
#ifndef _MAIN_USER_H_
#define _MAIN_USER_H_
#define BL_INTERNAL_SW_YEAR 24
#define BL_INTERNAL_SW_MONTH 7
#define BL_INTERNAL_SW_DAY 18
#endif
\ No newline at end of file
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