backend/js/ros_scripts.js: changes to clearing ros.nodes and ros.topics arrays
This commit is contained in:
@@ -31,8 +31,8 @@ ros.on('connection', function() {
|
|||||||
document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connected';
|
document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connected';
|
||||||
document.getElementById("ConnectionButton").className = "btn btn-success"
|
document.getElementById("ConnectionButton").className = "btn btn-success"
|
||||||
|
|
||||||
ros.nodes = [];
|
ros.nodes = Array();
|
||||||
ros.topics = [];
|
ros.topics = Array();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -43,8 +43,8 @@ ros.on('close', function() {
|
|||||||
document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed';
|
document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed';
|
||||||
document.getElementById("ConnectionButton").className = "btn btn-warning"
|
document.getElementById("ConnectionButton").className = "btn btn-warning"
|
||||||
document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connection closed';
|
document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connection closed';
|
||||||
ros.nodes = [];
|
ros.nodes = Array();
|
||||||
ros.topics = [];
|
ros.topics = Array();
|
||||||
});
|
});
|
||||||
// Create a connection to the rosbridge WebSocket server.
|
// Create a connection to the rosbridge WebSocket server.
|
||||||
ros.connect(ros.connectionName);
|
ros.connect(ros.connectionName);
|
||||||
|
|||||||
Reference in New Issue
Block a user