Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wake up at location after sleep schedule #4443

Merged
merged 16 commits into from
Aug 21, 2016
Merged

Wake up at location after sleep schedule #4443

merged 16 commits into from
Aug 21, 2016

Conversation

supercourgette
Copy link
Contributor

Short Description:

Wake up at a given location after the sleep of SleepSchedule is finished.

wake_up_at_location: (lat, long | lat, long, alt | "") the location at which the bot wake up. Note that an empty string ("") will not change the location.

Fixes/Resolves/Closes (please use correct syntax):

@mention-bot
Copy link

@supercourgette, thanks for your PR! By analyzing the annotation information on this pull request, we identified @buluba89, @TheSavior and @dsync89 to be potential reviewers

@@ -60,6 +64,22 @@ def _process_config(self):
self.duration_random_offset = int(
timedelta(
hours=duration_random_offset.hour, minutes=duration_random_offset.minute).total_seconds())

self.wake_up_at_location = False
wake_up_at_location = self.config.get("wake_up_at_location", "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no setup in config file, should not have wake_up_at_location processing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is because in def work(), I had to check if wake_up_at_location is setup. I presumed it would not make a difference using a var or checking in config_file. Will fix.

@supercourgette
Copy link
Contributor Author

I noted that something removed the Random Pause configuration from the docs. Should I send again?

@solderzzc
Copy link
Contributor

The random pause is very needed, reset to start point will prevent bot traveling all the world.
So if you can get that part back, will be very good.

@supercourgette
Copy link
Contributor Author

Updated the randomPause docs while I was at it. :)

@solderzzc
Copy link
Contributor

There should be altitude and a GPS noise.

@supercourgette
Copy link
Contributor Author

The altitude was already there (even if it wasn't visible in the example configs). The GPS noise is applied automatically in the api_wrapper > def set_position (unless I'm missing something :) ).

@solderzzc
Copy link
Contributor

Thanks for the pr!

@solderzzc solderzzc merged commit 3381add into PokemonGoF:dev Aug 21, 2016
@supercourgette supercourgette deleted the SleepGoto branch August 21, 2016 06:50
@k4n30 k4n30 mentioned this pull request Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants