mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-04 06:34:45 +00:00
[PR #308] [MERGED] Enable raw IMU in every emulated gyro mode without reconnection #276
Labels
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
safijari/openpuck#276
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/safijari/openpuck/pull/308
Author: @FakeGiraffe93
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @safijari
Base:
main← Head:fix/gyro-all-modes📝 Commits (1)
f4c170eEnable raw IMU in every emulated gyro mode📊 Changes
1 file changed (+41 additions, -13 deletions)
View changed files
📝
OpenPuck/haptics.cpp(+41 -13)📄 Description
Problem
Gyro reported nothing in every emulated mode (Switch Pro, DS5, DS4, SInput), while Steam (puck) mode worked fine.
Steam can leave the controller's persisted
IMU_MODEoff, which suppresses the RF motion samples. #249 re-enabled it, but only forMODE_SW_PROand only fromhapticOnReconnect. So:hapticOnReconnectnever fires and the IMU stays off.Fix (
OpenPuck/haptics.cpp)modeWantsImu()lists every mode that reports motion: SW_PRO, DS5, DS4, SINPUT.imuForceRaw(slot)writesIMU_MODE = raw accel | raw gyrowhen the active mode wants motion. It replaces the Switch-Pro-only block inhapticOnReconnect.hapticTask()sends the same write to each connected slot on a mode change, and every 5 s as a keepalive in case something turns it back off mid-session.Puck/Steam mode is unaffected, because Steam still owns
IMU_MODEthere.Testing
On CachyOS Linux with Steam's gyro calibration screen and Eden's controller settings, gyro works again in:
Formatted with clang-format. CI pins v18; I used v23 locally, but the result matches the file's existing style.
🤖 Generated with Claude Code, proof read and edited by myself a human. i dont know how to code but i know enough to read.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.