Skip to content

Commit

Permalink
LegionGo: Accelerometer is 4g/s
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Jun 4, 2024
1 parent 3939ee9 commit 7483dbd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions HandheldCompanion/Controllers/LegionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,9 @@ public override void UpdateInputs(long ticks, float delta, bool commit)
default:
case LegionGo.LeftJoyconIndex:
{
aX = (short)(Data[34] << 8 | Data[35]) * -(2.0f / short.MaxValue);
aZ = (short)(Data[36] << 8 | Data[37]) * -(2.0f / short.MaxValue);
aY = (short)(Data[38] << 8 | Data[39]) * -(2.0f / short.MaxValue);
aX = (short)(Data[34] << 8 | Data[35]) * -(4.0f / short.MaxValue);
aZ = (short)(Data[36] << 8 | Data[37]) * -(4.0f / short.MaxValue);
aY = (short)(Data[38] << 8 | Data[39]) * -(4.0f / short.MaxValue);

gX = (short)(Data[40] << 8 | Data[41]) * -(2000.0f / short.MaxValue);
gZ = (short)(Data[42] << 8 | Data[43]) * -(2000.0f / short.MaxValue);
Expand All @@ -310,9 +310,9 @@ public override void UpdateInputs(long ticks, float delta, bool commit)

case LegionGo.RightJoyconIndex:
{
aX = (short)(Data[49] << 8 | Data[50]) * -(2.0f / short.MaxValue);
aZ = (short)(Data[47] << 8 | Data[48]) * (2.0f / short.MaxValue);
aY = (short)(Data[51] << 8 | Data[52]) * -(2.0f / short.MaxValue);
aX = (short)(Data[49] << 8 | Data[50]) * -(4.0f / short.MaxValue);
aZ = (short)(Data[47] << 8 | Data[48]) * (4.0f / short.MaxValue);
aY = (short)(Data[51] << 8 | Data[52]) * -(4.0f / short.MaxValue);

gX = (short)(Data[55] << 8 | Data[56]) * -(2000.0f / short.MaxValue);
gZ = (short)(Data[53] << 8 | Data[54]) * (2000.0f / short.MaxValue);
Expand Down

0 comments on commit 7483dbd

Please sign in to comment.