mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-16 18:50:07 +00:00
d/steamvr_lh: clean up logs and clean up unused tracker inputs
This commit is contained in:
parent
940a0290ea
commit
d5eeb65af9
|
@ -128,13 +128,11 @@ const std::unordered_map<std::string_view, InputClass> controller_classes{
|
||||||
XRT_INPUT_GENERIC_TRACKER_POSE,
|
XRT_INPUT_GENERIC_TRACKER_POSE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{"/input/system/click", XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK},
|
{"/input/power/click", XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK},
|
||||||
{"/input/squeeze/click", XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK},
|
{"/input/grip/click", XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK},
|
||||||
{"/input/menu/click", XRT_INPUT_VIVE_TRACKER_MENU_CLICK},
|
{"/input/application_menu/click", XRT_INPUT_VIVE_TRACKER_MENU_CLICK},
|
||||||
{"/input/trigger/value", XRT_INPUT_VIVE_TRACKER_TRIGGER_VALUE},
|
{"/input/trigger/click", XRT_INPUT_VIVE_TRACKER_TRIGGER_CLICK},
|
||||||
{"/input/trackpad/click", XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK},
|
{"/input/thumb/click", XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK},
|
||||||
{"/input/trackpad/touch", XRT_INPUT_VIVE_TRACKER_TRACKPAD_TOUCH},
|
|
||||||
{"/input/trackpad/position", XRT_INPUT_VIVE_TRACKER_TRACKPAD},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// No fingers on this controller type
|
// No fingers on this controller type
|
||||||
|
@ -150,13 +148,11 @@ const std::unordered_map<std::string_view, InputClass> controller_classes{
|
||||||
XRT_INPUT_GENERIC_TRACKER_POSE,
|
XRT_INPUT_GENERIC_TRACKER_POSE,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
{"/input/system/click", XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK},
|
{"/input/power/click", XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK},
|
||||||
{"/input/squeeze/click", XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK},
|
{"/input/grip/click", XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK},
|
||||||
{"/input/menu/click", XRT_INPUT_VIVE_TRACKER_MENU_CLICK},
|
{"/input/application_menu/click", XRT_INPUT_VIVE_TRACKER_MENU_CLICK},
|
||||||
{"/input/trigger/value", XRT_INPUT_VIVE_TRACKER_TRIGGER_VALUE},
|
{"/input/trigger/click", XRT_INPUT_VIVE_TRACKER_TRIGGER_CLICK},
|
||||||
{"/input/trackpad/click", XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK},
|
{"/input/thumb/click", XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK},
|
||||||
{"/input/trackpad/touch", XRT_INPUT_VIVE_TRACKER_TRACKPAD_TOUCH},
|
|
||||||
{"/input/trackpad/position", XRT_INPUT_VIVE_TRACKER_TRACKPAD},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// No fingers on this controller type
|
// No fingers on this controller type
|
||||||
|
@ -352,6 +348,11 @@ ControllerDevice::update_hand_tracking(struct xrt_hand_joint_set *out)
|
||||||
xrt_input *
|
xrt_input *
|
||||||
Device::get_input_from_name(const std::string_view name)
|
Device::get_input_from_name(const std::string_view name)
|
||||||
{
|
{
|
||||||
|
// Return nullptr without any other output to suppress a pile of useless warnings found below.
|
||||||
|
if (name == "/input/finger/index" || name == "/input/finger/middle" || name == "/input/finger/ring" ||
|
||||||
|
name == "/input/finger/pinky") {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
auto input = inputs_map.find(name);
|
auto input = inputs_map.find(name);
|
||||||
if (input == inputs_map.end()) {
|
if (input == inputs_map.end()) {
|
||||||
DEV_WARN("requested unknown input name %s for device %s", std::string(name).c_str(), serial);
|
DEV_WARN("requested unknown input name %s for device %s", std::string(name).c_str(), serial);
|
||||||
|
|
Loading…
Reference in a new issue