Change trackbar value for gyro

This commit is contained in:
Travis Nickles 2017-07-14 22:41:00 -05:00
parent e8f92b6b6e
commit 10621b8c69
2 changed files with 4 additions and 4 deletions

View File

@ -802,9 +802,9 @@ namespace DS4Windows
DS4StateExposed exposeState = Program.rootHub.ExposedState[tempDeviceNum]; DS4StateExposed exposeState = Program.rootHub.ExposedState[tempDeviceNum];
DS4State baseState = Program.rootHub.getDS4State(tempDeviceNum); DS4State baseState = Program.rootHub.getDS4State(tempDeviceNum);
SetDynamicTrackBarValue(tBsixaxisGyroX, (-exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroX, (exposeState.GyroYaw + tBsixaxisGyroX.Value * 2) / 3);
SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroY, (exposeState.GyroPitch + tBsixaxisGyroY.Value * 2) / 3);
SetDynamicTrackBarValue(tBsixaxisGyroZ, (-exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisGyroZ, (exposeState.GyroRoll + tBsixaxisGyroZ.Value * 2) / 3);
SetDynamicTrackBarValue(tBsixaxisAccelX, (-exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelX, (-exposeState.AccelX + tBsixaxisAccelX.Value * 2) / 3);
SetDynamicTrackBarValue(tBsixaxisAccelY, (-exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelY, (-exposeState.AccelY + tBsixaxisAccelY.Value * 2) / 3);
SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3); SetDynamicTrackBarValue(tBsixaxisAccelZ, (exposeState.AccelZ + tBsixaxisAccelZ.Value * 2) / 3);

View File

@ -56,9 +56,9 @@ namespace DS4Windows
gyro = value; gyro = value;
} }
public int GyroYaw { get { return (short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } } public int GyroYaw { get { return -(short)((ushort)(gyro[3] << 8) | gyro[2]) / 256; } }
public int GyroPitch { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } } public int GyroPitch { get { return (short)((ushort)(gyro[1] << 8) | gyro[0]) / 256; } }
public int GyroRoll { get { return (short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } } public int GyroRoll { get { return -(short)((ushort)(gyro[5] << 8) | gyro[4]) / 256; } }
public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } } public int AccelX { get { return (short)((ushort)(accel[1] << 8) | accel[0]) / 64; } }
public int getAccelX() public int getAccelX()