Skip to content

Commit

Permalink
Merge pull request #26 from TEParsons/main-bf-selector-msg
Browse files Browse the repository at this point in the history
BF: Accept new selector-based message structure
  • Loading branch information
TEParsons authored Jan 22, 2025
2 parents 9f69b1f + ca0f2b6 commit 57afb35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions psychopy_cedrus/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ def dispatchMessages(self):
# these we need to distinguish from keys
if resp['key'] not in node.keys:
continue
# if device refers to a node by selector, send to that node
if isinstance(resp['port'], bytes):
if resp['port'].decode() in self.selectors:
if resp['port'].decode() not in node.selectors:
continue
# dispatch to node
message = node.parseMessage(resp)
node.receiveMessage(message)
Expand Down

0 comments on commit 57afb35

Please sign in to comment.