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
26f505b7
Commit
26f505b7
authored
Dec 26, 2024
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4g gns update
parent
b108cfbf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
0 deletions
+23
-0
main
main
+0
-0
main.c
main.c
+1
-0
opensh.c
opensh.c
+20
-0
opensh.h
opensh.h
+2
-0
No files found.
main
View file @
26f505b7
No preview for this file type
main.c
View file @
26f505b7
...
@@ -109,6 +109,7 @@ int main(int argc, char *argv[]) {
...
@@ -109,6 +109,7 @@ int main(int argc, char *argv[]) {
system
(
"pkill firefox"
);
system
(
"pkill firefox"
);
Delay_Ms
(
30
,
0
);
Delay_Ms
(
30
,
0
);
reconnect_4g
();
gStart
=
time
(
NULL
);
//开始时间戳
gStart
=
time
(
NULL
);
//开始时间戳
serial_Init
();
//串口初始化
serial_Init
();
//串口初始化
...
...
opensh.c
View file @
26f505b7
...
@@ -49,3 +49,23 @@ void refresh_cam()
...
@@ -49,3 +49,23 @@ void refresh_cam()
pclose
(
fp
);
pclose
(
fp
);
printf
(
"recam
\n
"
);
printf
(
"recam
\n
"
);
}
}
int
reconnect_4g
()
{
FILE
*
file
=
fopen
(
"/etc/resolv.conf"
,
"w"
);
if
(
file
==
NULL
)
{
perror
(
"Failed to open /etc/resolv.conf"
);
return
1
;
}
// 写入 nameserver 8.8.8.8
const
char
*
nameserver
=
"nameserver 8.8.8.8
\n
"
;
if
(
fputs
(
nameserver
,
file
)
==
EOF
)
{
perror
(
"Failed to write to /etc/resolv.conf"
);
fclose
(
file
);
return
1
;
}
// 关闭文件
fclose
(
file
);
}
opensh.h
View file @
26f505b7
...
@@ -10,4 +10,5 @@ extern char gwebcam[100];
...
@@ -10,4 +10,5 @@ extern char gwebcam[100];
int
opencamsh
();
int
opencamsh
();
void
refresh_cam
();
void
refresh_cam
();
int
reconnect_4g
();
#endif
#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