mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-10 15:58:06 +00:00
aux/bindings: Replace "feature" with "component"
This commit is contained in:
parent
d0cdb8fcd3
commit
47801859e7
src/xrt/auxiliary/bindings
|
@ -12,7 +12,7 @@
|
|||
"/input/select": {
|
||||
"type": "button",
|
||||
"localized_name": "Select",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_SIMPLE_SELECT_CLICK"
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_SIMPLE_MENU_CLICK"
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_SIMPLE_GRIP_POSE"
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_SIMPLE_AIM_POSE"
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_SIMPLE_VIBRATION"
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
|||
"/input/select": {
|
||||
"type": "button",
|
||||
"localized_name": "Select",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_DAYDREAM_BAR_CLICK"
|
||||
}
|
||||
|
@ -72,7 +72,7 @@
|
|||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"features": ["touch", "click", "position"],
|
||||
"components": ["touch", "click", "position"],
|
||||
"monado_bindings": {
|
||||
"touch": "XRT_INPUT_DAYDREAM_TOUCHPAD_TOUCH",
|
||||
"click": "XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK",
|
||||
|
@ -82,7 +82,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_DAYDREAM_POSE"
|
||||
}
|
||||
|
@ -90,7 +90,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_DAYDREAM_POSE"
|
||||
}
|
||||
|
@ -110,7 +110,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVE_SYSTEM_CLICK"
|
||||
}
|
||||
|
@ -118,7 +118,7 @@
|
|||
"/input/squeeze": {
|
||||
"type": "button",
|
||||
"localized_name": "Squeeze",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVE_SQUEEZE_CLICK"
|
||||
}
|
||||
|
@ -126,7 +126,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVE_MENU_CLICK"
|
||||
}
|
||||
|
@ -134,7 +134,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["click", "value"],
|
||||
"components": ["click", "value"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVE_TRIGGER_CLICK",
|
||||
"value": "XRT_INPUT_VIVE_TRIGGER_VALUE"
|
||||
|
@ -143,7 +143,7 @@
|
|||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"features": ["click", "touch", "position"],
|
||||
"components": ["click", "touch", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVE_TRACKPAD_CLICK",
|
||||
"touch": "XRT_INPUT_VIVE_TRACKPAD_TOUCH",
|
||||
|
@ -153,7 +153,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_VIVE_GRIP_POSE"
|
||||
}
|
||||
|
@ -161,7 +161,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_VIVE_AIM_POSE"
|
||||
}
|
||||
|
@ -169,7 +169,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_VIVE_HAPTIC"
|
||||
}
|
||||
|
@ -188,7 +188,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVEPRO_SYSTEM_CLICK"
|
||||
}
|
||||
|
@ -196,7 +196,7 @@
|
|||
"/input/volume_up": {
|
||||
"type": "button",
|
||||
"localized_name": "Volume Up",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVEPRO_VOLUP_CLICK"
|
||||
}
|
||||
|
@ -204,7 +204,7 @@
|
|||
"/input/volume_down": {
|
||||
"type": "button",
|
||||
"localized_name": "Volume Down",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVEPRO_VOLDN_CLICK"
|
||||
}
|
||||
|
@ -212,7 +212,7 @@
|
|||
"/input/mute_mic": {
|
||||
"type": "button",
|
||||
"localized_name": "Mute Microphone",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_VIVEPRO_MUTE_MIC_CLICK"
|
||||
}
|
||||
|
@ -232,7 +232,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_WMR_MENU_CLICK"
|
||||
}
|
||||
|
@ -240,7 +240,7 @@
|
|||
"/input/squeeze": {
|
||||
"type": "button",
|
||||
"localized_name": "Squeeze",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_WMR_SQUEEZE_CLICK"
|
||||
}
|
||||
|
@ -248,7 +248,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_WMR_TRIGGER_VALUE"
|
||||
}
|
||||
|
@ -256,7 +256,7 @@
|
|||
"/input/thumbstick": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Thumbstick",
|
||||
"features": ["click", "position"],
|
||||
"components": ["click", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_WMR_THUMBSTICK_CLICK",
|
||||
"position": "XRT_INPUT_WMR_THUMBSTICK"
|
||||
|
@ -265,7 +265,7 @@
|
|||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"features": ["click", "touch", "position"],
|
||||
"components": ["click", "touch", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_WMR_TRACKPAD_CLICK",
|
||||
"touch": "XRT_INPUT_WMR_TRACKPAD_TOUCH",
|
||||
|
@ -275,7 +275,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_WMR_GRIP_POSE"
|
||||
}
|
||||
|
@ -283,7 +283,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_WMR_AIM_POSE"
|
||||
}
|
||||
|
@ -291,7 +291,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_WMR_HAPTIC"
|
||||
}
|
||||
|
@ -310,7 +310,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_MENU_CLICK"
|
||||
}
|
||||
|
@ -318,7 +318,7 @@
|
|||
"/input/view": {
|
||||
"type": "button",
|
||||
"localized_name": "View",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_VIEW_CLICK"
|
||||
}
|
||||
|
@ -326,7 +326,7 @@
|
|||
"/input/a": {
|
||||
"type": "button",
|
||||
"localized_name": "A",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_A_CLICK"
|
||||
}
|
||||
|
@ -334,7 +334,7 @@
|
|||
"/input/b": {
|
||||
"type": "button",
|
||||
"localized_name": "B",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_B_CLICK"
|
||||
}
|
||||
|
@ -342,7 +342,7 @@
|
|||
"/input/x": {
|
||||
"type": "button",
|
||||
"localized_name": "X",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_X_CLICK"
|
||||
}
|
||||
|
@ -350,7 +350,7 @@
|
|||
"/input/y": {
|
||||
"type": "button",
|
||||
"localized_name": "Y",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_Y_CLICK"
|
||||
}
|
||||
|
@ -358,7 +358,7 @@
|
|||
"/input/dpad_down": {
|
||||
"type": "button",
|
||||
"localized_name": "DPAD down",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_DPAD_DOWN_CLICK"
|
||||
}
|
||||
|
@ -366,7 +366,7 @@
|
|||
"/input/dpad_right": {
|
||||
"type": "button",
|
||||
"localized_name": "DPAD right",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_DPAD_RIGHT_CLICK"
|
||||
}
|
||||
|
@ -374,7 +374,7 @@
|
|||
"/input/dpad_up": {
|
||||
"type": "button",
|
||||
"localized_name": "DPAD up",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_DPAD_UP_CLICK"
|
||||
}
|
||||
|
@ -382,7 +382,7 @@
|
|||
"/input/dpad_left": {
|
||||
"type": "button",
|
||||
"localized_name": "DPAD left",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_DPAD_LEFT_CLICK"
|
||||
}
|
||||
|
@ -390,7 +390,7 @@
|
|||
"/input/shoulder_left": {
|
||||
"type": "button",
|
||||
"localized_name": "Shoulder left",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_SHOULDER_LEFT_CLICK"
|
||||
}
|
||||
|
@ -398,7 +398,7 @@
|
|||
"/input/shoulder_right": {
|
||||
"type": "button",
|
||||
"localized_name": "Shoulder right",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_SHOULDER_RIGHT_CLICK"
|
||||
}
|
||||
|
@ -406,7 +406,7 @@
|
|||
"/input/thumbstick_left": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Left Thumbstick",
|
||||
"features": ["click", "position"],
|
||||
"components": ["click", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_THUMBSTICK_LEFT_CLICK",
|
||||
"position": "XRT_INPUT_XBOX_THUMBSTICK_LEFT"
|
||||
|
@ -415,7 +415,7 @@
|
|||
"/input/thumbstick_right": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Right Thumbstick",
|
||||
"features": ["click", "position"],
|
||||
"components": ["click", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_XBOX_THUMBSTICK_RIGHT_CLICK",
|
||||
"position": "XRT_INPUT_XBOX_THUMBSTICK_RIGHT"
|
||||
|
@ -424,7 +424,7 @@
|
|||
"/input/trigger_left": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Left Trigger",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_XBOX_LEFT_TRIGGER_VALUE"
|
||||
}
|
||||
|
@ -432,7 +432,7 @@
|
|||
"/input/trigger_right": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Right Trigger",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_XBOX_RIGHT_TRIGGER_VALUE"
|
||||
}
|
||||
|
@ -440,7 +440,7 @@
|
|||
"/output/haptic_left": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Left Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT"
|
||||
}
|
||||
|
@ -448,7 +448,7 @@
|
|||
"/output/haptic_right": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Right Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHT"
|
||||
}
|
||||
|
@ -456,7 +456,7 @@
|
|||
"/output/haptic_left_trigger": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Left Trigger Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT_TRIGGER"
|
||||
}
|
||||
|
@ -464,7 +464,7 @@
|
|||
"/output/haptic_right_trigger": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Right Trigger Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHT_TRIGGER"
|
||||
}
|
||||
|
@ -484,7 +484,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_GO_SYSTEM_CLICK"
|
||||
}
|
||||
|
@ -492,7 +492,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "button",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_GO_TRIGGER_CLICK"
|
||||
}
|
||||
|
@ -500,7 +500,7 @@
|
|||
"/input/back": {
|
||||
"type": "button",
|
||||
"localized_name": "Back",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_GO_BACK_CLICK"
|
||||
}
|
||||
|
@ -508,7 +508,7 @@
|
|||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"features": ["click", "touch", "position"],
|
||||
"components": ["click", "touch", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_GO_TRACKPAD_CLICK",
|
||||
"touch": "XRT_INPUT_GO_TRACKPAD_TOUCH",
|
||||
|
@ -518,7 +518,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_GO_GRIP_POSE"
|
||||
}
|
||||
|
@ -526,7 +526,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_GO_AIM_POSE"
|
||||
}
|
||||
|
@ -546,7 +546,7 @@
|
|||
"/input/x": {
|
||||
"type": "button",
|
||||
"localized_name": "X",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"side": "left",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_X_CLICK",
|
||||
|
@ -556,7 +556,7 @@
|
|||
"/input/y": {
|
||||
"type": "button",
|
||||
"localized_name": "Y",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"side": "left",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_Y_CLICK",
|
||||
|
@ -566,7 +566,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"side": "left",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_MENU_CLICK"
|
||||
|
@ -575,7 +575,7 @@
|
|||
"/input/a": {
|
||||
"type": "button",
|
||||
"localized_name": "A",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"side": "right",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_A_CLICK",
|
||||
|
@ -585,7 +585,7 @@
|
|||
"/input/b": {
|
||||
"type": "button",
|
||||
"localized_name": "B",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"side": "right",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_B_CLICK",
|
||||
|
@ -595,7 +595,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"side": "right",
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_SYSTEM_CLICK"
|
||||
|
@ -604,7 +604,7 @@
|
|||
"/input/squeeze": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Squeeze",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_TOUCH_SQUEEZE_VALUE"
|
||||
}
|
||||
|
@ -612,7 +612,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["touch", "value"],
|
||||
"components": ["touch", "value"],
|
||||
"monado_bindings": {
|
||||
"touch": "XRT_INPUT_TOUCH_TRIGGER_TOUCH",
|
||||
"value": "XRT_INPUT_TOUCH_TRIGGER_VALUE"
|
||||
|
@ -621,7 +621,7 @@
|
|||
"/input/thumbstick": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Thumbstick",
|
||||
"features": ["click", "touch", "position"],
|
||||
"components": ["click", "touch", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_TOUCH_THUMBSTICK_CLICK",
|
||||
"touch": "XRT_INPUT_TOUCH_THUMBSTICK_TOUCH",
|
||||
|
@ -631,7 +631,7 @@
|
|||
"/input/thumbrest": {
|
||||
"type": "button",
|
||||
"localized_name": "Thumb Rest",
|
||||
"features": ["touch"],
|
||||
"components": ["touch"],
|
||||
"monado_bindings": {
|
||||
"touch": "XRT_INPUT_TOUCH_THUMBREST_TOUCH"
|
||||
}
|
||||
|
@ -639,7 +639,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_TOUCH_GRIP_POSE"
|
||||
}
|
||||
|
@ -647,7 +647,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_TOUCH_AIM_POSE"
|
||||
}
|
||||
|
@ -655,7 +655,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_TOUCH_HAPTIC"
|
||||
}
|
||||
|
@ -675,7 +675,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_INDEX_SYSTEM_CLICK",
|
||||
"touch": "XRT_INPUT_INDEX_SYSTEM_TOUCH"
|
||||
|
@ -684,7 +684,7 @@
|
|||
"/input/a": {
|
||||
"type": "button",
|
||||
"localized_name": "A",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_INDEX_A_CLICK",
|
||||
"touch": "XRT_INPUT_INDEX_A_TOUCH"
|
||||
|
@ -693,7 +693,7 @@
|
|||
"/input/b": {
|
||||
"type": "button",
|
||||
"localized_name": "B",
|
||||
"features": ["click", "touch"],
|
||||
"components": ["click", "touch"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_INDEX_B_CLICK",
|
||||
"touch": "XRT_INPUT_INDEX_B_TOUCH"
|
||||
|
@ -702,7 +702,7 @@
|
|||
"/input/squeeze": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Squeeze",
|
||||
"features": ["force", "value"],
|
||||
"components": ["force", "value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_INDEX_SQUEEZE_VALUE",
|
||||
"force": "XRT_INPUT_INDEX_SQUEEZE_FORCE"
|
||||
|
@ -711,7 +711,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["click", "touch", "value"],
|
||||
"components": ["click", "touch", "value"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_INDEX_TRIGGER_CLICK",
|
||||
"touch": "XRT_INPUT_INDEX_TRIGGER_TOUCH",
|
||||
|
@ -721,7 +721,7 @@
|
|||
"/input/thumbstick": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Thumbstick",
|
||||
"features": ["click", "touch", "position"],
|
||||
"components": ["click", "touch", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_INDEX_THUMBSTICK_CLICK",
|
||||
"touch": "XRT_INPUT_INDEX_THUMBSTICK_TOUCH",
|
||||
|
@ -731,7 +731,7 @@
|
|||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"features": ["touch", "force", "position"],
|
||||
"components": ["touch", "force", "position"],
|
||||
"monado_bindings": {
|
||||
"force": "XRT_INPUT_INDEX_TRACKPAD_FORCE",
|
||||
"touch": "XRT_INPUT_INDEX_TRACKPAD_TOUCH",
|
||||
|
@ -741,7 +741,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_INDEX_GRIP_POSE"
|
||||
}
|
||||
|
@ -749,7 +749,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_INDEX_AIM_POSE"
|
||||
}
|
||||
|
@ -757,7 +757,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_INDEX_HAPTIC"
|
||||
}
|
||||
|
@ -778,7 +778,7 @@
|
|||
"/input/select": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Select",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_HAND_SELECT_VALUE"
|
||||
}
|
||||
|
@ -786,7 +786,7 @@
|
|||
"/input/squeeze": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Squeeze",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_HAND_SQUEEZE_VALUE"
|
||||
}
|
||||
|
@ -794,7 +794,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_HAND_GRIP_POSE"
|
||||
}
|
||||
|
@ -802,7 +802,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_HAND_AIM_POSE"
|
||||
}
|
||||
|
@ -823,7 +823,7 @@
|
|||
"/input/system": {
|
||||
"type": "button",
|
||||
"localized_name": "System",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_PS_CLICK"
|
||||
}
|
||||
|
@ -831,7 +831,7 @@
|
|||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_MOVE_CLICK"
|
||||
}
|
||||
|
@ -839,7 +839,7 @@
|
|||
"/input/start": {
|
||||
"type": "button",
|
||||
"localized_name": "Start",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_START_CLICK"
|
||||
}
|
||||
|
@ -847,7 +847,7 @@
|
|||
"/input/select": {
|
||||
"type": "button",
|
||||
"localized_name": "Select",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_SELECT_CLICK"
|
||||
}
|
||||
|
@ -855,7 +855,7 @@
|
|||
"/input/square_mndx": {
|
||||
"type": "button",
|
||||
"localized_name": "Square",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_SQUARE_CLICK"
|
||||
}
|
||||
|
@ -863,7 +863,7 @@
|
|||
"/input/cross_mndx": {
|
||||
"type": "button",
|
||||
"localized_name": "Cross",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_CROSS_CLICK"
|
||||
}
|
||||
|
@ -871,7 +871,7 @@
|
|||
"/input/circle_mndx": {
|
||||
"type": "button",
|
||||
"localized_name": "Circle",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_CIRCLE_CLICK"
|
||||
}
|
||||
|
@ -879,7 +879,7 @@
|
|||
"/input/triangle_mndx": {
|
||||
"type": "button",
|
||||
"localized_name": "Triangle",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_PSMV_TRIANGLE_CLICK"
|
||||
}
|
||||
|
@ -887,7 +887,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_PSMV_TRIGGER_VALUE"
|
||||
}
|
||||
|
@ -895,7 +895,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_PSMV_GRIP_POSE"
|
||||
}
|
||||
|
@ -903,7 +903,7 @@
|
|||
"/input/ball_mndx": {
|
||||
"type": "pose",
|
||||
"localized_name": "Ball",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_PSMV_BALL_CENTER_POSE"
|
||||
}
|
||||
|
@ -911,7 +911,7 @@
|
|||
"/input/body_center_mndx": {
|
||||
"type": "pose",
|
||||
"localized_name": "Body Center",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_PSMV_BODY_CENTER_POSE"
|
||||
}
|
||||
|
@ -919,7 +919,7 @@
|
|||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "aim",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_PSMV_AIM_POSE"
|
||||
}
|
||||
|
@ -927,7 +927,7 @@
|
|||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"features": ["haptic"],
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION"
|
||||
}
|
||||
|
@ -948,7 +948,7 @@
|
|||
"/input/1": {
|
||||
"type": "button",
|
||||
"localized_name": "1",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_1_CLICK"
|
||||
}
|
||||
|
@ -956,7 +956,7 @@
|
|||
"/input/2": {
|
||||
"type": "button",
|
||||
"localized_name": "2",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_2_CLICK"
|
||||
}
|
||||
|
@ -964,7 +964,7 @@
|
|||
"/input/3": {
|
||||
"type": "button",
|
||||
"localized_name": "3",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_3_CLICK"
|
||||
}
|
||||
|
@ -972,7 +972,7 @@
|
|||
"/input/4": {
|
||||
"type": "button",
|
||||
"localized_name": "4",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_4_CLICK"
|
||||
}
|
||||
|
@ -980,7 +980,7 @@
|
|||
"/input/bumper": {
|
||||
"type": "button",
|
||||
"localized_name": "Bumper",
|
||||
"features": ["click"],
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_BUMPER_CLICK"
|
||||
}
|
||||
|
@ -988,7 +988,7 @@
|
|||
"/input/thumbstick": {
|
||||
"type": "joystick",
|
||||
"localized_name": "Thumbstick",
|
||||
"features": ["click", "position"],
|
||||
"components": ["click", "position"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_HYDRA_JOYSTICK_CLICK",
|
||||
"position": "XRT_INPUT_HYDRA_JOYSTICK_VALUE"
|
||||
|
@ -997,7 +997,7 @@
|
|||
"/input/trigger": {
|
||||
"type": "trigger",
|
||||
"localized_name": "Trigger",
|
||||
"features": ["value"],
|
||||
"components": ["value"],
|
||||
"monado_bindings": {
|
||||
"value": "XRT_INPUT_HYDRA_TRIGGER_VALUE"
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@
|
|||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"features": ["pose"],
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_HYDRA_POSE"
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import argparse
|
|||
import json
|
||||
|
||||
|
||||
def handle_subpath(pathgroup_cls, feature_list, subaction_path, sub_path_itm):
|
||||
def handle_subpath(pathgroup_cls, component_list, subaction_path, sub_path_itm):
|
||||
sub_path_name = sub_path_itm[0]
|
||||
sub_path_obj = sub_path_itm[1]
|
||||
|
||||
|
@ -16,31 +16,30 @@ def handle_subpath(pathgroup_cls, feature_list, subaction_path, sub_path_itm):
|
|||
if "side" in sub_path_obj and sub_path_obj["side"] not in subaction_path:
|
||||
return
|
||||
|
||||
for feature in sub_path_obj["features"]:
|
||||
feature_list.append(Feature(subaction_path, sub_path_itm, feature))
|
||||
for component in sub_path_obj["components"]:
|
||||
component_list.append(Component(subaction_path, sub_path_itm, component))
|
||||
|
||||
|
||||
class Feature:
|
||||
"""Features roughly correlate with data sources. For example a trackpad may
|
||||
have several features: position, click, touch, force, ...
|
||||
class Component:
|
||||
"""Components correspond with the standard OpenXR components click, touch, force, value, x, y, twist, pose
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def parse_features(feature_cls, subaction_paths, paths):
|
||||
"""Turn a profile's input paths into a list of Feature objects."""
|
||||
feature_list = []
|
||||
def parse_components(component_cls, subaction_paths, paths):
|
||||
"""Turn a profile's input paths into a list of Component objects."""
|
||||
component_list = []
|
||||
for subaction_path in subaction_paths:
|
||||
for sub_path_itm in paths.items():
|
||||
handle_subpath(feature_cls, feature_list,
|
||||
handle_subpath(component_cls, component_list,
|
||||
subaction_path, sub_path_itm)
|
||||
return feature_list
|
||||
return component_list
|
||||
|
||||
def __init__(self, subaction_path, sub_path_itm, feature_str):
|
||||
def __init__(self, subaction_path, sub_path_itm, component_str):
|
||||
# note: self.sub_path_name starts with a slash
|
||||
self.sub_path_name = sub_path_itm[0]
|
||||
self.sub_path_obj = sub_path_itm[1]
|
||||
self.subaction_path = subaction_path
|
||||
self.feature_str = feature_str
|
||||
self.component_str = component_str
|
||||
|
||||
def to_monado_paths(self):
|
||||
"""A group of paths that derive from the same input.
|
||||
|
@ -50,19 +49,19 @@ class Feature:
|
|||
|
||||
basepath = self.subaction_path + self.sub_path_name
|
||||
|
||||
if self.feature_str == "position":
|
||||
if self.component_str == "position":
|
||||
paths.append(basepath + "/" + "x")
|
||||
paths.append(basepath + "/" + "y")
|
||||
paths.append(basepath)
|
||||
else:
|
||||
paths.append(basepath + "/" + self.feature_str)
|
||||
paths.append(basepath + "/" + self.component_str)
|
||||
paths.append(basepath)
|
||||
|
||||
return paths
|
||||
|
||||
def is_input(self):
|
||||
# only haptics is output so far, everything else is input
|
||||
return self.feature_str != "haptic"
|
||||
return self.component_str != "haptic"
|
||||
|
||||
def is_output(self):
|
||||
return not self.is_input()
|
||||
|
@ -77,13 +76,13 @@ class Profile:
|
|||
self.monado_device = data["monado_device"]
|
||||
self.title = data['title']
|
||||
self.func = name[22:].replace("/", "_")
|
||||
self.features = Feature.parse_features(data["subaction_paths"],
|
||||
data["subpaths"])
|
||||
self.components = Component.parse_components(data["subaction_paths"],
|
||||
data["subpaths"])
|
||||
self.hw_type = data["type"]
|
||||
|
||||
self.by_length = {}
|
||||
for feature in self.features:
|
||||
for path in feature.to_monado_paths():
|
||||
for component in self.components:
|
||||
for path in component.to_monado_paths():
|
||||
length = len(path)
|
||||
if length in self.by_length:
|
||||
self.by_length[length].append(path)
|
||||
|
@ -162,7 +161,7 @@ def generate_bindings_c(file, p):
|
|||
fname = vendor_name + "_" + hw_name + "_profile.json"
|
||||
controller_type = "monado_" + vendor_name + "_" + hw_name
|
||||
|
||||
binding_count = len(profile.features)
|
||||
binding_count = len(profile.components)
|
||||
f.write(f'\t{{ // profile_template\n')
|
||||
f.write(f'\t\t.name = {profile.monado_device},\n')
|
||||
f.write(f'\t\t.path = "{profile.name}",\n')
|
||||
|
@ -173,42 +172,42 @@ def generate_bindings_c(file, p):
|
|||
f.write(
|
||||
f'\t\t.bindings = (struct binding_template[]){{ // array of binding_template\n')
|
||||
|
||||
feature: Feature
|
||||
for idx, feature in enumerate(profile.features):
|
||||
sp_obj = feature.sub_path_obj
|
||||
component: Component
|
||||
for idx, component in enumerate(profile.components):
|
||||
sp_obj = component.sub_path_obj
|
||||
|
||||
steamvr_path = feature.sub_path_name
|
||||
if feature.feature_str in ["click", "touch", "force", "value"]:
|
||||
steamvr_path += "/" + feature.feature_str
|
||||
steamvr_path = component.sub_path_name
|
||||
if component.component_str in ["click", "touch", "force", "value"]:
|
||||
steamvr_path += "/" + component.component_str
|
||||
|
||||
f.write(f'\t\t\t{{ // binding_template {idx}\n')
|
||||
f.write(f'\t\t\t\t.subaction_path = "{feature.subaction_path}",\n')
|
||||
f.write(f'\t\t\t\t.subaction_path = "{component.subaction_path}",\n')
|
||||
f.write(f'\t\t\t\t.steamvr_path = "{steamvr_path}",\n')
|
||||
f.write(
|
||||
f'\t\t\t\t.localized_name = "{sp_obj["localized_name"]}",\n')
|
||||
|
||||
f.write('\t\t\t\t.paths = { // array of paths\n')
|
||||
for path in feature.to_monado_paths():
|
||||
for path in component.to_monado_paths():
|
||||
f.write(f'\t\t\t\t\t"{path}",\n')
|
||||
f.write('\t\t\t\t\tNULL\n')
|
||||
f.write('\t\t\t\t}, // /array of paths\n')
|
||||
|
||||
# print("feature", feature.__dict__)
|
||||
# print("component", component.__dict__)
|
||||
|
||||
feature_str = feature.feature_str
|
||||
component_str = component.component_str
|
||||
|
||||
# controllers can have input that we don't have bindings for'
|
||||
if feature_str not in sp_obj["monado_bindings"]:
|
||||
if component_str not in sp_obj["monado_bindings"]:
|
||||
continue
|
||||
|
||||
monado_binding = sp_obj["monado_bindings"][feature_str]
|
||||
monado_binding = sp_obj["monado_bindings"][component_str]
|
||||
|
||||
if feature.is_input() and monado_binding is not None:
|
||||
if component.is_input() and monado_binding is not None:
|
||||
f.write(f'\t\t\t\t.input = {monado_binding},\n')
|
||||
else:
|
||||
f.write(f'\t\t\t\t.input = 0,\n')
|
||||
|
||||
if feature.is_output() and monado_binding is not None:
|
||||
if component.is_output() and monado_binding is not None:
|
||||
f.write(f'\t\t\t\t.output = {monado_binding},\n')
|
||||
else:
|
||||
f.write(f'\t\t\t\t.output = 0,\n')
|
||||
|
@ -223,15 +222,15 @@ def generate_bindings_c(file, p):
|
|||
inputs = set()
|
||||
outputs = set()
|
||||
for profile in p.profiles:
|
||||
feature: Feature
|
||||
for idx, feature in enumerate(profile.features):
|
||||
component: Component
|
||||
for idx, component in enumerate(profile.components):
|
||||
|
||||
feature_str = feature.feature_str
|
||||
component_str = component.component_str
|
||||
|
||||
sp_obj = feature.sub_path_obj
|
||||
if feature_str not in sp_obj["monado_bindings"]:
|
||||
sp_obj = component.sub_path_obj
|
||||
if component_str not in sp_obj["monado_bindings"]:
|
||||
continue
|
||||
monado_binding = sp_obj["monado_bindings"][feature_str]
|
||||
monado_binding = sp_obj["monado_bindings"][component_str]
|
||||
|
||||
if sp_obj["type"] == "vibration":
|
||||
outputs.add(monado_binding)
|
||||
|
|
|
@ -41,7 +41,7 @@ def steamvr_subpath_name(sub_path_name, sub_path_obj):
|
|||
return sub_path_name
|
||||
|
||||
|
||||
def get_required_features(path_type):
|
||||
def get_required_components(path_type):
|
||||
if path_type == "button":
|
||||
return ["click", "touch"]
|
||||
if path_type == "trigger":
|
||||
|
@ -79,10 +79,10 @@ def main():
|
|||
|
||||
input_source = {}
|
||||
|
||||
feature: Feature
|
||||
for idx, feature in enumerate(p.features):
|
||||
sp_name = steamvr_subpath_name(feature.sub_path_name, feature.sub_path_obj)
|
||||
sp = feature.sub_path_obj
|
||||
component: Component
|
||||
for idx, component in enumerate(p.components):
|
||||
sp_name = steamvr_subpath_name(component.sub_path_name, component.sub_path_obj)
|
||||
sp = component.sub_path_obj
|
||||
|
||||
input_source[sp_name] = {
|
||||
"type": sp["type"],
|
||||
|
@ -90,8 +90,8 @@ def main():
|
|||
"order": idx
|
||||
}
|
||||
|
||||
for req in get_required_features(sp["type"]):
|
||||
input_source[sp_name][req] = req in sp["features"]
|
||||
for req in get_required_components(sp["type"]):
|
||||
input_source[sp_name][req] = req in sp["components"]
|
||||
|
||||
j = {
|
||||
"json_id": "input_profile",
|
||||
|
|
Loading…
Reference in a new issue