v17 Nvidia Shield TV Joystick support
#31
OK, I've got the Shield controller working 100% reliably.

Most other controllers work... kinda. By that, I mean 80% of buttons work properly, but the other 20% still show up as keyboard presses.

I'll get the Shield controller fix in tonight's nightly and backport to Krypton for tomorrow's nightly.
Reply
#32
Double button presses will be fixed in tomorrow's nightly.
Reply
#33
I just tried the last nightly on shield 2017. Sad to report that it killed the controller fully (sorry i lied, it works but only the joystick, no buttons abxy or pad button etc). I restarted Kodi and enable joy stick restarted. Previous versions, it used to detect but then forgets about after the controller sleep. I have disabled the joy stick addon and at least now can use the joy stick. Btw, the remote never was the issue and I can use it any time.
lastly, i just renamed the .kodi folder and launched kodi again. It creates all the folders etc so brand new everything and right from the beginning, none of the button works. The two joystick on the controller worked.
Reply
#34
Kodi needs to know how your controller is mapped. You can configure your controller mapping with this guide: http://kodi.wiki/view/HOW-TO:Configure_controllers
Reply
#35
Is this required now? Krypton 17.0 detected all button ok and worked fine (not bothered about new/old button map). The problem was the after controller sleep, Kodi would forget the default mapping.
Now, in nightly, only joy stick works.
If I disable the joystick addon then it works without mapping etc.
Btw, I tried mapping buttons and it doesn't detects the button while mapping.
Just to reiterate thar I am using original joystick which came with shield tv 2017.
Reply
#36
(2017-03-05, 01:08)Shani-08 Wrote: Is this required now?

This is required for all new controllers. If you want your button map to be included in Kodi, upload it here.

If you don't want to map the buttons in joystick mode, disable the Joystick Support add-on and restart and Android will use the controller in keyboard mode.

(2017-03-05, 01:08)Shani-08 Wrote: Btw, I tried mapping buttons and it doesn't detects the button while mapping.

This is a bug in our android code. Until recently I wasn't an android developer, and I still don't have the tools setup that I need to fix this.

Is the controller better in keyboard mode, or joystick mode with missing buttons?
Reply
#37
Controller is working ok in joystick mode, I might need to do some button mapping for my liking.
Joystick mode just works with joy stick without any button. Problem is, this is a default. The joystick module is enabled by default and anyone taking the nightly (or rc1 when it is released) will have to disable it after installation.
I think I should also look into the code and see if I can help. I am just trying to achieve the state where default Kodi krypton installation works with shield out of the box and sleep issue is resolved.
Reply
#38
Hi

Just to confirm what shani-08 has said.

Im on a 2015 Shield TV and am using kodi-20170303-e0a6f4c-Krypton-armeabi-v7a.apk

Disabling the joystick support add-in has returned button functionality. Though this looks to break retroarch (more testing needed)

Will try and go back some nightly versions as the last I remember it working on was the Feb 26th Nightly
Reply
#39
(2017-03-05, 10:29)Shani-08 Wrote: Joystick mode just works with joy stick without any button. Problem is, this is a default. The joystick module is enabled by default and anyone taking the nightly (or rc1 when it is released) will have to disable it after installation.

This is the default because we need control over how buttons are mapped. I've never seen anything like this weird keyboard mode that uses some button maps hidden in Android. This is clearly to support java apps that don't need to carry extra joystick code, but Kodi needs access to joysticks without this weird keyboard shim.

The real solution is to have 100% of joysticks working out of the box. When joysticks don't work, it's because I haven't finished working on the problem.

The idea behind the controller window is that, in the rare cases it's needed, the user only has to see it once. After that, they can share their button map here, and it'll be included in all future releases of Kodi for all to enjoy.

On Android, it sucks to copy the button map off the internal sd card. There's been talk of an in-app GUI that can share your button map automatically, but this is a long way off.

(2017-03-05, 10:29)Shani-08 Wrote: I think I should also look into the code and see if I can help. I am just trying to achieve the state where default Kodi krypton installation works with shield out of the box and sleep issue is resolved.

There's a whole bunch of XML settings for Android in https://github.com/xbmc/xbmc/tree/master...aging/xbmc. There's a high chance that tweaking one of these, say to disable this keyboard shim, might fix the problem.

I'll keep digging into the code side of this. There's some weird idiosyncrasies with treating buttons as axes, so this might be a possible source of the bug.
Reply
#40
Appreciate you providing the insight. I understand it's a very complex setup and small glitch/oversight can bring issues like these. I guess, my understanding is that Kodi 17.0 release was working well with shield controller (atleast for me) and the problem with sleep I can see in the code. When it goes to sleep, Kodi receives the notification and release the mapping. However, controller waking up, not doing the mapping again. So, I'll have a look and see if I can find the issue. I understand same issue was resolved in betas but for shield 2015. However, the recent code change will create problem for anyone upgrading. I think the better way to handle is having a profile in mapping screen and one should just select it. This probably would be much appreciated than having controller not working on vanilla install.
I haven't worked on mapping side yet so I'll take little longer. Is there any documentation which could help me from coding point of view?
Reply
#41
(2017-03-05, 21:59)Shani-08 Wrote: I think the better way to handle is having a profile in mapping screen and one should just select it.

The problem is, if the user plugs in an unseen controller, Kodi doesn't have any data on its controller profiles. Where does this data come from?

(2017-03-05, 21:59)Shani-08 Wrote: I haven't worked on mapping side yet so I'll take little longer. Is there any documentation which could help me from coding point of view?

Every button map passes through the Peripheral API.
Reply
#42
Just went through the code and came to conclusion that the recent changes where you disabled the logging, also disabled the button mapping too, however, i can see that those changes just been corrected. I will test the nightly tonight. still haven't sorted my compilation pc. But many thanks to keep looking/fixing this for us.
Reply
#43
Haha yea, overzealous deletion on my part. Not the first time it's happened in the Kodi codebase Smile Maybe I should slack off a little so the next bug you find isn't already fixed Wink
Reply
#44
yeah, was little disappointed to be honest Smile Do you think the sleep bug was resolved? if not, i will focus on that then.
Reply
#45
Can you describe the sleep bug so i can reproduce?
Reply

Logout Mark Read Team Forum Stats Members Help
Nvidia Shield TV Joystick support0