Skip to content

Commit

Permalink
BF: Explicitly set timeout awaiting mode confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
todd committed Jul 18, 2024
1 parent 57c1a1b commit 8ba8717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psychopy_bbtk/tpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,11 @@ def setMode(self, mode):
self._mode = mode
# exit out of whatever mode we're in (effectively set it to 0)
self.com.write(b"X")
self.awaitResponse()
self.awaitResponse(timeout=0.1)
if mode > 0:
# set mode
self.sendMessage(f"MOD{mode}")
self.awaitResponse()
self.awaitResponse(timeout=0.1)

def getMode(self):
return self._mode
Expand Down

0 comments on commit 8ba8717

Please sign in to comment.