Skip to content

Commit

Permalink
Hotfix for Bot position (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
tstumm authored Jul 26, 2016
1 parent 27fa1d5 commit cd9169c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pokemongo_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PokemonGoBot(object):

@property
def position(self):
return (self.api._position_lat, self.api._position_lng)
return (i2f(self.api._position_lat), i2f(self.api._position_lng), 0)

def __init__(self, config):
self.config = config
Expand Down Expand Up @@ -244,7 +244,6 @@ def check_session(self, position):

if remaining_time < 60:
logger.log("Session stale, re-logging in", 'yellow')
self.position = [i2f(self.api._position_lat), i2f(self.api._position_lng), 0]
self.login()


Expand Down Expand Up @@ -437,8 +436,7 @@ def _set_starting_position(self):
try:
location_str = u'{}'.format(str(self.config.location))
location = (self._get_pos_by_name(location_str.replace(" ", "")))
self.position = location
self.api.set_position(*self.position)
self.api.set_position(*location)
logger.log('')
logger.log(u'Location Found: {}'.format(self.config.location.decode(
'utf-8')))
Expand Down
1 change: 0 additions & 1 deletion pokemongo_bot/step_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def step(self):
cLng = i2f(self.api._position_lng) + scaledDLng + random_lat_long_delta()

self.api.set_position(cLat, cLng, 0)
self.bot.position = (cLat,cLng,0) # set position so we can use it later on
self.bot.heartbeat()
sleep(1) # sleep one second plus a random delta
# self._work_at_position(
Expand Down

0 comments on commit cd9169c

Please sign in to comment.