Fix gyro mouse coefficient. Change base gyro mouse settings.

This commit is contained in:
Travis Nickles 2017-06-24 19:09:03 -07:00
parent 588c2d4385
commit 64693190f0

View File

@ -27,8 +27,8 @@ namespace DS4Windows
deltaY = -arg.sixAxis.gyroYFull; deltaY = -arg.sixAxis.gyroYFull;
//Console.WriteLine(arg.sixAxis.deltaX); //Console.WriteLine(arg.sixAxis.deltaX);
double coefficient = (Global.getGyroSensitivity(deviceNumber) * 0.1) * 0.008; double coefficient = (Global.getGyroSensitivity(deviceNumber) * 0.01) * 0.0085;
double offset = 0.12; double offset = 0.16;
double tempAngle = System.Math.Atan2(-deltaY, deltaX); double tempAngle = System.Math.Atan2(-deltaY, deltaX);
double normX = System.Math.Abs(System.Math.Cos(tempAngle)); double normX = System.Math.Abs(System.Math.Cos(tempAngle));
double normY = System.Math.Abs(System.Math.Sin(tempAngle)); double normY = System.Math.Abs(System.Math.Sin(tempAngle));
@ -45,7 +45,7 @@ namespace DS4Windows
vRemainder = 0.0; vRemainder = 0.0;
} }
int deadzone = 13; int deadzone = 12;
//int deadzone = 0; //int deadzone = 0;
int deadzoneX = (int)System.Math.Abs(normX * deadzone); int deadzoneX = (int)System.Math.Abs(normX * deadzone);
int deadzoneY = (int)System.Math.Abs(normY * deadzone); int deadzoneY = (int)System.Math.Abs(normY * deadzone);
@ -82,7 +82,7 @@ namespace DS4Windows
} }
//hRemainder -= (int)hRemainder; //hRemainder -= (int)hRemainder;
verticalScale = Global.getGyroSensVerticalScale(deviceNumber) * 0.1; verticalScale = Global.getGyroSensVerticalScale(deviceNumber) * 0.01;
double yMotion = deltaY != 0 ? (coefficient * verticalScale) * deltaY + (normY * (offset * signY)) : 0; double yMotion = deltaY != 0 ? (coefficient * verticalScale) * deltaY + (normY * (offset * signY)) : 0;
int yAction = 0; int yAction = 0;
if (yMotion != 0.0) if (yMotion != 0.0)