Add Pico 4s/4 Ultra/A9210 interaction profile (non-breaking change)
This commit is contained in:
@@ -421,6 +421,48 @@ static std::vector<interaction_profile> interaction_profiles{
|
||||
"/user/hand/right/input/squeeze/value",
|
||||
}},
|
||||
interaction_profile{
|
||||
"/interaction_profiles/bytedance/pico4s_controller",
|
||||
{"XR_BD_controller_interaction"},
|
||||
{
|
||||
"/user/hand/left/output/haptic",
|
||||
"/user/hand/right/output/haptic",
|
||||
|
||||
"/user/hand/left/input/grip/pose",
|
||||
"/user/hand/left/input/aim/pose",
|
||||
|
||||
"/user/hand/right/input/grip/pose",
|
||||
"/user/hand/right/input/aim/pose",
|
||||
|
||||
"/user/hand/left/input/x/click",
|
||||
"/user/hand/left/input/x/touch",
|
||||
"/user/hand/left/input/y/click",
|
||||
"/user/hand/left/input/y/touch",
|
||||
"/user/hand/left/input/menu/click",
|
||||
"/user/hand/left/input/system/click",
|
||||
"/user/hand/left/input/trigger/click",
|
||||
"/user/hand/left/input/trigger/value",
|
||||
"/user/hand/left/input/trigger/touch",
|
||||
"/user/hand/left/input/thumbstick",
|
||||
"/user/hand/left/input/thumbstick/click",
|
||||
"/user/hand/left/input/thumbstick/touch",
|
||||
"/user/hand/left/input/squeeze/click",
|
||||
"/user/hand/left/input/squeeze/value",
|
||||
|
||||
"/user/hand/right/input/a/click",
|
||||
"/user/hand/right/input/a/touch",
|
||||
"/user/hand/right/input/b/click",
|
||||
"/user/hand/right/input/b/touch",
|
||||
"/user/hand/right/input/system/click",
|
||||
"/user/hand/right/input/trigger/click",
|
||||
"/user/hand/right/input/trigger/value",
|
||||
"/user/hand/right/input/trigger/touch",
|
||||
"/user/hand/right/input/thumbstick",
|
||||
"/user/hand/right/input/thumbstick/click",
|
||||
"/user/hand/right/input/thumbstick/touch",
|
||||
"/user/hand/right/input/squeeze/click",
|
||||
"/user/hand/right/input/squeeze/value",
|
||||
}},
|
||||
interaction_profile{
|
||||
"/interaction_profiles/htc/vive_focus3_controller",
|
||||
{"XR_HTC_vive_focus3_controller_interaction"},
|
||||
{
|
||||
|
||||
+10
-1
@@ -74,6 +74,9 @@ static model guess_model_()
|
||||
if (model == "Pico Neo 3")
|
||||
return model::pico_neo_3;
|
||||
|
||||
if (model == "A9210")
|
||||
return model::pico_4s;
|
||||
|
||||
spdlog::info("manufacturer={}, model={}, device={} assuming Pico 4", manufacturer, model, device);
|
||||
return model::pico_4;
|
||||
}
|
||||
@@ -141,6 +144,7 @@ XrViewConfigurationView override_view(XrViewConfigurationView view, model m)
|
||||
case model::pico_neo_3:
|
||||
return scale_view(view, 1832);
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
return scale_view(view, 2160);
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
@@ -167,6 +171,7 @@ bool need_srgb_conversion(model m)
|
||||
case model::meta_quest_3s:
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
@@ -195,6 +200,7 @@ const char * permission_name(feature f)
|
||||
return "com.oculus.permission.EYE_TRACKING";
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
return "com.picovr.permission.EYE_TRACKING";
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
@@ -215,6 +221,7 @@ const char * permission_name(feature f)
|
||||
return "com.oculus.permission.FACE_TRACKING";
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
@@ -250,6 +257,8 @@ std::string controller_name()
|
||||
return "pico-neo3";
|
||||
case model::pico_4:
|
||||
return "pico-4";
|
||||
case model::pico_4s:
|
||||
return "pico-4s";
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
@@ -322,7 +331,7 @@ std::pair<glm::vec3, glm::quat> controller_offset(std::string_view profile, xr::
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else if (profile == "pico-4")
|
||||
else if (profile == "pico-4" || profile == "pico-4s")
|
||||
switch (space)
|
||||
{
|
||||
case xr::spaces::grip_left:
|
||||
|
||||
@@ -34,6 +34,7 @@ enum class model
|
||||
meta_quest_3s,
|
||||
pico_neo_3,
|
||||
pico_4,
|
||||
pico_4s,
|
||||
htc_vive_focus_3,
|
||||
htc_vive_xr_elite,
|
||||
htc_vive_focus_vision,
|
||||
|
||||
@@ -1307,6 +1307,24 @@ scene::meta & scenes::lobby::get_meta_scene()
|
||||
{"recenter_right", "/user/hand/right/input/a/click"},
|
||||
},
|
||||
},
|
||||
suggested_binding{
|
||||
"/interaction_profiles/bytedance/pico4s_controller",
|
||||
{
|
||||
{"left_aim", "/user/hand/left/input/aim/pose"},
|
||||
{"left_trigger", "/user/hand/left/input/trigger/value"},
|
||||
{"left_squeeze", "/user/hand/left/input/squeeze/value"},
|
||||
{"left_scroll", "/user/hand/left/input/thumbstick"},
|
||||
{"left_haptic", "/user/hand/left/output/haptic"},
|
||||
{"right_aim", "/user/hand/right/input/aim/pose"},
|
||||
{"right_trigger", "/user/hand/right/input/trigger/value"},
|
||||
{"right_squeeze", "/user/hand/right/input/squeeze/value"},
|
||||
{"right_scroll", "/user/hand/right/input/thumbstick"},
|
||||
{"right_haptic", "/user/hand/right/output/haptic"},
|
||||
|
||||
{"recenter_left", "/user/hand/left/input/x/click"},
|
||||
{"recenter_right", "/user/hand/right/input/a/click"},
|
||||
},
|
||||
},
|
||||
suggested_binding{
|
||||
"/interaction_profiles/htc/vive_focus3_controller",
|
||||
{
|
||||
|
||||
@@ -490,6 +490,7 @@ void scenes::stream::on_interaction_profile_changed(const XrEventDataInteraction
|
||||
DO_PROFILE(khr, simple_controller)
|
||||
DO_PROFILE(bd, pico_neo3_controller)
|
||||
DO_PROFILE(bd, pico4_controller)
|
||||
DO_PROFILE(bd, pico4s_controller)
|
||||
DO_PROFILE(bd, pico_g3_controller)
|
||||
DO_PROFILE(google, daydream_controller)
|
||||
DO_PROFILE(hp, mixed_reality_controller)
|
||||
|
||||
Reference in New Issue
Block a user