13
0

Added support for the original Contour Design ShuttlePRO

This commit is contained in:
Peter Kovář 2020-05-28 21:30:15 +02:00 committed by Robin Gareus
parent c822f0b370
commit 630a3d07d2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
4 changed files with 15 additions and 3 deletions

View File

@ -41,7 +41,8 @@ using namespace ArdourSurface;
#include "pbd/abstract_ui.cc" // instantiate template
static const uint16_t ContourDesign = 0x0b33;
static const uint16_t ShuttlePRO_id = 0x0030;
static const uint16_t ShuttlePRO_id = 0x0010;
static const uint16_t ShuttlePRO_v2_id = 0x0030;
static const uint16_t ShuttleXpress_id = 0x0020;
static void LIBUSB_CALL event_callback (struct libusb_transfer* transfer);
@ -312,7 +313,11 @@ ContourDesignControlProtocol::acquire_device ()
}
else if ((err = get_usb_device (ContourDesign, ShuttlePRO_id, &dev)) == LIBUSB_SUCCESS) {
_device_type = ShuttlePRO;
} else {
}
else if ((err = get_usb_device (ContourDesign, ShuttlePRO_v2_id, &dev)) == LIBUSB_SUCCESS) {
_device_type = ShuttlePRO_v2;
}
else {
_device_type = None;
return err;
}

View File

@ -77,6 +77,7 @@ public:
enum DeviceType {
None = 0,
ShuttlePRO,
ShuttlePRO_v2,
ShuttleXpress
};

View File

@ -278,6 +278,11 @@ ContourDesignGUI::update_device_state ()
{
switch (_ccp.device_type ()) {
case ContourDesignControlProtocol::ShuttlePRO:
_device_state_lbl.set_markup ("<span weight=\"bold\" foreground=\"green\">Found ShuttlePRO</span>");
XpressButtonsSensitive (true);
ProButtonsSensitive (true);
break;
case ContourDesignControlProtocol::ShuttlePRO_v2:
_device_state_lbl.set_markup ("<span weight=\"bold\" foreground=\"green\">Found ShuttlePRO v2</span>");
XpressButtonsSensitive (true);
ProButtonsSensitive (true);

View File

@ -1,7 +1,8 @@
# This is a sample udev file to set "ContourDesign ShuttlePRO v2 and
# This is a sample udev file to set "ContourDesign ShuttlePRO, ShuttlePRO v2 and
# shuttleXpress" device permissions on GNU/Linux systems.
#
# copy this file to /etc/udev/rules.d/
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0030", MODE="660", GROUP="audio"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0020", MODE="660", GROUP="audio"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b33", ATTRS{idProduct}=="0010", MODE="660", GROUP="audio"