Skip to content

Commit

Permalink
add title parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dheera committed Jun 20, 2024
1 parent dc169eb commit 7cf63fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rosboard/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def open(self):
ROSBoardSocketHandler.sockets.add(self)

self.write_message(json.dumps([ROSBoardSocketHandler.MSG_SYSTEM, {
"hostname": socket.gethostname(),
"hostname": self.node.title,
"version": __version__,
}], separators=(',', ':')))

Expand Down
2 changes: 2 additions & 0 deletions rosboard/rosboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import asyncio
import importlib
import os
import socket
import threading
import time
import tornado, tornado.web, tornado.websocket
Expand Down Expand Up @@ -32,6 +33,7 @@ def __init__(self, node_name = "rosboard_node"):
self.__class__.instance = self
rospy.init_node(node_name)
self.port = rospy.get_param("~port", 8888)
self.title = rospy.get_param("~title", socket.gethostname())

# desired subscriptions of all the websockets connecting to this instance.
# these remote subs are updated directly by "friend" class ROSBoardSocketHandler.
Expand Down

0 comments on commit 7cf63fb

Please sign in to comment.