Skip to content

Commit

Permalink
rearranged control flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ashum68 committed Jun 23, 2024
1 parent ce1e489 commit ecccca2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions modules/flight_interface/flight_interface_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ def flight_interface_worker(

time.sleep(period)

command = None
result, value = interface.run()
if not result:
continue

try:
command: decision_command.DecisionCommand = command_in_queue.queue.get_nowait()
interface.run_decision_handler(command)
except queue.Empty:
pass

result, value = interface.run()
if not result:
continue

interface.run_decision_handler(command)

odometry_out_queue.queue.put(value)

0 comments on commit ecccca2

Please sign in to comment.