Skip to content

Commit

Permalink
feat: Add Pico G3 controller profile (#2679)
Browse files Browse the repository at this point in the history
* feat: Add Pico G3 controller profile

* refactor: Use trackpad instead of thumbstick
  • Loading branch information
curoviyxru authored Jan 31, 2025
1 parent cc9a021 commit d66be50
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions alvr/client_openxr/src/interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ impl InteractionContext {

let controllers_profile_path = match platform {
p if p.is_quest() => QUEST_CONTROLLER_PROFILE_PATH, // todo: create new controller profile for quest pro and 3
Platform::PicoG3 => PICO_G3_CONTROLLER_PROFILE_PATH,
Platform::PicoNeo3 => PICO_NEO3_CONTROLLER_PROFILE_PATH,
Platform::Pico4Ultra => PICO4S_CONTROLLER_PROFILE_PATH,
Platform::Pico4 | Platform::Pico4Pro | Platform::Pico4Enterprise => {
Expand Down
25 changes: 25 additions & 0 deletions alvr/common/src/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interaction_profile!(INDEX, "valve/index");
interaction_profile!(PICO_NEO3, "bytedance/pico_neo3");
interaction_profile!(PICO4, "bytedance/pico4");
interaction_profile!(PICO4S, "bytedance/pico4s");
interaction_profile!(PICO_G3, "bytedance/pico_g3");
interaction_profile!(FOCUS3, "htc/vive_focus3");
interaction_profile!(YVR, "yvr/touch");

Expand Down Expand Up @@ -261,6 +262,30 @@ pub static CONTROLLER_PROFILE_INFO: Lazy<HashMap<u64, InteractionProfileInfo>> =
.collect(),
},
),
(
*PICO_G3_CONTROLLER_PROFILE_ID,
InteractionProfileInfo {
path: PICO_G3_CONTROLLER_PROFILE_PATH,
button_set: [
*LEFT_MENU_CLICK_ID,
*LEFT_TRIGGER_CLICK_ID,
*LEFT_TRIGGER_VALUE_ID,
*LEFT_TRACKPAD_Y_ID,
*LEFT_TRACKPAD_X_ID,
*LEFT_TRACKPAD_CLICK_ID,
*LEFT_TRACKPAD_TOUCH_ID,
*RIGHT_MENU_CLICK_ID,
*RIGHT_TRIGGER_CLICK_ID,
*RIGHT_TRIGGER_VALUE_ID,
*RIGHT_TRACKPAD_Y_ID,
*RIGHT_TRACKPAD_X_ID,
*RIGHT_TRACKPAD_CLICK_ID,
*RIGHT_TRACKPAD_TOUCH_ID,
]
.into_iter()
.collect(),
},
),
(
*PICO_NEO3_CONTROLLER_PROFILE_ID,
InteractionProfileInfo {
Expand Down

0 comments on commit d66be50

Please sign in to comment.