Skip to content

Commit

Permalink
Merge pull request #5069 from PokemonGoF/dev
Browse files Browse the repository at this point in the history
Dev merge to master
  • Loading branch information
solderzzc authored Sep 1, 2016
2 parents 8b269b2 + a71bbbe commit 4269c79
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
18 changes: 12 additions & 6 deletions map-chat/javascript/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ var topic = urlHashTopic ? urlHashTopic : "pgomapcatch/chat";

function initialiseEventBus(){
window.client = mqtt.connect('ws://broker.pikabot.org',{
reconnectPeriod:10*1000
reconnectPeriod:60*1000
});
client.subscribe("pgomapcatch/#");
client.subscribe("pgochat/chat");
client.on("connect", function(err,res){
client.subscribe("pgomapcatch/#");
client.subscribe("pgochat/chat");
})
client.on("disconnect", function(err,res){
client.unsubscribe("pgomapcatch/#");
client.unsubscribe("pgochat/chat");
})
client.on("message", function (topic, payload) {
//Materialize.toast(payload, 4000);
if (topic === 'pgochat/chat') {
Expand Down Expand Up @@ -105,9 +111,9 @@ $(document).ready(function () {
Materialize.toast(shareAccurateLocation ? 'Sharing Your Accurate Location' : 'Sharing Your Fuzzy Location', 3000);
});

if (topic != "main") {
/*if (topic != "main") {
Materialize.toast("Private chat map - " + topic, 5000);
}
}*/

Materialize.toast("New: Click a user dot to mute it!", 7000);
//Materialize.toast("News: Server Over Load since the huge traffic ... ", 7000);
});
12 changes: 10 additions & 2 deletions map-chat/javascript/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@ function initialize() {
var mapDiv = document.getElementById('map-canvas');
map = new google.maps.Map(mapDiv, mapOptions);

navigator.geolocation.getCurrentPosition(onFirstPosition, onPositionError, locationOptions);
initialiseEventBus();

//navigator.geolocation.getCurrentPosition(onFirstPosition, onPositionError, locationOptions);

onFirstPosition({
"coords": {
latitude: parseFloat(0.1),
longitude: parseFloat(0.1)
}
});
}

function onFirstPosition(position) {
setUserLocation(position.coords.latitude, position.coords.longitude);
initialiseEventBus();
map.panTo(userLocation);
var message = {};
message.lat = position.coords.latitude;
Expand Down
2 changes: 1 addition & 1 deletion pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _json_loader(filename):
load,
short_flag="-wsr",
long_flag="--websocket.remote_control",
help="Enable remote control through websocket (requires websocekt server url)",
help="Enable remote control through websocket (requires websocket server url)",
default=False
)
add_config(
Expand Down
2 changes: 1 addition & 1 deletion pokemongo_bot/cell_workers/transfer_pokemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _validate_keep_best_config_custom(self, pokemon_name, keep_best_possible_cus
if keep_best_custom and keep_amount:
keep_best = True

keep_best_custom = keep_best_custom.split(',')
keep_best_custom = keep_best_custom.replace(' ','').split(',')
for _str in keep_best_custom:
if _str not in keep_best_possible_custom:
keep_best = False
Expand Down
2 changes: 1 addition & 1 deletion web
Submodule web updated 3 files
+3 −0 README.md
+6 −2 css/main.css
+361 −15 js/main.js

0 comments on commit 4269c79

Please sign in to comment.