mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 17:29:18 +01:00
Adding new gyro values
Not sure if I will ever use them
This commit is contained in:
parent
bd379e5c7e
commit
8f78d5850e
@ -17,10 +17,13 @@ namespace DS4Windows
|
|||||||
{
|
{
|
||||||
public const int ACC_RES_PER_G = 8192;
|
public const int ACC_RES_PER_G = 8192;
|
||||||
private const float F_ACC_RES_PER_G = ACC_RES_PER_G;
|
private const float F_ACC_RES_PER_G = ACC_RES_PER_G;
|
||||||
|
public const int GYRO_RES_IN_DEG_SEC = 16;
|
||||||
|
private const float F_GYRO_RES_IN_DEG_SEC = GYRO_RES_IN_DEG_SEC;
|
||||||
|
|
||||||
public int gyroYaw, gyroPitch, gyroRoll, accelX, accelY, accelZ;
|
public int gyroYaw, gyroPitch, gyroRoll, accelX, accelY, accelZ;
|
||||||
public int outputAccelX, outputAccelY, outputAccelZ;
|
public int outputAccelX, outputAccelY, outputAccelZ;
|
||||||
public double accelXG, accelYG, accelZG;
|
public double accelXG, accelYG, accelZG;
|
||||||
|
public double angVelYaw, angVelPitch, angVelRoll;
|
||||||
public readonly int gyroYawFull, gyroPitchFull, gyroRollFull;
|
public readonly int gyroYawFull, gyroPitchFull, gyroRollFull;
|
||||||
public readonly int accelXFull, accelYFull, accelZFull;
|
public readonly int accelXFull, accelYFull, accelZFull;
|
||||||
public readonly byte touchID;
|
public readonly byte touchID;
|
||||||
@ -41,6 +44,10 @@ namespace DS4Windows
|
|||||||
gyroYawFull = -X; gyroPitchFull = Y; gyroRollFull = -Z;
|
gyroYawFull = -X; gyroPitchFull = Y; gyroRollFull = -Z;
|
||||||
accelXFull = -aX; accelYFull = -aY; accelZFull = aZ;
|
accelXFull = -aX; accelYFull = -aY; accelZFull = aZ;
|
||||||
|
|
||||||
|
angVelYaw = tempDouble = gyroYawFull / F_GYRO_RES_IN_DEG_SEC;
|
||||||
|
angVelPitch = tempDouble = gyroPitchFull / F_GYRO_RES_IN_DEG_SEC;
|
||||||
|
angVelRoll = tempDouble = gyroRollFull / F_GYRO_RES_IN_DEG_SEC;
|
||||||
|
|
||||||
accelXG = tempDouble = accelXFull / F_ACC_RES_PER_G;
|
accelXG = tempDouble = accelXFull / F_ACC_RES_PER_G;
|
||||||
accelYG = tempDouble = accelYFull / F_ACC_RES_PER_G;
|
accelYG = tempDouble = accelYFull / F_ACC_RES_PER_G;
|
||||||
accelZG = tempDouble = accelZFull / F_ACC_RES_PER_G;
|
accelZG = tempDouble = accelZFull / F_ACC_RES_PER_G;
|
||||||
|
Loading…
Reference in New Issue
Block a user