mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 18:46:18 +00:00
xrt: Add ML2 controller
This commit is contained in:
parent
d231850771
commit
6ce2978648
|
@ -1019,6 +1019,92 @@
|
|||
}
|
||||
},
|
||||
|
||||
"/interaction_profiles/ml/ml2_controller": {
|
||||
"title": "Magic Leap 2 Controller",
|
||||
"type": "tracked_controller",
|
||||
"monado_device": "XRT_DEVICE_ML2_CONTROLLER",
|
||||
"extension": "XR_ML_ml2_controller",
|
||||
"subaction_paths": [
|
||||
"/user/hand/left",
|
||||
"/user/hand/right"
|
||||
],
|
||||
"subpaths": {
|
||||
"/input/menu": {
|
||||
"type": "button",
|
||||
"localized_name": "Menu",
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_ML2_CONTROLLER_MENU_CLICK"
|
||||
}
|
||||
},
|
||||
"/input/home": {
|
||||
"type": "button",
|
||||
"localized_name": "Select",
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_ML2_CONTROLLER_SELECT_CLICK"
|
||||
}
|
||||
},
|
||||
"/input/trigger": {
|
||||
"type": "button",
|
||||
"localized_name": "Trigger",
|
||||
"components": ["click", "value"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_ML2_CONTROLLER_TRIGGER_CLICK",
|
||||
"value": "XRT_INPUT_ML2_CONTROLLER_TRIGGER_VALUE"
|
||||
}
|
||||
},
|
||||
"/input/trackpad": {
|
||||
"type": "trackpad",
|
||||
"localized_name": "Trackpad",
|
||||
"components": ["click", "force", "touch", "position"],
|
||||
"dpad_emulation": {
|
||||
"position": "position",
|
||||
"activate": "click",
|
||||
"center": true
|
||||
},
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_ML2_CONTROLLER_TRACKPAD_CLICK",
|
||||
"touch": "XRT_INPUT_ML2_CONTROLLER_TRACKPAD_TOUCH",
|
||||
"force": "XRT_INPUT_ML2_CONTROLLER_TRACKPAD_FORCE",
|
||||
"position": "XRT_INPUT_ML2_CONTROLLER_TRACKPAD"
|
||||
}
|
||||
},
|
||||
"/input/grip": {
|
||||
"type": "pose",
|
||||
"localized_name": "Grip",
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_ML2_CONTROLLER_GRIP_POSE"
|
||||
}
|
||||
},
|
||||
"/input/aim": {
|
||||
"type": "pose",
|
||||
"localized_name": "Aim",
|
||||
"components": ["pose"],
|
||||
"monado_bindings": {
|
||||
"pose": "XRT_INPUT_ML2_CONTROLLER_AIM_POSE"
|
||||
}
|
||||
},
|
||||
"/input/shoudler": {
|
||||
"type": "button",
|
||||
"localized_name": "Shoulder",
|
||||
"components": ["click"],
|
||||
"monado_bindings": {
|
||||
"click": "XRT_INPUT_ML2_CONTROLLER_SHOULDER_CLICK"
|
||||
}
|
||||
},
|
||||
"/output/haptic": {
|
||||
"type": "vibration",
|
||||
"localized_name": "Haptic",
|
||||
"components": ["haptic"],
|
||||
"monado_bindings": {
|
||||
"haptic": "XRT_OUTPUT_NAME_ML2_CONTROLLER_VIBRATION"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"/interaction_profiles/microsoft/hand_interaction": {
|
||||
"title": "Microsoft hand interaction",
|
||||
"type": "tracked_controller",
|
||||
|
|
|
@ -622,6 +622,7 @@ enum xrt_device_name
|
|||
|
||||
XRT_DEVICE_HP_REVERB_G2_CONTROLLER,
|
||||
XRT_DEVICE_SAMSUNG_ODYSSEY_CONTROLLER,
|
||||
XRT_DEVICE_ML2_CONTROLLER,
|
||||
|
||||
XRT_DEVICE_HAND_INTERACTION,
|
||||
|
||||
|
@ -887,6 +888,18 @@ enum xrt_input_name
|
|||
XRT_INPUT_ODYSSEY_CONTROLLER_TRACKPAD = XRT_INPUT_NAME(0x0107, VEC2_MINUS_ONE_TO_ONE),
|
||||
XRT_INPUT_ODYSSEY_CONTROLLER_GRIP_POSE = XRT_INPUT_NAME(0x0108, POSE),
|
||||
XRT_INPUT_ODYSSEY_CONTROLLER_AIM_POSE = XRT_INPUT_NAME(0x0109, POSE),
|
||||
|
||||
XRT_INPUT_ML2_CONTROLLER_MENU_CLICK = XRT_INPUT_NAME(0x0200, BOOLEAN),
|
||||
XRT_INPUT_ML2_CONTROLLER_SELECT_CLICK = XRT_INPUT_NAME(0x0201, BOOLEAN),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRIGGER_CLICK = XRT_INPUT_NAME(0x0202, BOOLEAN),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRIGGER_VALUE = XRT_INPUT_NAME(0x0203, VEC1_ZERO_TO_ONE),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRACKPAD_CLICK = XRT_INPUT_NAME(0x0204, BOOLEAN),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRACKPAD_TOUCH = XRT_INPUT_NAME(0x0205, BOOLEAN),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRACKPAD_FORCE = XRT_INPUT_NAME(0x0206, VEC1_ZERO_TO_ONE),
|
||||
XRT_INPUT_ML2_CONTROLLER_TRACKPAD = XRT_INPUT_NAME(0x0207, VEC2_MINUS_ONE_TO_ONE),
|
||||
XRT_INPUT_ML2_CONTROLLER_GRIP_POSE = XRT_INPUT_NAME(0x0208, POSE),
|
||||
XRT_INPUT_ML2_CONTROLLER_AIM_POSE = XRT_INPUT_NAME(0x0209, POSE),
|
||||
XRT_INPUT_ML2_CONTROLLER_SHOULDER_CLICK = XRT_INPUT_NAME(0x020A, BOOLEAN),
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
@ -1047,6 +1060,7 @@ enum xrt_output_name
|
|||
|
||||
XRT_OUTPUT_NAME_G2_CONTROLLER_HAPTIC = XRT_OUTPUT_NAME(0x0090, VIBRATION),
|
||||
XRT_OUTPUT_NAME_ODYSSEY_CONTROLLER_HAPTIC = XRT_OUTPUT_NAME(0x00A0, VIBRATION),
|
||||
XRT_OUTPUT_NAME_ML2_CONTROLLER_VIBRATION = XRT_OUTPUT_NAME(0x00B0, VIBRATION),
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue