[PR #133] [MERGED] Add per-type rumble disable for emulated controller modes #218

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

📋 Pull Request Information

Original PR: https://github.com/safijari/openpuck/pull/133
Author: @Copilot
Created: 7/5/2026
Status: ✅ Merged
Merged: 7/6/2026
Merged by: @safijari

Base: main ← Head: copilot/add-disable-rumble-option


📝 Commits (3)

  • 77437e4 Add per-type rumble disable for emulated controller modes
  • 4292b95 Fix comment: use v17 (not v10/v17) for per-type blob layout
  • 5e1d221 Merge branch 'main' into copilot/add-disable-rumble-option

📊 Changes

6 files changed (+138 additions, -114 deletions)

View changed files

📝 OpenPuck/config.cpp (+10 -6)
📝 OpenPuck/config.h (+4 -0)
📝 OpenPuck/haptics.cpp (+3 -0)
📝 OpenPuck/mode_xinput.cpp (+9 -6)
📝 OpenPuck/webusb_config.cpp (+61 -56)
📝 docs/index.html (+51 -46)

📄 Description

Emulated controller modes (Xbox, Switch, DS4, DS5) had no way to suppress host rumble relay per-type — only a global amplitude scale existed. This adds a rumble toggle to TypeCfg, parallel to padHaptics.

Firmware

  • TypeCfg gains uint8_t rumble (1 = enabled, default). g_rumble live mirror added; applyActiveType() refreshes it. CFG_MAGIC bumped to 0xCF — old flash discarded on first boot.
  • hapticSteamRumble(): drops ON commands when g_rumble = 0; zero/stop passes through to clear in-flight relay.
  • mode_xinput.cpp: skips rumbleLow/rumbleHigh tracking when disabled, preventing the stuck-rumble watchdog from firing spurious stop frames.

WebUSB protocol (v17)

  • Per-type field stride: 8 → 9 bytes/type (k=8 = rumble). All blob positions after the per-type block shift +4.
  • WB_PAYLEN: 176 → 180. Protocol version: 16 → 17.

Panel (docs/index.html)

  • Rumble toggle added to each controller-type tab alongside A/B swap and Trackpad haptics.
  • All shifted blob indices updated. Backup/restore includes the new field.

🔄 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/133 **Author:** [@Copilot](https://github.com/apps/copilot-swe-agent) **Created:** 7/5/2026 **Status:** ✅ Merged **Merged:** 7/6/2026 **Merged by:** [@safijari](https://github.com/safijari) **Base:** `main` ← **Head:** `copilot/add-disable-rumble-option` --- ### 📝 Commits (3) - [`77437e4`](https://github.com/safijari/openpuck/commit/77437e415c04c3ccedd8d4b53d844d148390c144) Add per-type rumble disable for emulated controller modes - [`4292b95`](https://github.com/safijari/openpuck/commit/4292b95beecb8456427e2d36fa98ce829c0cef03) Fix comment: use v17 (not v10/v17) for per-type blob layout - [`5e1d221`](https://github.com/safijari/openpuck/commit/5e1d221a75ec5c4e0663025f6fa18fe076e326bf) Merge branch 'main' into copilot/add-disable-rumble-option ### 📊 Changes **6 files changed** (+138 additions, -114 deletions) <details> <summary>View changed files</summary> 📝 `OpenPuck/config.cpp` (+10 -6) 📝 `OpenPuck/config.h` (+4 -0) 📝 `OpenPuck/haptics.cpp` (+3 -0) 📝 `OpenPuck/mode_xinput.cpp` (+9 -6) 📝 `OpenPuck/webusb_config.cpp` (+61 -56) 📝 `docs/index.html` (+51 -46) </details> ### 📄 Description Emulated controller modes (Xbox, Switch, DS4, DS5) had no way to suppress host rumble relay per-type — only a global amplitude scale existed. This adds a `rumble` toggle to `TypeCfg`, parallel to `padHaptics`. ## Firmware - **`TypeCfg`** gains `uint8_t rumble` (1 = enabled, default). `g_rumble` live mirror added; `applyActiveType()` refreshes it. `CFG_MAGIC` bumped to `0xCF` — old flash discarded on first boot. - **`hapticSteamRumble()`**: drops ON commands when `g_rumble = 0`; zero/stop passes through to clear in-flight relay. - **`mode_xinput.cpp`**: skips `rumbleLow`/`rumbleHigh` tracking when disabled, preventing the stuck-rumble watchdog from firing spurious stop frames. ## WebUSB protocol (v17) - Per-type field stride: **8 → 9 bytes/type** (k=8 = rumble). All blob positions after the per-type block shift **+4**. - `WB_PAYLEN`: 176 → 180. Protocol version: 16 → **17**. ## Panel (`docs/index.html`) - Rumble toggle added to each controller-type tab alongside A/B swap and Trackpad haptics. - All shifted blob indices updated. Backup/restore includes the new field. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-10-22 05:07:46 +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#218
No description provided.