Refresh calibration data when pairing to or disconnecting a device from the Sony dongle

This commit is contained in:
Travis Nickles 2017-10-11 18:55:15 -05:00
parent 3a09132805
commit 0df84e1fba
2 changed files with 10 additions and 0 deletions

View File

@ -472,6 +472,14 @@ namespace DS4Windows
}
}
public void refreshCalibration()
{
byte[] calibration = new byte[41];
calibration[0] = conType == ConnectionType.BT ? (byte)0x05 : (byte)0x02;
hDevice.readFeatureData(calibration);
sixAxis.setCalibrationData(ref calibration, conType == ConnectionType.USB);
}
public void StartUpdate()
{
if (ds4Input == null)

View File

@ -197,6 +197,8 @@ namespace DS4Windows
{
deviceSerials.Add(serial);
}
device.refreshCalibration();
}
}
}