Skip to content

Commit

Permalink
GPS取得が成功したときのみカウントするように改良
Browse files Browse the repository at this point in the history
  • Loading branch information
nagayama3 committed Jul 15, 2019
1 parent cb75461 commit c15f6ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion raspberry_pi/gps_homing.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ def cal_average(x):
svL.rotate(dutyL)
svR.rotate(dutyR)

now = [None, None]
for i in range(5):
now = [None, None]
while now is None:
now = GPS.lat_long_measurement()
position_memo.put(GPS.convert_lat_long_to_r_theta(pre[0], pre[1], now[0], now[1]))
Expand All @@ -77,6 +77,7 @@ def cal_average(x):
#goalとの距離が10m以下になったら画像での誘導
while to_goal[0] > cam_dis:

now = [None, None]
now = GPS.lat_long_measurement()
if now[0] != None or now[1] != None:

Expand Down

0 comments on commit c15f6ea

Please sign in to comment.