- Changed things back to non-DS4 gyro times

This commit is contained in:
David Khachaturov 2020-05-06 13:41:57 +01:00
parent 7d75f396d7
commit 38609c0fd7
4 changed files with 4 additions and 21 deletions

View file

@ -102,8 +102,8 @@
<Reference Include="JetBrains.Annotations, Version=2020.1.0.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
<HintPath>..\packages\JetBrains.Annotations.2020.1.0\lib\net20\JetBrains.Annotations.dll</HintPath>
</Reference>
<Reference Include="Nefarius.ViGEm.Client, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nefarius.ViGEm.Client.1.0.0\lib\net452\Nefarius.ViGEm.Client.dll</HintPath>
<Reference Include="Nefarius.ViGEm.Client, Version=1.16.150.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nefarius.ViGEm.Client.1.16.150\lib\net452\Nefarius.ViGEm.Client.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View file

@ -1003,23 +1003,6 @@ namespace BetterJoyForCemu {
ds4.SetSliderValue(DualShock4Slider.LeftTrigger, (byte)(buttons[(int)(isLeft ? Button.SHOULDER_2 : Button.SHOULDER_1)] ? Byte.MaxValue : 0));
ds4.SetSliderValue(DualShock4Slider.RightTrigger, (byte)(buttons[(int)(isLeft ? Button.SHOULDER_1 : Button.SHOULDER_2)] ? Byte.MaxValue : 0));
}
// Gyro and accel
// Timestamp is in us. DS4 is in 5.33us
ushort dt = (ushort)((Timestamp - lag) * 3 / 16);
ds4_ts += dt;
ds4.SetIMUTimestamp(ds4_ts);
Vector3 gyr = GetGyro() * 16;
ds4.SetIMUValue(DualShock4IMU.GyroX, (short) gyr.Y);
ds4.SetIMUValue(DualShock4IMU.GyroY, (short) -gyr.Z);
ds4.SetIMUValue(DualShock4IMU.GyroZ, (short) -gyr.X);
Vector3 acc = GetAccel() * 8192f;
ds4.SetIMUValue(DualShock4IMU.AccelX, (short) -acc.Y);
ds4.SetIMUValue(DualShock4IMU.AccelY, (short) acc.Z);
ds4.SetIMUValue(DualShock4IMU.AccelZ, (short) -acc.X);
lag = Timestamp;
}
// Get Gyro/Accel data

View file

@ -109,7 +109,7 @@
this.version_lbl.Name = "version_lbl";
this.version_lbl.Size = new System.Drawing.Size(28, 13);
this.version_lbl.TabIndex = 2;
this.version_lbl.Text = "v6.0";
this.version_lbl.Text = "v6.1";
//
// passiveScanBox
//

View file

@ -2,6 +2,6 @@
<packages>
<package id="Crc32.NET" version="1.2.0" targetFramework="net461" />
<package id="JetBrains.Annotations" version="2020.1.0" targetFramework="net461" />
<package id="Nefarius.ViGEm.Client" version="1.0.0" targetFramework="net461" />
<package id="Nefarius.ViGEm.Client" version="1.16.150" targetFramework="net461" />
<package id="WindowsInput" version="6.1.1" targetFramework="net461" />
</packages>