glutanimate / anjoy-public

Temporary repository to host bug reports and documentation for the AnJoy Anki add-on
https://www.patreon.com/glutanimate/posts?tag=AnJoy
3 stars 0 forks source link

Improve support for Nintendo Switch Pro Controller #10

Open naijaprince opened 4 years ago

naijaprince commented 4 years ago

Problem description

I'm trying to use this with my Nintendo Switch Pro Controller. It seems to be supported, but seems to only connect when I have it plugged in via USB but doesn't connect on bluetooth (usually have to plug & unplug to connect on bluetooth) As soon as i start Anki and plug my controller in, it starts going through the cards rapid fire without me giving any input.

Checklist

Please replace the space inside the brackets with an x if the following items apply:

Information about your Anki set-up

Please fill out the section corresponding with your Anki version:

If you are using Anki 2.1

Please open Anki, go to Help → About, click on "Copy Debug Info", and paste the result between the backticks below (if the button does not appear you are using an older version of Anki 2.1 and will need to update first):

===ANKI===

Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Mac 10.15
Flags: frz=True ao=True sv=1

Add-ons:

Speed Focus Mode auto-alert auto-reveal auto-fail
Image Occlusion Enhanced for Anki 21 alpha
Night Mode
Media Import
Pop-up Dictionary beta
Hierarchical Tags Addon 20  21
Progress Bar
Button Colours Good Again
Progress Graphs and Stats for Learned and Matured Cards
Edit Field During Review Cloze (disabled)
True Retention
Advanced Browser
AnJoy
Review Heatmap

===ANJOY===

version: 0.1.0-beta.1
[
    {
        "id": "Pro Controller (Vendor: 057e Product: 2009)",
        "index": 0,
        "connected": true,
        "timestamp": 148907.29999999894,
        "mapping": "",
        "axes": [
            0,
            0,
            0,
            0,
            0.060044288635253906,
            0,
            0,
            0,
            0,
            0
        ],
        "buttons": [
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            },
            {
                "pressed": false,
                "value": 0
            }
        ],
        "vibrationActuator": null
    },
    null,
    null,
    null,
    4,
    "function item() { [native code] }"
]

Index: 0
If you are using Anki 2.0

Please open Anki, go to Help → About, find the two lines starting with Version: and Qt, and copy-paste them between the backticks below:

Please fill in details about your operating system (Windows/macOS/Linux, which version):

Please open Anki, go to Tools → Add-ons, take a screenshot of your installed add-ons, and paste it below: image

Error message (if any)

If you've received an error message, please copy and paste it between the backticks below:

glutanimate commented 4 years ago

Hey Naija!

Thanks so much for taking the time to file as detailed a bug report like this! I saw your post on Patreon and was about to ask you about your debug info, but clearly you were thinking ahead :)

Just looking at the debug output so far there is nothing in particular that immediately jumps out to me, so let's try to dig a bit deeper. Could you try the following for me please:

  1. See if you can once again reproduce the situation where Anki starts rapid-firing through the reviews with the controller connected
  2. Once the bug appears, I would love for you to head to https://html5gamepad.com to check and see if the website detects any button press or axis movement without you doing anything

This should help us identify if the issue is system-wide or limited to Anki.

Thanks again in advance!

naijaprince commented 4 years ago

Thanks! So I was able to reproduce the situation, and the website didn't note any axis movement or button press or axis movement so I believe it is limited to Anki. When I test the controller on the website, it is 100% responsive and responds w/ appropriate buttons and movements.

naijaprince commented 4 years ago

After playing around with it, I was able to get some functionality with my pro controller. However, it seems that the addon does not register my d pad.

sergiogoro commented 4 years ago

After playing around with it, I was able to get some functionality with my pro controller. However, it seems that the addon does not register my d pad.

Hello, Could you elaborate a little on this please? It's working fine now? How do you solved it?

Thanks