Skip to content

Commit

Permalink
fix an issue with filter rate calculation, fix steam and ps now, ps r…
Browse files Browse the repository at this point in the history
…emote
  • Loading branch information
Valkirie committed Dec 16, 2021
1 parent 24b1fc3 commit 0b703b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ControllerService/XInputController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ private unsafe void DS4_UpdateReport(object sender, ElapsedEventArgs e)
outDS4Report.sCurrentTouch.bTouchData2[2] = (byte)(touch.TrackPadTouch1.Y >> 4);
}

var rate = 1.0 / stopwatch.Elapsed.Milliseconds;
var rate = stopwatch.Elapsed.Milliseconds;
outDS4Report.wGyroX = (short)gyroFilter.axis1Filter.Filter(-AngularVelocity.X * F_GYRO_RES_IN_DEG_SEC, rate); // gyroPitchFull
outDS4Report.wGyroY = (short)gyroFilter.axis1Filter.Filter(-AngularVelocity.Y * F_GYRO_RES_IN_DEG_SEC, rate); // gyroYawFull
outDS4Report.wGyroZ = (short)gyroFilter.axis1Filter.Filter(AngularVelocity.Z * F_GYRO_RES_IN_DEG_SEC, rate); // gyroRollFull
Expand Down

0 comments on commit 0b703b2

Please sign in to comment.