Leo_ui : GamePad

Hi all,

I try to control the leoRover with a gamepad by leo_ui.

i made a small script in JS on my PC to test. It works fine.

But when i implement that in the leo_ui, the gamepad detected but the function : navigator.getGamepad report “TypeError: navigator.getGamepad is not a function”.

That works in the same navigator but not for the Leo, maybe a missing package in the raspberry?

I start in Js and raspberry, sorry.

I think I found the problem. I tested with another server. The gamepad API is only enabled with a secure HTTPS connection.
Now, just find out how to activate https mode for the leo_ui server:
https://10.0.0.1 doesn’t work.

As far as I know HTTPS is produced when you have SSL certificate for the page and it needs the Internet connection for the certificate to check its authenticity. I’m not sure how to add SSL to the local IP, or if it’s even possible. But for sure you need to do it with your Rover connected to the Internet.