Skip to content

Commit

Permalink
Allow empty inputs in pico run method.
Browse files Browse the repository at this point in the history
  • Loading branch information
DocGarbanzo committed May 6, 2024
1 parent a735c39 commit 95b3d7b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions donkeycar/parts/pico.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def run_threaded(self, *inputs):
"""
Donkey parts interface
"""
# allow receiving no data and just returning the current state
if not inputs:
return self.receive_dict.values()
assert len(inputs) == self.num_inputs, \
f"Expected {self.num_inputs} inputs but received {len(inputs)}"
for k in self.send_dict.keys():
Expand Down

0 comments on commit 95b3d7b

Please sign in to comment.