From b9abdf31928ebabb887d82c018617a205b8f56d2 Mon Sep 17 00:00:00 2001 From: Matt J Madsen Date: Fri, 19 Aug 2016 10:22:56 -0500 Subject: [PATCH] Small fixes for altitude (#4265) * Small fix for alt * Changed default alt values (to meters) * Changed default alt values (to meters) * Changed default alt values (to meters) * Changed default alt values (to meters) * Changed default alt values (to meters) * Changed default alt values (to meters) * Changed default alt values (to meters) * Small change --- configs/config.json.cluster.example | 4 ++-- configs/config.json.example | 4 ++-- configs/config.json.map.example | 4 ++-- configs/config.json.optimizer.example | 4 ++-- configs/config.json.path.example | 4 ++-- configs/config.json.pokemon.example | 4 ++-- pokecli.py | 4 ++-- pokemongo_bot/__init__.py | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/configs/config.json.cluster.example b/configs/config.json.cluster.example index 4afae5e528..ec6cf873bb 100644 --- a/configs/config.json.cluster.example +++ b/configs/config.json.cluster.example @@ -160,8 +160,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/configs/config.json.example b/configs/config.json.example index 77d6405380..a01d0b8103 100644 --- a/configs/config.json.example +++ b/configs/config.json.example @@ -179,8 +179,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/configs/config.json.map.example b/configs/config.json.map.example index e589e4b9b6..03041f6122 100644 --- a/configs/config.json.map.example +++ b/configs/config.json.map.example @@ -413,8 +413,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/configs/config.json.optimizer.example b/configs/config.json.optimizer.example index e4b9708621..2825077dfd 100644 --- a/configs/config.json.optimizer.example +++ b/configs/config.json.optimizer.example @@ -226,8 +226,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/configs/config.json.path.example b/configs/config.json.path.example index f10dc67d4c..a85bd7d0bb 100644 --- a/configs/config.json.path.example +++ b/configs/config.json.path.example @@ -161,8 +161,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/configs/config.json.pokemon.example b/configs/config.json.pokemon.example index 55a66730cb..5115f9986f 100644 --- a/configs/config.json.pokemon.example +++ b/configs/config.json.pokemon.example @@ -168,8 +168,8 @@ }, "walk_max": 4.16, "walk_min": 2.16, - "alt_min": 0.75, - "alt_max": 2.5, + "alt_min": 500, + "alt_max": 1000, "debug": false, "test": false, "health_record": true, diff --git a/pokecli.py b/pokecli.py index dad05a6276..e4489487e3 100644 --- a/pokecli.py +++ b/pokecli.py @@ -497,7 +497,7 @@ def _json_loader(filename): long_flag="--alt_min", help="Minimum random altitude", type=float, - default=0.75 + default=500 ) add_config( parser, @@ -505,7 +505,7 @@ def _json_loader(filename): long_flag="--alt_max", help="Maximum random altitude", type=float, - default=2.5 + default=1000 ) # Start to parse other attrs config = parser.parse_args() diff --git a/pokemongo_bot/__init__.py b/pokemongo_bot/__init__.py index cde856e6da..ae1fed76a3 100644 --- a/pokemongo_bot/__init__.py +++ b/pokemongo_bot/__init__.py @@ -40,7 +40,7 @@ class PokemonGoBot(Datastore): @property def position(self): - return self.api._position_lat, self.api._position_lng, 0 + return self.api._position_lat, self.api._position_lng, self.api._position_alt @position.setter def position(self, position_tuple): @@ -571,7 +571,7 @@ def update_web_location(self, cells=[], lat=None, lng=None, alt=None): if lng is None: lng = self.api._position_lng if alt is None: - alt = 0 + alt = self.api._position_alt if cells == []: location = self.position[0:2]