Change control keys


#1

It is possible change keys that run the motors ?

I have a problem with shift key, I think that winXP intercept key, so it is very difficult control rov's vertical motor.

Thank's

Saverio


#2

Hi Saverio,

There is no UI to change the key configuration at the moment.

But you can directly change the key in the file /opt/openrov/src/plugins/rovpilot/public/js/rovpilot.js

(the full source for it is here: https://github.com/OpenROV/openrov-software/blob/master/src/plugins/rovpilot/public/js/rovpilot.js)

Around line 102 we setup the key mapping.

Regards,

Dominik


#3

Thank you very much for info. I saw the code, it is simple change keycode.

I thinked to change rovpilot.js by SSH connection to bash interface on rov, but I didn't find the file.

Can I edit file with "sudo pico.... " or I need follow other method ?

Can you say me the path of rovpilot.js on rov ?

Bye


#4

Hi,

The file would be under /opt/openrov/src/plugins/rovpilot/public/js/rovpilot.js

That is, if you have the current version of the cockpit.

What Version of OpenROV are ou building and what image did you use?

Regards,

Dominik


#5

I downloaded OpenOV-2.5_05.img.

In opt/openrov/src there are four files:

app.js

cockpit.js

lib (dir)

static (dir)

Regards


#6

Ok, that means you don't have to latest version of the cockpit.

in this case, the mapping is in src/static/js/keypad.js.

We're working on a new image with the latest version of the cockpit.

If you have connected your ROV to an router and therefore to the internet, you can execute:

cd /opt/openrov
sudo /etc/init.d/openrov stop
sudo git pull origin master
sudo /opt/node/bin/npm install
sudo reboot

and after the device started again

sudo /opt/openrov/linux/arduino/firmware-installfromsource.sh

Regads,
Dominik

#7

I found the code, modified file and reload, Lift run good now on key 88 (X)thank's.

About new image, can I download it and write on microSD ?

I follow this method last time.


#8

As soon as we release the new version, yes.

Keep an eye on the blog (front page of openrov.com)


#9

Ok, great support, many thank's.