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
3384b318
Commit
3384b318
authored
Dec 18, 2024
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh bug update but have few bug
parent
143f6dc9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
11 deletions
+15
-11
cam.sh
cam.sh
+5
-4
log.txt
log/log.txt
+0
-0
main
main
+0
-0
main.c
main.c
+6
-3
mqtt.h
mqtt.h
+1
-1
opensh.c
opensh.c
+1
-1
opensh.h
opensh.h
+2
-2
No files found.
cam
shell/cam
.sh
→
cam.sh
View file @
3384b318
#!/bin/bash
# 设置 DISPLAY 环境变量(确保 Firefox 能运行图形界面)
export
DISPLAY
=
:0
pkill firefox
# 设置 DISPLAY 环境变量(确保 Firefox 能运行图形界面)
export
DISPLAY
=
:0
firefox
--new-window
"https://8.129.3.163/index"
--ignore-certificate-errors
\ No newline at end of file
sudo
firefox
--new-window
"https://8.129.3.163/index"
--ignore-certificate-errors
&
\ No newline at end of file
log/log.txt
View file @
3384b318
This diff is collapsed.
Click to expand it.
main
View file @
3384b318
No preview for this file type
main.c
View file @
3384b318
...
...
@@ -60,6 +60,7 @@ void *Mqttbeat(void *arg)
void
*
serial_usart2
(
void
*
arg
)
{
printf
(
"serial_usart 2 start
\n
"
);
serial_Receive_2
();
...
...
@@ -70,17 +71,19 @@ int main(int argc, char *argv[]) {
gStart
=
time
(
NULL
);
//开始时间戳
opencamsh
();
serial_Init
();
//串口初始化
mqtt_init
();
//mqtt初始化
mqtt_create
(
mosq
);
//创建mqtt客户端
ipaddr
();
//获取ip
mqtt_wirte
();
//mqtt心跳首次发送
opencamsh
();
thread_start
(
serial_usart1
,
AppExit
,
Mqttbeat
,
serial_usart2
);
mqtt_cycle
(
mosq
);
...
...
mqtt.h
View file @
3384b318
...
...
@@ -12,7 +12,7 @@
#define BROKER_ADDRESS "119.45.167.177"
#define BROKER_PORT 1883
#define CLIENT_ID "feichirensheng/c
ontrol/car0001
"
#define CLIENT_ID "feichirensheng/c
arorship
"
#define TOPIC "controlcar0001"
#define USERNAME "admin" // 替换为你的用户名
#define PASSWORD "admin" // 替换为你的密码
...
...
opensh.c
View file @
3384b318
...
...
@@ -10,5 +10,5 @@ int opencamsh()
return
-
1
;
}
printf
(
"open cam
\n
"
);
return
0
;
}
opensh.h
View file @
3384b318
...
...
@@ -2,8 +2,7 @@
#define __opensh_H__
#define SHELLFILE "/home/kickpi/car/master/camshell/cam.sh"
#define SHELLFILE "/home/kickpi/car/master/cam.sh"
int
opencamsh
();
#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