diff --git a/psychopy_cedrus/base.py b/psychopy_cedrus/base.py index b79a4f2..11c73ac 100644 --- a/psychopy_cedrus/base.py +++ b/psychopy_cedrus/base.py @@ -290,8 +290,8 @@ def _setThreshold(self, threshold, channel=0): return # store value self._threshold = threshold - # convert from base 16 - thr = threshold / 255 * 100 + # convert from base 16 integer to ASCII character + thr = chr(int(threshold / 255 * 100)) # get channel selector selector = self.selectors[channel] # send command @@ -494,8 +494,8 @@ def _setThreshold(self, threshold, channel=None): return # store value self._threshold = threshold - # convert from base 16 - thr = int(threshold / 255 * 100) + # convert from base 16 integer to ASCII character + thr = chr(int(threshold / 255 * 100)) # send command self.parent.xid.con.send_xid_command(f"itM{thr}") # dispatch