Building with USB Controller Support

This page is a basic guide for compiling wfview with USB controller support.

1. Clone the repo

git clone -b rc28-shuttle https://gitlab.com/eliggett/wfview.git --depth 1

2. Edit wfview.pro

cd wfview
vim wfview.pro

Change this:

#Uncomment The following line to enable USB controllers (Shuttle/RC-28 etc.)
#DEFINES += USB_CONTROLLER

To this:

#Uncomment The following line to enable USB controllers (Shuttle/RC-28 etc.)
DEFINES += USB_CONTROLLER

Install the new dependencies:

sudo apt-get install libqt5gamepad5 libqt5gamepad5-dev
sudo apt-get install libhidapi-dev

Now build as usual

cd ..
mkdir build
cd build
qmake ../wfview/wfview.pro
make -j

Linux users of the Shuttle controllers will now need the following:

For udev, you must allow permissions so that wfview can use the controller. Add the following text to /etc/udev/rules.d/99-shuttle.rules

# for newer PRO model
ATTRS{name}=="Contour Design ShuttlePro" MODE="0644"
# for older PRO model
ATTRS{name}=="Contour Design ShuttlePRO v2" MODE="0644"
# for the Xpress model
ATTRS{name}=="Contour Design ShuttleXpress" MODE="0644"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="0666"

Just put all that in there. Re-connect the shuttle.

Now you will need to stop your system from assigning the shuttle control wheel as a scroll wheel.

Per this post on reddit, you can either modify your system’s x config to ignore it, or you can run this shell script on login:

#!/bin/bash
for DEV in `xinput --list | grep ShuttlePro | cut -d"=" -f2 | awk {'print $1'}`
do
      xinput disable ${DEV}
done

Running the shell script just disables the xinput on that particular device. There should be two that show up.

Within wfview, you can find the USB Controller button under Settings on the Experimental page.