Skip to content

Commit

Permalink
Merge pull request #90 from knorth55/add-port
Browse files Browse the repository at this point in the history
[rwt_image_view] add port arguments in rwt_utils
  • Loading branch information
k-okada authored Jun 25, 2020
2 parents 263b11b + d148ec5 commit 2504cd0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rwt_image_view/www/js/multi_image_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $(function() {


var ros = new ROSLIB.Ros();
ros.install_config_button("config-button");
ros.install_config_button("config-button", true, 9090);

ros.on("connection", function() {
ros.getTopicsForType('sensor_msgs/Image', function(image_topics) {
Expand Down
2 changes: 1 addition & 1 deletion rwt_image_view/www/js/rwt_image_view_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $(function() {


var ros = new ROSLIB.Ros();
ros.install_config_button("config-button");
ros.install_config_button("config-button", true, 9090);

ros.on("connection", function() {
ros.getTopicsForType('sensor_msgs/Image', function(image_topics) {
Expand Down
4 changes: 2 additions & 2 deletions rwt_utils_3rdparty/www/rwt_utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect) {
ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect, port=8888) {
var auto_connect = typeof auto_connect !== 'undefined' ? auto_connect : true;
var that = this;
var parent = document.getElementById(id);
Expand Down Expand Up @@ -52,7 +52,7 @@ ROSLIB.Ros.prototype.install_config_button = function(id, auto_connect) {
input.type = "text";
input.pattern = "^wss?://[a-zA-Z0-9\-\._]+:[0-9]+/$";
input.required = true;
input.value = "ws://" + location.hostname + ":8888/";
input.value = "ws://" + location.hostname + ":" + port + "/";
input.setAttribute("class", "form-control");
input.setAttribute("placeholder", "ROS WS Master URI");
// input.setAttribute("aria-label", "ROS WS Master URI");
Expand Down

0 comments on commit 2504cd0

Please sign in to comment.