221 lines
6.0 KiB
Python
221 lines
6.0 KiB
Python
"""Default configuration of pots and sliders for each target."""
|
|
|
|
POT_CONFIG = {
|
|
"boxer": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"P3": {"default": "MULTIPOS"}
|
|
},
|
|
"el18": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"nv14": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"pl18": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"},
|
|
"P3": {"default": "POT"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"pl18ev": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"},
|
|
"EXT1": {"default": "POT_CENTER"},
|
|
"EXT2": {"default": "POT_CENTER"},
|
|
"EXT3": {"default": "MULTIPOS"},
|
|
"EXT4": {"default": "MULTIPOS"}
|
|
},
|
|
"mt12": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"},
|
|
"P3": {"default": "NONE"},
|
|
"P4": {"default": "NONE"}
|
|
},
|
|
"tpro": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"tprov2": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"t20": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"},
|
|
"SL3": {"default": "SLIDER"},
|
|
"SL4": {"default": "SLIDER"},
|
|
},
|
|
"t20v2": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"},
|
|
"SL3": {"default": "SLIDER"},
|
|
"SL4": {"default": "SLIDER"},
|
|
},
|
|
"t12": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"}
|
|
},
|
|
"t14": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"tx12": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"tx12mk2": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"t15": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
},
|
|
"t16": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"t18": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"tx16s": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"f16": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x7": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"x7access": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT_CENTER"}
|
|
},
|
|
"x9d": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x9d+": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x9d+2019": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x9e": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
"P2": {"default": "POT_CENTER"},
|
|
"P3": {"default": "NONE"},
|
|
"P4": {"default": "NONE"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"},
|
|
"SL3": {"default": "SLIDER"},
|
|
"SL4": {"default": "SLIDER"}
|
|
},
|
|
"x10": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x10express": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"}
|
|
},
|
|
"x12s": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "MULTIPOS"},
|
|
"P3": {"default": "POT_CENTER"},
|
|
"SL1": {"default": "SLIDER"},
|
|
"SL2": {"default": "SLIDER"},
|
|
"SL3": {"default": "SLIDER"},
|
|
"SL4": {"default": "SLIDER"},
|
|
"JSx": {"default": "AXIS_X"},
|
|
"JSy": {"default": "AXIS_Y"}
|
|
},
|
|
"xlite": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"}
|
|
},
|
|
"xlites": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"}
|
|
},
|
|
"x9lite": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
},
|
|
"x9lites": {
|
|
"P1": {"default": "POT_CENTER"},
|
|
},
|
|
"zorro": {
|
|
"P1": {"default": "POT"},
|
|
"P2": {"default": "POT"}
|
|
},
|
|
"pocket": {
|
|
"P1": {"default": "POT"}
|
|
},
|
|
}
|
|
|
|
|
|
def pot_cfg_by_target(target, name):
|
|
"""Retrieve default pot config.
|
|
|
|
Parameters
|
|
----------
|
|
target: str
|
|
Name of the target
|
|
name: str
|
|
Canonical name of the pot (Px where 'x' is a number)
|
|
or slider (SLx where 'x' is a number)
|
|
|
|
Returns
|
|
-------
|
|
dict
|
|
a dictionary with one key for each pot or slider that mapped
|
|
to another dictionary with a single attribute ("default") containing
|
|
the default configuration for a pot or slider
|
|
"""
|
|
sw = POT_CONFIG.get(target)
|
|
if sw:
|
|
return sw.get(name)
|
|
|
|
return None
|