Gamepad xbox 360


I'm trying to get my ROV 2.6 with the x360 gamepad with cable usb, with windows 8.1, chrome / chrome canary. Gamepad with the test page works perfectly, but with the ROV is only the icon, but no key works.
Does anyone use it ? any thoughts on this.

Grazie 1000


Hi Franco

Did you try to press one of the colored buttons (Z, Y, B, A) after pluggin it in?

otherwise it won't work!



By pressing one of the four colored buttons appear the icon of gamepad, then nothing

Thank you


Has this been already resolved? I got exactly same situation, only the difference is that OS is Windows 7. ROV2.6 works fine with keyboard, x360 gamepad works fine with test page, cockpit recognizes gamepad and I can see gamepad icon but no responses to any gamepad buttons. Right clicking gamepad icon and opened java consol then I saw this message; 'navigator.webkitGetGamepads' is deprecated. Please use 'navigator.getGamepads' instead. As I don't know anything about java or any other programming languate, I don't know what to do. I don't want to do the 1st dive without gamepad so hopefully someone can help me out quickly....



Thank you very much Brian. I don’t even know how to “copy over the file on the same spot on whatever version of cockpit you are using today.” Sorry to bother but can you tell me how? Appreciate your help. Thanks again


Sorry for the delay Masatomo,

Did you manage to get this to work?

In short, you go to Start the samba file sharing service.

From windows, you then open up file explorer and go to \\ which should bring up the file system of the ROV. You then should be able to drag and drop the file from a folder on your computer on to the ROV. Simply restart the ROV and you should be good to go.


Thank you very much Brian. Now it’s working!


Hi All,

I copied the updated gamepad.js to static/js/libs

I have a OpenROV V2.6 with Xbox360 wired controller.

After the update, I am no longer seeing the gamepad icon and non of the controls seem to be working.

Any suggestions?




Hey Remy,

From your post, is it safe to assume that the gamepad icon would show up before you applied the update?



Hi Brian,

Yes - before the update the gamepad icon would appear upon pressing one of the four colored buttons. After the update, the icon no longer showed up.

The gamepad test page works fine.

I have used this code:

Is that the most recent update?

- Remy


I have not made any changes since then, so yes that is the latest code. What browser and O/S are you using? Did you upgrade because the icon would show but the controls would not work? Did it work in the past?



I am using Google Chrome Version 39.0.2171.95 m and Windows 7 Professional (64-bit)

I installed this driver:

Yes I did upgrade because the icon would show, but no response for any of the controls.

It has not worked before. Perhaps it conflicts with the MPU9150 code that I had updated as well?

- Remy


So the gamepad controls are done in the browser, so changes in the firmware won't affect the gamepad directly. If you can control the ROV via keyboard, then the firmware on the ROV's arduino is not an issue.

Had you tried the ROV with gamepad with the patch before installing the microsoft driver?

One possibility is that there are two gamepad.js files. If you overwrote the wrong one that could be an issue as well.

If you open developer tools and view the javascript console it would be interesting to see if you get any errors. Perhaps cut and paste the output after loading the page.


Will try uninstalling the driver and see how that works.

I know about the two gamepad.js files. One in static/js and one in static/js/libs. I only changed the latter.

Will copy you the errors on Monday when I get back to the office :)

Also, would you be able to explain whether I can simply overwrite the MPU9150 code in my original software release of the OpenROV V2.6 with this code: and how I should change line 41-44 to run in gyro-compass only mode?



Yes, you should be able to. If your goal is to upgrade just the MPU-9150 code that came with your 2.6 to the latest code, you will need to grab all four files related to the MPU9150. That is the MPU9150.cpp/h and the MPU9150lib.cpp/h.

Also just a FYI that there is also hardening code to help survive lockups on the I2C bus that require the upgrading the full image.

Worse case, you can always revert back to the original files if it does not behave as you would like.

The latest code is already set in gyro only mode. Lines and


Thanks Brian, I will overwrite all the four MPU9150 files. So I do not need to change anything about lines 41-44 in MPU9150.cpp?

I will upgrade the full image in due time, now I just want to upgrade the MPU9150 code to be able to display the IMU data.

Have a good weekend!


Hi Brian,

Just a quick update.

I managed to get the MPU-9150 code working by editing all four files related to the MPU9150!

I also managed to get gamepad.js working. I can now see the gamepad icon and I have figured out most of the controls. Unfortunately, the horizontal motors start running with every button I press on the gamepad controller. I don't think it has much to do with the sensitivity of the left stick (which appears to control the horizontal thrusters). How do I solve this?

I also have problems with the 7,8,9,0 keys on the keyboard. Is there any way I can disable the trim function?

I also noticed the following error in the javascript:

I'm almost there!




The indexdbshim erros should not be affecting anything. It is related to the blackbox logging code that stores telemetry data for later download. I will take a look as clearly it is trying to reach out on the net to download something which won't work when the ROV does not have internet access!

We have disabled the TRIM feature in the current release. You can do the same by going through the /src/plugins/rovpilot/public/js/rovpilot.js file and commenting out the trim keyboard mappings manually.

For the vertical thruster, there is a mtarg and motors telemetry item that would be useful in debugging. mtrag is the target value for the thrusters and motor is the actual value that has been sent so far. The middle value is the vertical thruster value. 1500 is neutral.

If the mtarg is neutral (1500,1500,1500) and you still see the motor spinning, then we are dealing with a calibration of the ESC issue.

If you do see mtarg changing, when we have to track down what is causing the value to change when pressing a button. If you are having issues with the trim functions, that could be to blame.


Ok, I changed the rovpilot code to and commented out all the trim functions.

This has successfully disabled the 7,8,9,0 keys :)

The gamepad is still not working though. There is motors, mtarg, and cmd go. All are neutral (1500,1500,1500) and no motors are spinning if I do not press any keys or buttons.

There is a simultaneous change for the motors, mtarg and cmd go values upon pressing a button and the motors start spinning accordingly.

I prefer the get the Xbox controller working, but if not successful, do you suggest the Logitech F310?

I also realized that for the keyboard, when I press and hold the arrow keys, the horizontal motor speed keeps increasing (regardless of the thrust factor). This happened after changing to the new rovpilot.js. I commented out lines 24,70,95-98,117-118,235-251. Did I make any mistakes here?