Skip to content

Commit

Permalink
Changed function names to make more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
nicktrem committed Mar 13, 2024
1 parent ecdf600 commit 059c6d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion robot_log_visualizer/file_reader/signal_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def __populateRealtimeLoggerMetadata(self, rawData, keys, value):
self.__populateRealtimeLoggerMetadata(rawData[keys[0]], keys[1:], value)


def establish_connection(self):
def maintain_connection(self):
if not self.realtimeNetworkInit:
yarp.Network.init()

Expand Down
8 changes: 4 additions & 4 deletions robot_log_visualizer/ui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,9 +694,9 @@ def open_mat_file(self):
if file_name:
self.__load_mat_file(file_name)

def maintain_connection(self, root):
def establish_connection(self, root):
while self.realtimeConnectionEnabled:
if not self.signal_provider.establish_connection():
if not self.signal_provider.maintain_connection():
self.realtimeConnectionEnabled = False
break

Expand Down Expand Up @@ -731,7 +731,7 @@ def connect_realtime_logger(self):
print("Now connecting for real-time logging")

# Do initial connection to populate the necessary data
if not self.signal_provider.establish_connection():
if not self.signal_provider.maintain_connection():
print("Could not connect to YARP server, closing")
self.realtimeConnectionEnabled = False
return
Expand Down Expand Up @@ -764,7 +764,7 @@ def connect_realtime_logger(self):
# Disable these buttons for RT communication
self.ui.startButton.setEnabled(False)
self.ui.timeSlider.setEnabled(False)
self.networkThread = threading.Thread(target=self.maintain_connection, args=(root,))
self.networkThread = threading.Thread(target=self.establish_connection, args=(root,))
self.networkThread.start()


Expand Down

0 comments on commit 059c6d6

Please sign in to comment.