-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TEParsons
committed
Nov 27, 2024
1 parent
322a364
commit e0ac4ed
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |