st/oxr: Add simple controller bindings

This commit is contained in:
Jakob Bornecrantz 2020-10-13 18:17:16 +01:00 committed by Jakob Bornecrantz
parent f3394320b1
commit 0cf3c704b6
2 changed files with 15 additions and 0 deletions

View file

@ -355,6 +355,11 @@ oxr_find_profile_for_device(struct oxr_logger *log,
interaction_profile_find( interaction_profile_find(
log, inst, inst->path_cache.khr_simple_controller, out_p); log, inst, inst->path_cache.khr_simple_controller, out_p);
return; return;
case XRT_DEVICE_SIMPLE_CONTROLLER:
// clang-format off
interaction_profile_find(log, inst, inst->path_cache.khr_simple_controller, out_p);
// clang-format on
return;
case XRT_DEVICE_INDEX_CONTROLLER: case XRT_DEVICE_INDEX_CONTROLLER:
// clang-format off // clang-format off
interaction_profile_find(log, inst, inst->path_cache.khr_simple_controller, out_p); interaction_profile_find(log, inst, inst->path_cache.khr_simple_controller, out_p);

View file

@ -61,6 +61,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_SELECT_CLICK,
XRT_INPUT_PSMV_TRIGGER_VALUE, XRT_INPUT_PSMV_TRIGGER_VALUE,
XRT_INPUT_HYDRA_TRIGGER_VALUE, XRT_INPUT_HYDRA_TRIGGER_VALUE,
XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK, XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK,
@ -80,6 +81,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_MENU_CLICK,
XRT_INPUT_PSMV_MOVE_CLICK, XRT_INPUT_PSMV_MOVE_CLICK,
XRT_INPUT_HYDRA_MIDDLE_CLICK, XRT_INPUT_HYDRA_MIDDLE_CLICK,
XRT_INPUT_DAYDREAM_BAR_CLICK, XRT_INPUT_DAYDREAM_BAR_CLICK,
@ -99,6 +101,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_GRIP_POSE,
XRT_INPUT_PSMV_GRIP_POSE, XRT_INPUT_PSMV_GRIP_POSE,
XRT_INPUT_HYDRA_POSE, XRT_INPUT_HYDRA_POSE,
XRT_INPUT_DAYDREAM_POSE, XRT_INPUT_DAYDREAM_POSE,
@ -118,6 +121,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_AIM_POSE,
XRT_INPUT_PSMV_AIM_POSE, XRT_INPUT_PSMV_AIM_POSE,
XRT_INPUT_HYDRA_POSE, XRT_INPUT_HYDRA_POSE,
XRT_INPUT_DAYDREAM_POSE, XRT_INPUT_DAYDREAM_POSE,
@ -136,6 +140,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.outputs = .outputs =
{ {
XRT_OUTPUT_NAME_SIMPLE_VIBRATION,
XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION, XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION,
XRT_OUTPUT_NAME_INDEX_HAPTIC, XRT_OUTPUT_NAME_INDEX_HAPTIC,
XRT_OUTPUT_NAME_VIVE_HAPTIC, XRT_OUTPUT_NAME_VIVE_HAPTIC,
@ -153,6 +158,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_SELECT_CLICK,
XRT_INPUT_PSMV_TRIGGER_VALUE, XRT_INPUT_PSMV_TRIGGER_VALUE,
XRT_INPUT_HYDRA_TRIGGER_VALUE, XRT_INPUT_HYDRA_TRIGGER_VALUE,
XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK, XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK,
@ -172,6 +178,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_MENU_CLICK,
XRT_INPUT_PSMV_MOVE_CLICK, XRT_INPUT_PSMV_MOVE_CLICK,
XRT_INPUT_HYDRA_MIDDLE_CLICK, XRT_INPUT_HYDRA_MIDDLE_CLICK,
XRT_INPUT_DAYDREAM_BAR_CLICK, XRT_INPUT_DAYDREAM_BAR_CLICK,
@ -191,6 +198,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_GRIP_POSE,
XRT_INPUT_PSMV_GRIP_POSE, XRT_INPUT_PSMV_GRIP_POSE,
XRT_INPUT_HYDRA_POSE, XRT_INPUT_HYDRA_POSE,
XRT_INPUT_DAYDREAM_POSE, XRT_INPUT_DAYDREAM_POSE,
@ -210,6 +218,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.inputs = .inputs =
{ {
XRT_INPUT_SIMPLE_AIM_POSE,
XRT_INPUT_PSMV_AIM_POSE, XRT_INPUT_PSMV_AIM_POSE,
XRT_INPUT_HYDRA_POSE, XRT_INPUT_HYDRA_POSE,
XRT_INPUT_DAYDREAM_POSE, XRT_INPUT_DAYDREAM_POSE,
@ -228,6 +237,7 @@ static struct binding_template khr_simple_controller_bindings[10] = {
}, },
.outputs = .outputs =
{ {
XRT_OUTPUT_NAME_SIMPLE_VIBRATION,
XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION, XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION,
XRT_OUTPUT_NAME_INDEX_HAPTIC, XRT_OUTPUT_NAME_INDEX_HAPTIC,
XRT_OUTPUT_NAME_VIVE_HAPTIC, XRT_OUTPUT_NAME_VIVE_HAPTIC,