Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
car-controlserver
Project
Project
Details
Activity
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
wenzhongjian
car-controlserver
Commits
6f296a91
Commit
6f296a91
authored
Jul 25, 2025
by
学习的菜鸟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决了没有角度
parent
70593ef5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
pthread_open.c
app/main/pthread_open.c
+1
-1
main
build/main
+0
-0
mqtt_infor_handle.c
modules/mqtt/mqtt_infor_handle.c
+3
-2
mqtt_infor_handle.h
modules/mqtt/mqtt_infor_handle.h
+2
-1
No files found.
app/main/pthread_open.c
View file @
6f296a91
...
...
@@ -69,7 +69,7 @@ void *thread_mqtt_beat(void *arg) {
g_heartbeat_count
++
;
if
(
g_mqtt_grc
==
0
){
mqtt_wirte
();
//心跳,3s一个
mqtt_
beat_
wirte
();
//心跳,3s一个
}
}
return
NULL
;
...
...
build/main
View file @
6f296a91
No preview for this file type
modules/mqtt/mqtt_infor_handle.c
View file @
6f296a91
...
...
@@ -105,13 +105,14 @@ void angle_mqtt_send() {
}
//心跳格式,每5s一次心跳
void
mqtt_wirte
(){
void
mqtt_
beat_
wirte
(){
if
(
g_heartbeat_count
>=
30
)
{
heartbeat_send
();
g_heartbeat_count
=
0
;
}
if
(
g_device_type
==
202
)
angle_mqtt_send
();
if
(
g_device_type
==
DEVICE_TANK0202
)
angle_mqtt_send
();
if
(
g_device_type
==
DEVICE_TANK0203
)
angle_mqtt_send
();
}
...
...
modules/mqtt/mqtt_infor_handle.h
View file @
6f296a91
...
...
@@ -8,7 +8,7 @@ extern int g_heartbeat_count;
extern
int
g_devcontrol_exit_count
;
void
mqtt_wirte
();
void
mqtt_
beat_
wirte
();
int
device_message_receive
(
cJSON
*
json
);
#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