Skip to content

Commit

Permalink
BF: Need to send X without eol as otherwise box will ignore next command
Browse files Browse the repository at this point in the history
  • Loading branch information
todd committed Jul 10, 2024
1 parent f514f07 commit af1d8e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions psychopy_bbtk/tpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,11 @@ def setMode(self, mode):
# store requested mode
self._mode = mode
# exit out of whatever mode we're in (effectively set it to 0)
self.sendMessage("X")
self.com.write(b"X")
# send an eol to make sure that X isn't stuck in the buffer
self.sendMessage("")
self.awaitResponse()
if mode > 0:
# the box needs to pause after resetting in order to then be set again
self.pause()
# set mode
self.sendMessage(f"MOD{mode}")
self.awaitResponse()
Expand Down

0 comments on commit af1d8e5

Please sign in to comment.