Skip to content
Snippets Groups Projects
Commit 88ed5f7e authored by Zhiying Li's avatar Zhiying Li
Browse files

small fix of main

parent 636874a7
No related merge requests found
...@@ -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 detectedpwm1, 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
......
...@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment