forked from marva/sumorobot-web
Update sumorobot.js
This commit is contained in:
parent
4845e90e5c
commit
4ca87e89c0
@ -4,7 +4,7 @@ var hotkeys = true;
|
|||||||
var remoteControl = false;
|
var remoteControl = false;
|
||||||
/* the local/remote server URL */
|
/* the local/remote server URL */
|
||||||
//var robotServer = "10.42.0.1";
|
//var robotServer = "10.42.0.1";
|
||||||
var robotServer = "achex.ca:4010";
|
var robotServer = "ws.achex.ca:4010";
|
||||||
|
|
||||||
/* ace editor object */
|
/* ace editor object */
|
||||||
var codingEditor = null;
|
var codingEditor = null;
|
||||||
@ -518,11 +518,11 @@ window.onload = function() {
|
|||||||
/* if we are in coding mode */
|
/* if we are in coding mode */
|
||||||
if (codingEnabled) {
|
if (codingEnabled) {
|
||||||
/* send the code from the textarea to the SumoRobot */
|
/* 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 */
|
/* otherwise when we are in Blockly mode */
|
||||||
} else {
|
} else {
|
||||||
/* send the code from the blocks to the SumoRobot */
|
/* 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 + "'}");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user