Skip to content

Commit

Permalink
FF: Photodiode needs a brief pause to settle after setting threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons committed Oct 2, 2024
1 parent d1ca8c1 commit a20d01d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions psychopy_cedrus/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from psychopy.hardware.manager import deviceManager, DeviceManager, ManagedDeviceError
from psychopy import logging, layout, __version__ as ppyVersion
import pyxid2
import time
from packaging.version import Version


Expand Down Expand Up @@ -74,6 +75,8 @@ def _setThreshold(self, threshold, channel=0):
selector = self.selectors[channel]
# send command
self.parent.xid.con.send_xid_command(f"it{selector}{thr}")
# brief pause to settle
time.sleep(0.03)
# dispatch
self.dispatchMessages()
# return True/False according to state
Expand Down

0 comments on commit a20d01d

Please sign in to comment.