Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
November 2021 Blimp Competition
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shahrul Kamil bin Hassan
November 2021 Blimp Competition
Commits
88ed5f7e
Commit
88ed5f7e
authored
4 years ago
by
Zhiying Li
Browse files
Options
Downloads
Patches
Plain Diff
small fix of main
parent
636874a7
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Control/Laptop_Code/main.py
+5
-5
5 additions, 5 deletions
Code/Control/Laptop_Code/main.py
Code/Control/Laptop_Code/main_zhiying_move2ball_indv_test.py
+0
-2
0 additions, 2 deletions
Code/Control/Laptop_Code/main_zhiying_move2ball_indv_test.py
with
5 additions
and
7 deletions
Code/Control/Laptop_Code/main.py
+
5
−
5
View file @
88ed5f7e
...
@@ -257,14 +257,14 @@ def main_control(gbx, gby, gb_dist, tx, ty, tz, rx, ry, rz, LIDAR_dist, debugM):
...
@@ -257,14 +257,14 @@ def main_control(gbx, gby, gb_dist, tx, ty, tz, rx, ry, rz, LIDAR_dist, debugM):
if
ballCapture
:
# Ball captured
if
ballCapture
:
# Ball captured
if
goalDetect
:
# Goal detected
if
goalDetect
:
# Goal detected
move2goal
(
tx
,
ty
)
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
=
move2goal
(
tx
,
ty
)
else
:
# Goal not detected
else
:
# Goal not detected
pwm1, pwm2, pwm3, pwm4, dir1, dir2, dir3, dir4 =
seeking
()
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
=
seeking
()
else
:
# Ball not captured
else
:
# Ball not captured
if
ballDetect
:
# Ball detected
if
ballDetect
:
# Ball detected
move2ball
(
gbx
,
gby
,
gb_dist
)
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
=
move2ball
(
gbx
,
gby
,
gb_dist
)
else
:
# Ball not detected
else
:
# Ball not detected
seeking
()
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
=
seeking
()
return
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
return
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
...
...
This diff is collapsed.
Click to expand it.
Code/Control/Laptop_Code/main_zhiying.py
→
Code/Control/Laptop_Code/main_zhiying
_move2ball_indv_test
.py
+
0
−
2
View file @
88ed5f7e
...
@@ -271,8 +271,6 @@ def main_control(gbx, gby, gb_dist, tx, ty, tz, rx, ry, rz, LIDAR_dist, debugM):
...
@@ -271,8 +271,6 @@ def main_control(gbx, gby, gb_dist, tx, ty, tz, rx, ry, rz, LIDAR_dist, debugM):
stop_all
()
stop_all
()
#pwm1, pwm2, pwm3, pwm4, dir1, dir2, dir3, dir4 = seeking()
#pwm1, pwm2, pwm3, pwm4, dir1, dir2, dir3, dir4 = seeking()
return
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
return
pwm1
,
pwm2
,
pwm3
,
pwm4
,
dir1
,
dir2
,
dir3
,
dir4
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment