Update sumorobot.js

This commit is contained in:
Silver Kuusik 2018-06-30 17:54:59 +02:00 committed by GitHub
parent 4845e90e5c
commit 4ca87e89c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ var hotkeys = true;
var remoteControl = false;
/* the local/remote server URL */
//var robotServer = "10.42.0.1";
var robotServer = "achex.ca:4010";
var robotServer = "ws.achex.ca:4010";
/* ace editor object */
var codingEditor = null;
@ -518,11 +518,11 @@ window.onload = function() {
/* if we are in coding mode */
if (codingEnabled) {
/* send the code from the textarea to the SumoRobot */
sumorobot.send("{'to':'sumo-" + robotId + "@00000514','cmd': 'code', 'val': '" + codingEditor.getValue() + "'});
sumorobot.send("{'to':'sumo-" + robotId + "@00000514','cmd': 'code', 'val': '" + codingEditor.getValue() + "'}");
/* otherwise when we are in Blockly mode */
} else {
/* send the code from the blocks to the SumoRobot */
sumorobot.send("{'to':'sumo-" + robotId + "@00000514','cmd': 'code', 'val': '" + sumocode + "'});
sumorobot.send("{'to':'sumo-" + robotId + "@00000514','cmd': 'code', 'val': '" + sumocode + "'}");
}
});