d/vive_controller: Add and set Index "Gen2" input names

This commit is contained in:
Christoph Haag 2020-06-25 03:31:43 +02:00
parent 184dd277bf
commit d8de19d4ae

View file

@ -99,6 +99,14 @@ enum vive_controller_input_index
VIVE_CONTROLLER_INDEX_A_CLICK,
VIVE_CONTROLLER_INDEX_B_CLICK,
VIVE_CONTROLLER_INDEX_THUMBSTICK_CLICK,
VIVE_CONTROLLER_INDEX_THUMBSTICK_TOUCH,
VIVE_CONTROLLER_INDEX_SYSTEM_TOUCH,
VIVE_CONTROLLER_INDEX_A_TOUCH,
VIVE_CONTROLLER_INDEX_B_TOUCH,
VIVE_CONTROLLER_INDEX_SQUEEZE_VALUE,
VIVE_CONTROLLER_INDEX_SQUEEZE_FORCE,
VIVE_CONTROLLER_INDEX_TRIGGER_TOUCH,
VIVE_CONTROLLER_INDEX_TRACKPAD_FORCE,
VIVE_CONTROLLER_MAX_INDEX,
};
@ -1177,6 +1185,15 @@ vive_controller_found(struct xrt_prober *xp,
SET_INDEX_INPUT(THUMBSTICK, THUMBSTICK);
SET_INDEX_INPUT(THUMBSTICK_CLICK, THUMBSTICK_CLICK);
SET_INDEX_INPUT(THUMBSTICK_TOUCH, THUMBSTICK_TOUCH);
SET_INDEX_INPUT(SYSTEM_TOUCH, SYSTEM_TOUCH);
SET_INDEX_INPUT(A_TOUCH, A_TOUCH);
SET_INDEX_INPUT(B_TOUCH, B_TOUCH);
SET_INDEX_INPUT(SQUEEZE_VALUE, SQUEEZE_VALUE);
SET_INDEX_INPUT(SQUEEZE_FORCE, SQUEEZE_FORCE);
SET_INDEX_INPUT(TRIGGER_TOUCH, TRIGGER_TOUCH);
SET_INDEX_INPUT(TRACKPAD_FORCE, TRACKPAD_FORCE);
SET_INDEX_INPUT(AIM_POSE, AIM_POSE);
SET_INDEX_INPUT(GRIP_POSE, GRIP_POSE);