feat: Normalize IMU data and use buffers for IMU's - #612
Conversation
02b9181 to
208de6a
Compare
208de6a to
5708e71
Compare
This PR does a major overhaul of how IMU data is managed across every aspect of InputPlumber. - All source device drivers now normalize IMU data into radians per second for gyroscope data and meters per second squared for accelerometer data. - All target devices now denormalize Accelerometer and Gyroscope events into their native format (typically LSB). - Split BMI and AccelGyro3D Drivers. The AccelGyro3D source device driver now configures a buffer and follows an asynchronous drain/refill pattern to create events. This reduces CPU and RAM overhead by reducing the number of reads per event from 3-6 to 1. This also has the benefit of reducing jitter when using AccelGyro3D based devices as the entire event is now based on a single timestamp, when the old method had significant drift during each poll. - Removes deprecated Gamepad::Accelerometer and Gamepad:Gyro events.
5708e71 to
041db89
Compare
|
I hit the DS5 accelerometer saturation this PR fixes: the hidraw source forwards raw counts, Reading the new constants, the forward direction looks right but the inverses look wrong. Each pair should round-trip to 1 and neither does: Raw to SI to raw loses the resolution factor each time.
The driver applies the forward constants as raw to SI (
I have DualSense Edge hardware on Bluetooth and USB. I can test the branch and send the constant fix as a PR against it. |
|
Awesome, thanks. This PR is kinda stuck at the moment but I plan to break it up into a few separate PR's. I haven't gone through to validate all the value changes, I think I made quite a few mistakes. I'll be sure to review your input here when I'm working on the SI standardization piece. |
This PR does a major overhaul of how IMU data is managed across every aspect of InputPlumber.