Closed joshuatam closed 1 year ago
Howdy, thanks for leaving this! There’s a lot of detail here. Let me see if I can summarize what you’re saying, and you can correct me if I’ve missed something.
Your description of right analog calibration seems to indicate that hid-nx
is behaving properly. That seems good. Am I reading that right?
Your description of the button mappings changing is a bit puzzling. I’ve never used jstest-gtk
before, and I don’t have a Linux install handy for use right this moment. (I should probably rectify that.)
I looked up what that reset button does, and it doesn’t appear to respond to any signals at all (other than those set up by default). So it’s just restoring the default configuration saved in the program? I think? In any case, this might be an issue with jstest-gtk
rather than the driver. Will you let me know if you are able to reproduce this issue in another tool? (Especially a command-line tool would be ideal.)
I’ll probably close this issue if I don’t get a reproducible test case of something wrong, but I’ll give you some time to offer more information first.
@emilyst Yes, the right analog calibration reading is correct. In fact, when I am digging for the reason seems the 3rd party controller will return some values when calling nx_con_request_spi_flash_read
, and seems the values are not reasonable so hid_nx
ignore those values.
For the button mapping, I also think it might be an issue with jstest-gtk
too, do you know any differences between hid_nx
and hid_nintendo
when dealing with SDL? (Or is it related to SDL?)
@emilyst Yes, the right analog calibration reading is correct. In fact, when I am digging for the reason seems the 3rd party controller will return some values when calling
nx_con_request_spi_flash_read
, and seems the values are not reasonable sohid_nx
ignore those values.
I patched in a fix for this from the mainline module, so it’s nice to hear it works.
For the button mapping, I also think it might be an issue with
jstest-gtk
too, do you know any differences betweenhid_nx
andhid_nintendo
when dealing with SDL? (Or is it related to SDL?)
This is the first time you’ve mentioned SDL, so I’m not sure what problem you’re experiencing with it. In any case, SDL runs entirely in user space, so that should not be relevant at all.
It sounds as if the issues you’re having are not with the driver module, so I’m going to close this issue unless you have a specific, reproducible problem relevant to the kernel module. If you do, feel free to comment and reopen.
Hi, I am not sure whether I should report here, as I would like to get better compatability on a 3rd party switch pro controller, so I am comparing
hid_nx
with kernel 6.1hid_nintendo
, especially on the issues I found on the right analog default calibration and the buttons mapping.Right Analog Calibration
hid_nintendo
while the 3rd party one will have incorrect values.hid_nintendo
on a 3rd party controller, the right analog may have invalid values (it showsusing user cal for right stick...
in log).hid_nx
on both official and the 3rd party controllers, the right analog will have correct values, the main difference is the value checking at: https://github.com/emilyst/hid-nx-dkms/blob/974d6c407296c47390d99f008933846c86f52bb9/hid-nx.c#L1032-L1039Buttons Mapping
When using![螢幕快照 2023-01-15 03-30-35](https://user-images.githubusercontent.com/297250/212492821-1f36a5c8-fa5d-4b23-bb26-334fa2970495.png)
hid_nintendo
, the buttons mapped correctly and will not reset wrongly when using jstest-gtkWhen using![螢幕快照 2023-01-15 03-09-04](https://user-images.githubusercontent.com/297250/212492885-22597caf-6c57-45e8-b7d2-6242ffde9696.png)
hid_nx
, the buttons were first mapped correctly but will reset wrongly after clicking "restore button" in jstest-gtkI have already double checked with
evtest
, it is outputing values correctly (pressing minus button showingcode 314 (BTN_SELECT)
inevtest
), not sure why jstest-gtk will behave differently.Hope this help on making a more usable driver, I am willing to help on anything too :smile: