[PR #21] [CLOSED] Add Xbox One USB mode alongside existing Xbox 360 mode in modular architecture #159

Closed
opened 2026-10-22 05:06:49 +00:00 by roman · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/safijari/openpuck/pull/21
Author: @Copilot
Created: 6/9/2026
Status: ❌ Closed

Base: main ← Head: copilot/20


📝 Commits (3)

  • f8ba19e Add Xbox One mode option alongside Xbox 360
  • 3e467a3 Merge main and keep Xbox One mode on modular architecture
  • e26c19c Merge branch 'main' into copilot/20

📊 Changes

10 files changed (+29 additions, -18 deletions)

View changed files

📝 ARCHITECTURE.md (+2 -2)
📝 OpenPuck/OpenPuck.ino (+2 -2)
📝 OpenPuck/config.h (+4 -2)
📝 OpenPuck/controllers.cpp (+2 -1)
📝 OpenPuck/mode_xinput.cpp (+12 -6)
📝 OpenPuck/mode_xinput.h (+1 -1)
📝 OpenPuck/serial_console.cpp (+1 -1)
📝 OpenPuck/webusb_config.h (+1 -1)
📝 README.md (+1 -0)
📝 docs/index.html (+3 -2)

📄 Description

OpenPuck only exposed a single Xbox mode backed by Xbox 360 identity. This change adds Xbox One as a separate selectable USB presentation while preserving existing Xbox 360 behavior and mappings, now aligned with the post-refactor modular architecture.

  • Architecture alignment

    • Merged latest main and resolved conflicts against the new modular layout (config, controllers, mode_xinput, etc.).
    • Ported the Xbox One mode additions from the old monolithic paths to the refactored mode/controller architecture.
  • Firmware mode model

    • Added MODE_XBOX_ONE (7) and expanded mode bounds (MODE_MAX=7) in OpenPuck/config.h.
    • Added shared Xbox-mode predicate and mapped both Xbox mode values to the same XInput controller implementation in OpenPuck/controllers.cpp.
  • USB presentation behavior

    • Kept Xbox 360 mode unchanged (VID:PID 045E:028E).
    • Added Xbox One presentation (VID:PID 045E:02D1) with distinct product identity in OpenPuck/mode_xinput.cpp.
    • Extended per-mode serial suffix table and startup mode labels to include Xbox One in OpenPuck/OpenPuck.ino.
  • Runtime mapping paths

    • Reused existing Xbox gamepad/mouse translation and rumble relay logic for Xbox One mode through the shared XInput controller path.
  • WebUSB config UI + docs

    • Added mode 7 button/label (“Xbox One”) in docs/index.html.
    • Updated mode-name list and UI behavior tied to Xbox-mode affordances.
    • Added README mode table entry for WebUSB mode 7.
    • Updated mode-range documentation/comments for mode switching (0..7).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/safijari/openpuck/pull/21 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 6/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `copilot/20` --- ### 📝 Commits (3) - [`f8ba19e`](https://github.com/safijari/openpuck/commit/f8ba19e021b05dbc8475abf4ad5cc9975d55492f) Add Xbox One mode option alongside Xbox 360 - [`3e467a3`](https://github.com/safijari/openpuck/commit/3e467a3df75a039ace4d6ea5b9a6874e47696ebd) Merge main and keep Xbox One mode on modular architecture - [`e26c19c`](https://github.com/safijari/openpuck/commit/e26c19c5a777720aa5cda84d6f65959eb0d32f7b) Merge branch 'main' into copilot/20 ### 📊 Changes **10 files changed** (+29 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `ARCHITECTURE.md` (+2 -2) 📝 `OpenPuck/OpenPuck.ino` (+2 -2) 📝 `OpenPuck/config.h` (+4 -2) 📝 `OpenPuck/controllers.cpp` (+2 -1) 📝 `OpenPuck/mode_xinput.cpp` (+12 -6) 📝 `OpenPuck/mode_xinput.h` (+1 -1) 📝 `OpenPuck/serial_console.cpp` (+1 -1) 📝 `OpenPuck/webusb_config.h` (+1 -1) 📝 `README.md` (+1 -0) 📝 `docs/index.html` (+3 -2) </details> ### 📄 Description OpenPuck only exposed a single Xbox mode backed by Xbox 360 identity. This change adds Xbox One as a separate selectable USB presentation while preserving existing Xbox 360 behavior and mappings, now aligned with the post-refactor modular architecture. - **Architecture alignment** - Merged latest `main` and resolved conflicts against the new modular layout (`config`, `controllers`, `mode_xinput`, etc.). - Ported the Xbox One mode additions from the old monolithic paths to the refactored mode/controller architecture. - **Firmware mode model** - Added `MODE_XBOX_ONE` (`7`) and expanded mode bounds (`MODE_MAX=7`) in `OpenPuck/config.h`. - Added shared Xbox-mode predicate and mapped both Xbox mode values to the same XInput controller implementation in `OpenPuck/controllers.cpp`. - **USB presentation behavior** - Kept Xbox 360 mode unchanged (`VID:PID 045E:028E`). - Added Xbox One presentation (`VID:PID 045E:02D1`) with distinct product identity in `OpenPuck/mode_xinput.cpp`. - Extended per-mode serial suffix table and startup mode labels to include Xbox One in `OpenPuck/OpenPuck.ino`. - **Runtime mapping paths** - Reused existing Xbox gamepad/mouse translation and rumble relay logic for Xbox One mode through the shared XInput controller path. - **WebUSB config UI + docs** - Added `mode 7` button/label (“Xbox One”) in `docs/index.html`. - Updated mode-name list and UI behavior tied to Xbox-mode affordances. - Added README mode table entry for WebUSB `mode 7`. - Updated mode-range documentation/comments for mode switching (`0..7`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-10-22 05:06:49 +00:00
Sign in to join this conversation.
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
safijari/openpuck#159
No description provided.