Skip to content
Commit 6b5dca2d authored by Daniel J. Ogorchock's avatar Daniel J. Ogorchock Committed by Jiri Kosina
Browse files

HID: nintendo: improve subcommand reliability



The controller occasionally doesn't respond to subcommands. It appears
that it's dropping them. To improve reliability, this patch attempts one
retry in the case of a synchronous send timeout. In testing, this has
resolved all timeout failures (most common for LED setting and rumble
setting subcommands).

The 1 second timeout is excessively long for rumble and LED subcommands,
so the timeout has been made a param for joycon_hid_send_sync. Most
subcommands continue to use the 1s timeout, since they can result in
long response times. Rumble and LED setting subcommands have been
reduced to 250ms, since response times for them are much quicker (and
this significantly reduces the observable impact in the case of a retry
being required).

Signed-off-by: default avatarDaniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent c4eae84f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment