Skip to content

Commit

Permalink
Merge pull request PokemonGoF#239 from amal/patch-1
Browse files Browse the repository at this point in the history
Fix for scanner drift (fixes PokemonGoF#229 and PokemonGoF#231)
  • Loading branch information
foodforarabbit authored Jul 19, 2016
2 parents 3fb19e8 + 1013f04 commit 247875c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,15 @@ def main():
print('Completed: ' + str(
(step + pos * .25 - .25) / (steplimit**2) * 100) + '%')

if (NEXT_LAT and NEXT_LONG
and NEXT_LAT != FLOAT_LAT
and NEXT_LONG != FLOAT_LONG):
global NEXT_LAT, NEXT_LONG
if (NEXT_LAT and NEXT_LONG and
(NEXT_LAT != FLOAT_LAT or NEXT_LONG != FLOAT_LONG)):
print('Update to next location %f, %f' % (NEXT_LAT, NEXT_LONG))
set_location_coords(NEXT_LAT, NEXT_LONG, 0)
NEXT_LAT = 0
NEXT_LONG = 0
else:
set_location_coords(origin_lat, origin_lon, 0)

register_background_thread()

Expand Down

0 comments on commit 247875c

Please sign in to comment.