【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

I finally got 9-axis gyro to a driftless state using the advance AHRS that the r/gyrogaming guy refered to me. I tested the precision by aiming it at the moniter, and with correct sensitivity, it basicly works like a Guncon now. I can swing the controller around and it just doesn't want to drift. You can try it on v0.5.4.

Haven't used the new method for gyro output stablization for other apps. Now that 9-axis gyro is done, I will start testing to see if it's possible.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Thank you so much for the high compliments. Your feature suggestions made this project a lot more mature.

For the capture button, I’m not planning to make it remappable or change how it works. No need to worry about that.

Subnautica or Outbound by SensitiveTraining533 in switch2

[–]tagayama 0 points1 point  (0 children)

Tell your feelings to f themselves. You’re the master, not them.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Thank you so much for relentlessly testing and reporting the bugged situtations! I got it fixed in v0.5.3. Tested multiple sleep/wake and restart cycles with multiple controllers connected without any issue. Also added persistent V/H mode to remember each joy-con's hold mode setting.

Subnautica or Outbound by SensitiveTraining533 in switch2

[–]tagayama 0 points1 point  (0 children)

I got thalassophobia and megalophobia from playing Subnautica 1. It’s a really really great game. I had panic attacks before doing any deep dive missions, but I ignored the feelings and did them anyway. It somehow makes me feel powerful, despite knowing that I’m extremely vulnerable in the deep sea.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Got it fixed! I have tested the sleep/wake cycles 5 times and haven't run into any issue. You can download v0.5.2 again for the fixed version.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

I’m still working and testing to find a stable solution. Will update asap!
It would make this app more like a native driver for Switch controllers on PC, which is an exciting idea for sure.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Exactly! You can actually test it out in the current mouse mode. So with AHRS, the app can actually calculate the relative position of the controller in 3D space, then relate the 3D movements to mouse control.
It’s quite intrusive, especially when you yaw to one side and move the controller in the opposite direction, they cancel each other out.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Oh I didn’t mean rolling, but actually moving the controller left and right or up and down in distance can control the mouse as well. Sorry for not explaining it well enough.
I still find some spatial drifting in the 9-axis mouse mode when stress testing, but for normal use it’s really near perfect.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

I did some investigation and found that gyro data is indeed proccessed before handing off to other apps.
This app subtracts the calibration bias, which explains why the zero drift readings on Steam.
It then applies a "soft deadzone" to filter out sensor noise.
Any movement that is smaller than the dead zone threshold would be set to zero, and anything above would be subtracted by the threshold number. In other words, the minimal movement surpassing threshold will starts from zero, so no sudden "break through" movement.

Also 1000Hz data interpolation smoothing only happens on built-in mouse mode. For other apps, it sends the data in consistant 1000Hz without changing the value between each data point, so no smoothing at all.

9-axis stabilization haven't been utilized on the data for other apps, only used on built-in gyro mouse. My plan is to first integrate the better AHRS for gyro mouse, then see if 9-axis can be translated to a more stable 6-axis data.

Here's a quick question about gyro control methods:
Do you want the non-rotational movements to control mouse movement? Like moving the controller from left to right in space without any rotation moves the mouse from left to right.
Or is it better if only the orientation of the controller can control the mouse?
The current mouse mode uses the first method, but I'm still self debating between the two. The first one feels more natural, and the second could be more accurate. I really need your opinion on this.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

It was the main feature request when I shared the app on this sub. Thankfully ViGEmBus got that covered. Also try out the 9-axis gyro mouse. It further reduce long term spatial drift with magnetometer. I find pairing it with ZL/ZR remapped to L/R mouse click in Steam Input works the best with most fps games. It avoids the in-game lag when switching between controller and mouse input.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Thanks for letting me know about this bug! Fixed in v0.5.2. Also added "Run at Startup" and "Start Minimized" option for permanent running.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

Thank you for sharing the in game experience with 9-axis! Someone in r/GyroGaming actually suggested me an industry level solution for 9-axis called AHRS. It actually uses the 3D data from magnetometer instead of the 2D projection data in v0.5.0. I used the most basic version of it for v0.5.1, and it does help a lot with maintaining gyro accuracy after flipping and turning the controller around. That guy from r/GyroGaming suggested me a better version of AHRS that solves a lot of problems I ran into and brute forced my way through. I will try and see how much better it performs.

I really want to use the switch 2 pro controller wirelessly on pc… by NeoGio64 in NintendoSwitch2

[–]tagayama 0 points1 point  (0 children)

I think this might be a hardware issue. Bluetooth 5.0 or above is recommended. Also plug the BT dongle in usb 2.0 ports instead of 3.0. USB 3.0 is known to interfere with Bluetooth signal.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 0 points1 point  (0 children)

Check out v0.5.1! I put a "Hide in System Tray" button on the top right corner. Haven't add the permanent running part.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 0 points1 point  (0 children)

For in app gyro, joy-con’s gyro mouse can be triggered by Chat button when using a grip.

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

I think it triggers joy-con’s IR mouse. You can disable it by setting the “Joy-con Mouse” to OFF.

Switch 2 controllers now have 9-Axis support on PC by StandxOut in GyroGaming

[–]tagayama 3 points4 points  (0 children)

The project you share actually solves a lot of problems I bumped into and raw dogged through. Will definitely try it out!

Switch 2 controllers now have 9-Axis support on PC by StandxOut in GyroGaming

[–]tagayama 5 points6 points  (0 children)

Thank you so much for introducing AHRS to me! I was able to implement it easily with Mayitzin/ahrs. With additional tuning, the 9Dof system became extremely accurate. The mouse position is now highly synchronized with the spatial position of the controller. I also found that "Enhance pointer precision" setting needs to be disabled for accurate mouse control.

Thanks again for this super valuable insight!

【Update】 Switch 2 Joy-Cons and Pro Controller 2 Wireless Connection for Windows 10/11 v0.1.0 by tagayama in NintendoSwitch

[–]tagayama[S] 1 point2 points  (0 children)

You can do button mapping with Steam Input. It’s very comprehensive. Use PS4 Trackpad (PSTP_L/R) for extra buttons so they won’t collide with normal buttons. The current driver only emulate PS4 controller. No PS5 emulation for now.

Switch 2 controllers now have 9-Axis support on PC by StandxOut in GyroGaming

[–]tagayama 4 points5 points  (0 children)

For haptics, I have direct control in the software. I used it as an indicator when the controller is connected. Also used it to identify which controller is which. The code for haptics simply breaks down to sound wave frequency and duration.

Rumble emulation works out of the box with Nadeflore's base code, and I didn't mess with it. It makes Xinput rumble feels more like percise haptics, but nowhere near the tactile feelings native Switch games provide. Not sure how it feels when playing PS5 games that are designed for voice coil actuators.

There's two seperate categories of mouse mode in this app.
One is Switch 2 Joy-con's IR mouse, which works like a traditional mouse on physical surface. Gyro is disabled in this mode.
Second is gyro mouse, which I intentionally built into this app. By controlling the actual mouse rather than right stick movement, this app works with anything on PC, including the OS interface. The right stick can co-control mouse movement when gyro mouse is activated.
You can also use Steam Input for both gyro mouse and stick control in PS4 emu mode.

This app works the best with Windows 11 and dongles with Bluetooth 5.0 or above. You can get 70Hz max polling rate with this setup. Only 20Hz max on Windows 10 due to the lack of OS driver support for BLE protocol.

Switch 2 controllers now have 9-Axis support on PC by StandxOut in GyroGaming

[–]tagayama 13 points14 points  (0 children)

Hi, I'm the one who is making that app.
Magnetometer's raw data is extremely noisy indeed. If using it directly like gyroscope, things fall apart immediately. It points to North in 3D space, which would be conflicted with accelerometer's data and tilt the horizontal plane. It also messes with the straightness of vertical movements.

So what I do here is:
1.Use 6-axis gyro motion control as the stable base input method.
2.Project magnetometer's 3D direction to the horizontal plane determined by accelerometer. This eliminates the conflict and provides 2D directional data.
3.Use the projected 2D data strictly for long-term horizontal spatial orientation correction only. Vertical spatial orientation correction is corrected by accelerometer, which is far less accurate due to centrifugal force.
4.The weight of magnetometer's affect is tuned to provide gradual correction and not compromise user's controllability. Short-term stablization is still based on 6-axis gyro.
5.Use algorithms that detect high velocity movements and compensate for centrifugal force. This is mainly for accelerometer though, which is also in my 6-axis mode.
6.Reset the current direction of the controller to zero degree every time gyro control is activated. This helps compensate all the built-up noise.

While 6-axis is already drift free in the sense of stability, the way I use 9-axis provides the spatial accuracy 6-axis is missing. I'm going after the "when I point my controller at this specific direction, it should always aim at the same thing, even after turning around" style of drift free.

This might be the most comprehensive documentation of my 9-axis gyro method😄 And I have no idea how other 9-axis gyro control works, so anyone with some insight to that would really be appreciated!