Skip to content

Commit

Permalink
NF: Add Lumina support
Browse files Browse the repository at this point in the history
  • Loading branch information
TEParsons committed Nov 27, 2024
1 parent 322a364 commit e0ac4ed
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
28 changes: 28 additions & 0 deletions psychopy_cedrus/components/lumina.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from psychopy.experiment.components.buttonBox import ButtonBoxComponent
from psychopy.experiment.plugins import DeviceBackend
from psychopy.localization import _translate
from . import util


class LuminaButtonBoxBackend(DeviceBackend):
key = "lumina"
label = _translate("Cedrus Lumina Series")
component = ButtonBoxComponent
deviceClasses = ["psychopy_cedrus.lumina.LuminaButtonGroup"]

def getParams(self):
return util.getXidButtonBoxParams(key="lumina")

def addRequirements(self: ButtonBoxComponent):
self.exp.requireImport(
importName="lumina",
importFrom="psychopy_cedrus"
)

def writeDeviceCode(self, buff):
return util.writeXidButtonBoxCode(
self,
buff,
cls="psychopy_cedrus.lumina.LuminaButtonGroup",
key="lumina"
)
9 changes: 9 additions & 0 deletions psychopy_cedrus/lumina.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from psychopy_cedrus.base import BaseXidDevice, BaseXidButtonGroup, BaseXidPhotodiodeGroup, BaseXidVoiceKeyGroup


class LuminaDevice(BaseXidDevice):
productId = b"0"


class LuminaButtonGroup(BaseXidButtonGroup):
parentCls = LuminaDevice

0 comments on commit e0ac4ed

Please sign in to comment.