Skip to content

Commit

Permalink
fix error that 'ser' was referenced before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Scattolin committed Jan 20, 2024
1 parent 9f84c8d commit 897202a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def send_queued_commands():
device_range = range(4)

def receive_message():
global ser

for device in device_range:
if not local_mode:
if device == SCIENCE_SELECTED:
Expand Down Expand Up @@ -195,6 +197,8 @@ def receive_message():
print(e)

def send_command(command_name, args, deviceToSendTo):
global ser

command = get_command(command_name, deviceToSendTo)
if ser is not None and command is not None:
commandID = command[1]
Expand Down

0 comments on commit 897202a

Please sign in to comment.