Added support for the original Contour Design ShuttlePRO
This commit is contained in:
parent
c822f0b370
commit
630a3d07d2
@ -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;
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ public:
|
||||
enum DeviceType {
|
||||
None = 0,
|
||||
ShuttlePRO,
|
||||
ShuttlePRO_v2,
|
||||
ShuttleXpress
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user