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
75a6ad2c
Commit
75a6ad2c
authored
Apr 08, 2025
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对云台左右进行了限位
parent
3a0e7ead
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
main
main
+0
-0
gpio_pwm_ptz.c
system/gpio/gpio_pwm_ptz.c
+2
-2
No files found.
main
View file @
75a6ad2c
No preview for this file type
system/gpio/gpio_pwm_ptz.c
View file @
75a6ad2c
...
...
@@ -56,7 +56,7 @@ void PTZ_pwm_left() {
if
(
change_index
>=
1
)
{
change_index
=
0
;
val_change
-=
3
;
if
(
val_change
<=
0
)
val_change
=
0
;
if
(
val_change
<=
30
)
val_change
=
3
0
;
pulse_width
=
calculate_pulse_width
(
val_change
);
pulse
=
calculate_duty_cycle
(
pulse_width
);
}
...
...
@@ -71,7 +71,7 @@ void PTZ_pwm_right() {
if
(
change_index
>=
1
)
{
change_index
=
0
;
val_change
+=
3
;
if
(
val_change
>=
270
)
val_change
=
27
0
;
if
(
val_change
>=
150
)
val_change
=
15
0
;
pulse_width
=
calculate_pulse_width
(
val_change
);
pulse
=
calculate_duty_cycle
(
pulse_width
);
}
...
...
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