Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Dec 1, 2024
1 parent 870b3c1 commit 90a88d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hudes/hudes_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ def process_common_keys(self, event):

def run_loop(self):
self.before_first_loop()
first_loop = True
while self.hudes_websocket_client.running:
self.before_pg_event()
redraw = False
Expand All @@ -348,8 +349,9 @@ def run_loop(self):
redraw |= self.process_key_press(event)

redraw |= self.receive_messages()
if redraw:
if redraw or first_loop:
self.view.draw()
first_loop = False
else:
sleep(0.01)

Expand All @@ -359,6 +361,7 @@ def receive_messages(self):
received_batch = False
received_val = False
while self.hudes_websocket_client.recv_ready():
logging.debug("RECV MESSXX")
received_message = True
raw_msg = self.hudes_websocket_client.recv_msg()
msg = hudes_pb2.Control()
Expand Down

0 comments on commit 90a88d4

Please sign in to comment.