forked from marva/sumorobot-web
remove console logs
This commit is contained in:
parent
34352bf1a6
commit
58fcaa8245
@ -40,7 +40,6 @@ Sumorobot.prototype.connect = function() {
|
|||||||
};
|
};
|
||||||
// When the WebSocket closes
|
// When the WebSocket closes
|
||||||
this.websocket.onclose = function(evt) {
|
this.websocket.onclose = function(evt) {
|
||||||
console.log("INFO websocket disconnected");
|
|
||||||
// Clear the pinging
|
// Clear the pinging
|
||||||
clearInterval(self.watchdogTimer);
|
clearInterval(self.watchdogTimer);
|
||||||
// Try to recnnect to the sumorobot
|
// Try to recnnect to the sumorobot
|
||||||
@ -72,10 +71,8 @@ Sumorobot.prototype.send = function(msg, val) {
|
|||||||
// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
|
// https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
|
||||||
if (this.websocket.readyState == 1) {
|
if (this.websocket.readyState == 1) {
|
||||||
if (val === 'undefined') {
|
if (val === 'undefined') {
|
||||||
console.log("no val")
|
|
||||||
this.websocket.send(`{"to": "sumo-${this.robotId}@00000514", "cmd": "${msg}"}`);
|
this.websocket.send(`{"to": "sumo-${this.robotId}@00000514", "cmd": "${msg}"}`);
|
||||||
} else {
|
} else {
|
||||||
console.log("val")
|
|
||||||
this.websocket.send(`{"to": "sumo-${this.robotId}@00000514", "cmd": "${msg}", "val": "${val}"}`);
|
this.websocket.send(`{"to": "sumo-${this.robotId}@00000514", "cmd": "${msg}", "val": "${val}"}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user