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
707083c7
Commit
707083c7
authored
Mar 31, 2025
by
957dd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新了bug
parent
d789dfb9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
main
main
+0
-0
main.c
usr/main.c
+8
-7
No files found.
main
View file @
707083c7
No preview for this file type
usr/main.c
View file @
707083c7
...
@@ -8,18 +8,19 @@ int Device_File_Init() {
...
@@ -8,18 +8,19 @@ int Device_File_Init() {
sub_str
[
1
]
=
readbuf
[
3
];
sub_str
[
1
]
=
readbuf
[
3
];
sub_str
[
2
]
=
'\0'
;
sub_str
[
2
]
=
'\0'
;
printf
(
"开始初始化了"
);
printf
(
"开始初始化了"
);
if
(
strcmp
(
sub_str
,
"02"
)
==
0
){
//坦克的编码
if
(
strcmp
(
sub_str
,
"01"
)
==
0
){
//车的编码
pwm_speed
();
//pwm初始化,车为停止
pin_init
();
AppExit_pin_pwm
=
1
;
//车的异常停止值
free
(
sub_str
);
}
else
if
(
strcmp
(
sub_str
,
"02"
)
==
0
){
//坦克的编码
pin_init
();
pin_init
();
pinMode
(
2
,
OUTPUT
);
//pwm引脚改为普通引脚
pinMode
(
2
,
OUTPUT
);
//pwm引脚改为普通引脚
pinMode
(
21
,
OUTPUT
);
//pwm引脚改为普通引脚
pinMode
(
21
,
OUTPUT
);
//pwm引脚改为普通引脚
digitalWrite
(
2
,
LOW
);
digitalWrite
(
2
,
LOW
);
digitalWrite
(
21
,
LOW
);
digitalWrite
(
21
,
LOW
);
AppExit_pin_pwm
=
1
;
//坦克的异常停止值
AppExit_pin_pwm
=
2
;
//坦克的异常停止值
free
(
sub_str
);
}
else
if
(
strcmp
(
sub_str
,
"01"
)
==
0
){
//车的编码
pwm_speed
();
//pwm初始化,车为停止
pin_init
();
AppExit_pin_pwm
=
2
;
//车的异常停止值
free
(
sub_str
);
free
(
sub_str
);
}
else
if
(
strcmp
(
sub_str
,
"03"
)
==
0
){
//船的编码
}
else
if
(
strcmp
(
sub_str
,
"03"
)
==
0
){
//船的编码
pwm_speed
();
pwm_speed
();
...
...
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