We plan to add the ability to configure different game controllers but it's not there yet. See
#197. In the meantime, you could modify Jog.py and add another config section for your game controller.
First ssh into your controller. You should be able do this on Linux or MacOS with the following command:
The default password is "buildbotics". Use something like Putty on Windows.
Then run these commands:
Code: Select all
sudo apt-get update
sudo apt-get install -y evtest
Again the default password is "buildbotics". Then plugin your game controller and run:
Code: Select all
sudo service bbctrl stop
sudo evtest
Select the number of the game controller device. Note the "Input device name: ..." section. You need this exact name in the config in Jog.py to match your controller. Now if you press buttons or move the axes on the controller the codes will be displayed on the screen. Exit evtest with CTRL-C.
Fill the codes into a new Jog.py config section using this template:
Code: Select all
"<input device name>": {
"deadband": 0.1,
"axes": [<x-axis stick>, <y-axis stick>, <z-axis stick>, <a-axis stick>],
"dir": [<x-axis direction>, <y-axis direction>, <z-axis direction>, <a-axis direction>],
"arrows": [<left arrow>, <right arrow>],
"speed": [<crawl speed>, <low speed>, <medium speed>, <high speed>],
"lock": [<horizontal axis lock>, <vertical axis lock>],
},
The directions settings are either 1 or -1. -1 reverses the direction. You can manually edit your Jog.py file like this:
Code: Select all
sudo nano /usr/local/lib/python3.5/dist-packages/bbctrl-0.4.12-py3.5.egg/bbctrl/Jog.py
Remember spaces are important in Python. You may have to modify the above path to match your installed firmware version. Note that Jog.py will get overwritten when you upgrade. If you get a working config, send it to me and I'll add it to the firmware permanently. As I said above, eventually this will all be configurable via the Web interface.
Good luck,
Joe