Skip to content
Permalink
Browse files

BF: iohub PstBox P3 compat

- needs testing / verificatiuon.
  • Loading branch information...
isolver authored and peircej committed Sep 15, 2019
1 parent d115e63 commit da83429d61a8b7dfc72033e964542b899bef8874
Showing with 2 additions and 1 deletion.
  1. +2 −1 psychopy/iohub/devices/serial/__init__.py
@@ -5,6 +5,7 @@
import serial
import sys
import numpy as N
import struct
from ... import EXP_SCRIPT_DIRECTORY
from .. import Device, DeviceEvent, Computer
from ...errors import print2err, printExceptionDetailsToStdErr
@@ -546,7 +547,7 @@ def _update_state(self):
# Convert the new state into a bitmask, collapse it into a
# single byte and send it to the response box.
state_bits = (2**N.arange(8))[state]
self.write(chr(N.sum(state_bits)))
self.write(struct.pack("B",(N.sum(state_bits))))

# Set the `update lamp` bit to LOW again.
state[6] = False

0 comments on commit da83429

Please sign in to comment.
You can’t perform that action at this time.