kopia lustrzana https://gitlab.com/eliggett/wfview
Provisional support for knobs
rodzic
17a6547264
commit
a8951813f5
|
@ -16,6 +16,7 @@ controllerSetup::controllerSetup(QWidget* parent) :
|
|||
|
||||
connect(&onEvent, SIGNAL(currentIndexChanged(int)), this, SLOT(onEventIndexChanged(int)));
|
||||
connect(&offEvent, SIGNAL(currentIndexChanged(int)), this, SLOT(offEventIndexChanged(int)));
|
||||
connect(&knobEvent, SIGNAL(currentIndexChanged(int)), this, SLOT(knobEventIndexChanged(int)));
|
||||
}
|
||||
|
||||
controllerSetup::~controllerSetup()
|
||||
|
@ -50,48 +51,80 @@ void controllerSetup::mousePressed(QPoint p)
|
|||
}
|
||||
onEvent.blockSignals(true);
|
||||
onEvent.move(p);
|
||||
onEvent.setCurrentIndex(currentButton->onCommand->index);
|
||||
onEvent.setCurrentIndex(onEvent.findData(currentButton->onCommand->index));
|
||||
onEvent.show();
|
||||
onEvent.blockSignals(false);
|
||||
|
||||
p.setY(p.y() + 40);
|
||||
offEvent.blockSignals(true);
|
||||
offEvent.move(p);
|
||||
offEvent.setCurrentIndex(currentButton->offCommand->index);
|
||||
offEvent.setCurrentIndex(offEvent.findData(currentButton->offCommand->index));
|
||||
offEvent.show();
|
||||
offEvent.blockSignals(false);
|
||||
|
||||
knobEvent.hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
for (KNOB& k : *knobs)
|
||||
{
|
||||
if (k.dev == currentDevice && k.pos.contains(p))
|
||||
{
|
||||
found = true;
|
||||
currentKnob = &k;
|
||||
qDebug() << "Knob" << currentKnob->num << "Event" << currentKnob->command->text;
|
||||
if (knobEventProxy == Q_NULLPTR) {
|
||||
knobEventProxy = scene->addWidget(&knobEvent);
|
||||
}
|
||||
knobEvent.blockSignals(true);
|
||||
knobEvent.move(p);
|
||||
knobEvent.setCurrentIndex(knobEvent.findData(currentKnob->command->index));
|
||||
knobEvent.show();
|
||||
knobEvent.blockSignals(false);
|
||||
onEvent.hide();
|
||||
offEvent.hide();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
onEvent.hide();
|
||||
offEvent.hide();
|
||||
knobEvent.hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void controllerSetup::onEventIndexChanged(int index) {
|
||||
qDebug() << "On Event for button" << currentButton->num << "Event" << index;
|
||||
if (currentButton != Q_NULLPTR && index < commands->size()) {
|
||||
currentButton->onCommand = &commands->at(index);
|
||||
Q_UNUSED(index);
|
||||
if (currentButton != Q_NULLPTR && onEvent.currentData().toInt() < commands->size()) {
|
||||
currentButton->onCommand = &commands->at(onEvent.currentData().toInt());
|
||||
currentButton->onText->setPlainText(currentButton->onCommand->text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void controllerSetup::offEventIndexChanged(int index) {
|
||||
qDebug() << "Off Event for button" << currentButton->num << "Event" << index;
|
||||
if (currentButton != Q_NULLPTR && index < commands->size()) {
|
||||
currentButton->offCommand = &commands->at(index);
|
||||
Q_UNUSED(index);
|
||||
if (currentButton != Q_NULLPTR && offEvent.currentData().toInt() < commands->size()) {
|
||||
currentButton->offCommand = &commands->at(offEvent.currentData().toInt());
|
||||
currentButton->offText->setPlainText(currentButton->offCommand->text);
|
||||
}
|
||||
}
|
||||
|
||||
void controllerSetup::knobEventIndexChanged(int index) {
|
||||
Q_UNUSED(index);
|
||||
if (currentKnob != Q_NULLPTR && knobEvent.currentData().toInt() < commands->size()) {
|
||||
currentKnob->command = &commands->at(knobEvent.currentData().toInt());
|
||||
currentKnob->text->setPlainText(currentKnob->command->text);
|
||||
}
|
||||
}
|
||||
|
||||
void controllerSetup::newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<COMMAND>* cmd)
|
||||
|
||||
void controllerSetup::newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<KNOB>* kb, QVector<COMMAND>* cmd)
|
||||
{
|
||||
buttons = but;
|
||||
knobs = kb;
|
||||
commands = cmd;
|
||||
|
||||
// Remove any existing button text:
|
||||
|
@ -107,10 +140,18 @@ void controllerSetup::newDevice(unsigned char devType, QVector<BUTTON>* but, QVe
|
|||
scene->removeItem(bgImage);
|
||||
delete bgImage;
|
||||
bgImage = Q_NULLPTR;
|
||||
if (onEventProxy != Q_NULLPTR)
|
||||
if (onEventProxy != Q_NULLPTR) {
|
||||
scene->removeItem(onEventProxy);
|
||||
if (offEventProxy != Q_NULLPTR)
|
||||
onEventProxy = Q_NULLPTR;
|
||||
}
|
||||
if (offEventProxy != Q_NULLPTR) {
|
||||
scene->removeItem(offEventProxy);
|
||||
offEventProxy = Q_NULLPTR;
|
||||
}
|
||||
if (knobEventProxy != Q_NULLPTR) {
|
||||
scene->removeItem(knobEventProxy);
|
||||
knobEventProxy = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
QImage image;
|
||||
|
||||
|
@ -151,35 +192,46 @@ void controllerSetup::newDevice(unsigned char devType, QVector<BUTTON>* but, QVe
|
|||
|
||||
onEvent.blockSignals(true);
|
||||
offEvent.blockSignals(true);
|
||||
knobEvent.blockSignals(true);
|
||||
onEvent.clear();
|
||||
offEvent.clear();
|
||||
knobEvent.clear();
|
||||
|
||||
onEvent.setMaxVisibleItems(5);
|
||||
offEvent.setMaxVisibleItems(5);
|
||||
knobEvent.setMaxVisibleItems(5);
|
||||
onEvent.view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
offEvent.view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
knobEvent.view()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
||||
onEvent.setStyleSheet("combobox-popup: 0;");
|
||||
offEvent.setStyleSheet("combobox-popup: 0;");
|
||||
knobEvent.setStyleSheet("combobox-popup: 0;");
|
||||
|
||||
for (COMMAND &c : *commands) {
|
||||
onEvent.addItem(c.text);
|
||||
offEvent.addItem(c.text);
|
||||
if (c.cmdType == commandButton || c.text == "None") {
|
||||
onEvent.addItem(c.text,c.index);
|
||||
offEvent.addItem(c.text,c.index);
|
||||
}
|
||||
|
||||
if (c.cmdType == commandKnob || c.text == "None") {
|
||||
knobEvent.addItem(c.text,c.index);
|
||||
}
|
||||
}
|
||||
|
||||
onEvent.blockSignals(false);
|
||||
offEvent.blockSignals(false);
|
||||
knobEvent.blockSignals(false);
|
||||
|
||||
// Set button text
|
||||
for (BUTTON& b : *buttons)
|
||||
{
|
||||
|
||||
if (b.dev == currentDevice) {
|
||||
//b.onCommand = &commands->at(0);
|
||||
b.onText = new QGraphicsTextItem(b.onCommand->text);
|
||||
b.onText->setDefaultTextColor(b.textColour);
|
||||
scene->addItem(b.onText);
|
||||
b.onText->setPos(b.pos.x(), b.pos.y());
|
||||
|
||||
//b.offCommand = &commands->at(0);
|
||||
b.offText = new QGraphicsTextItem(b.offCommand->text);
|
||||
b.offText->setDefaultTextColor(b.textColour);
|
||||
scene->addItem(b.offText);
|
||||
|
@ -187,6 +239,18 @@ void controllerSetup::newDevice(unsigned char devType, QVector<BUTTON>* but, QVe
|
|||
}
|
||||
}
|
||||
|
||||
// Set knob text
|
||||
|
||||
for (KNOB& k : *knobs)
|
||||
{
|
||||
if (k.dev == currentDevice) {
|
||||
k.text = new QGraphicsTextItem(k.command->text);
|
||||
k.text->setDefaultTextColor(k.textColour);
|
||||
scene->addItem(k.text);
|
||||
k.text->setPos(k.pos.x(), k.pos.y());
|
||||
}
|
||||
}
|
||||
|
||||
ui->graphicsView->setSceneRect(scene->itemsBoundingRect());
|
||||
ui->graphicsView->resize(ui->graphicsView->sizeHint());
|
||||
//this->resize(this->sizeHint());
|
||||
|
|
|
@ -38,10 +38,11 @@ signals:
|
|||
void sendSensitivity(int val);
|
||||
|
||||
public slots:
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<COMMAND>* cmd);
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<KNOB>* kb, QVector<COMMAND>* cmd);
|
||||
void mousePressed(QPoint p);
|
||||
void onEventIndexChanged(int index);
|
||||
void offEventIndexChanged(int index);
|
||||
void knobEventIndexChanged(int index);
|
||||
void receiveSensitivity(int val);
|
||||
void on_sensitivitySlider_valueChanged(int val);
|
||||
|
||||
|
@ -55,12 +56,16 @@ private:
|
|||
QLabel* imgLabel;
|
||||
unsigned char currentDevice = 0;
|
||||
QVector<BUTTON>* buttons;
|
||||
QVector<KNOB>* knobs;
|
||||
QVector<COMMAND>* commands;
|
||||
BUTTON* currentButton=Q_NULLPTR;
|
||||
BUTTON* currentButton = Q_NULLPTR;
|
||||
KNOB* currentKnob = Q_NULLPTR;
|
||||
QComboBox onEvent;
|
||||
QComboBox offEvent;
|
||||
QGraphicsProxyWidget* onEventProxy=Q_NULLPTR;
|
||||
QGraphicsProxyWidget* offEventProxy=Q_NULLPTR;
|
||||
QComboBox knobEvent;
|
||||
QGraphicsProxyWidget* onEventProxy = Q_NULLPTR;
|
||||
QGraphicsProxyWidget* offEventProxy = Q_NULLPTR;
|
||||
QGraphicsProxyWidget* knobEventProxy = Q_NULLPTR;
|
||||
QString deviceName;
|
||||
|
||||
};
|
||||
|
|
|
@ -96,6 +96,11 @@ void usbController::receiveButtons(QVector<BUTTON>* buts)
|
|||
buttonList = buts;
|
||||
}
|
||||
|
||||
void usbController::receiveKnobs(QVector<KNOB>* kbs)
|
||||
{
|
||||
qDebug(logUsbControl()) << "Receiving knobs";
|
||||
knobList = kbs;
|
||||
}
|
||||
|
||||
void usbController::run()
|
||||
{
|
||||
|
@ -201,7 +206,7 @@ void usbController::run()
|
|||
qInfo(logUsbControl()) << "Button Guide" << pressed;
|
||||
});
|
||||
|
||||
emit newDevice(usbDevice, buttonList, commands); // Let the UI know we have a new controller
|
||||
emit newDevice(usbDevice, buttonList, knobList, commands); // Let the UI know we have a new controller
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -240,6 +245,19 @@ void usbController::run()
|
|||
this->handle = hid_open_path(this->path.toLocal8Bit());
|
||||
}
|
||||
|
||||
|
||||
/* ADDED FOR DEBUGGING ONLY MUST BE REMOVED!*/
|
||||
//this->manufacturer = "EESDR";
|
||||
//this->product = "ecoderplus";
|
||||
//this->serial = "1";
|
||||
//usbDevice = eCoderPlus;
|
||||
// Let the UI know we have a new controller
|
||||
//emit newDevice(usbDevice, buttonList, knobList, commands);
|
||||
// Run the periodic timer to get data
|
||||
//QTimer::singleShot(25, this, SLOT(runTimer()));
|
||||
//return;
|
||||
/********************************************/
|
||||
|
||||
if (this->handle)
|
||||
{
|
||||
qInfo(logUsbControl()) << QString("Connected to device: %0 from %1 S/N %2").arg(this->product).arg(this->manufacturer).arg(this->serial);
|
||||
|
@ -255,7 +273,7 @@ void usbController::run()
|
|||
}
|
||||
|
||||
// Let the UI know we have a new controller
|
||||
emit newDevice(usbDevice, buttonList, commands);
|
||||
emit newDevice(usbDevice, buttonList, knobList, commands);
|
||||
// Run the periodic timer to get data
|
||||
QTimer::singleShot(25, this, SLOT(runTimer()));
|
||||
}
|
||||
|
@ -278,6 +296,11 @@ void usbController::run()
|
|||
void usbController::runTimer()
|
||||
{
|
||||
int res=1;
|
||||
if (!this->handle) {
|
||||
// Something bad happened!
|
||||
QTimer::singleShot(25, this, SLOT(runTimer()));
|
||||
res = 0;
|
||||
}
|
||||
|
||||
while (res > 0) {
|
||||
QByteArray data(HIDDATALENGTH, 0x0);
|
||||
|
@ -285,7 +308,7 @@ void usbController::runTimer()
|
|||
if (res < 0)
|
||||
{
|
||||
qInfo(logUsbControl()) << "USB Device disconnected" << this->product;
|
||||
emit newDevice(0, buttonList, commands);
|
||||
emit newDevice(0, buttonList, knobList, commands);
|
||||
this->product = "";
|
||||
this->manufacturer = "";
|
||||
this->serial = "<none>";
|
||||
|
@ -361,6 +384,8 @@ void usbController::runTimer()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
buttons = tempButtons;
|
||||
jogpos = tempJogpos;
|
||||
shutpos = tempShutpos;
|
||||
|
@ -475,7 +500,7 @@ void usbController::runTimer()
|
|||
lastData = data;
|
||||
}
|
||||
}
|
||||
else if (usbDevice == eCoderPlus && data.length() >= 0x0f && (quint8)data[0] == 0xff) {
|
||||
else if (usbDevice == eCoderPlus && data.length() > 0x0f && (quint8)data[0] == 0xff) {
|
||||
/* Button matrix:
|
||||
DATA3 DATA2 DATA 1
|
||||
765432107654321076543210
|
||||
|
@ -501,6 +526,7 @@ void usbController::runTimer()
|
|||
000000000000000000000010 = button1
|
||||
*/
|
||||
quint32 tempButtons = ((quint8)data[3] << 16) | ((quint8)data[2] << 8) | ((quint8)data[1] & 0xff);
|
||||
quint32 tempKnobs = ((quint8)data[16] << 16) | ((quint8)data[15] << 8) | ((quint8)data[14] & 0xff);
|
||||
|
||||
if (buttons != tempButtons)
|
||||
{
|
||||
|
@ -512,12 +538,14 @@ void usbController::runTimer()
|
|||
if ((tempButtons >> i & 1) && !(buttons >> i & 1) && but->onCommand->index > 0)
|
||||
{
|
||||
qDebug(logUsbControl()) << "On Button event:" << but->onCommand->text;
|
||||
emit button(but->onCommand);
|
||||
COMMAND cmd = *but->onCommand;
|
||||
emit button(&cmd);
|
||||
}
|
||||
else if ((buttons >> i & 1) && !(tempButtons >> i & 1) && but->offCommand->index > 0)
|
||||
{
|
||||
qDebug(logUsbControl()) << "Off Button event:" << but->offCommand->text;
|
||||
emit button(but->offCommand);
|
||||
COMMAND cmd = *but->offCommand;
|
||||
emit button(&cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -525,7 +553,26 @@ void usbController::runTimer()
|
|||
}
|
||||
buttons = tempButtons;
|
||||
|
||||
// Will this work for the tuning knob?
|
||||
if (knobs != tempKnobs) {
|
||||
// One of the knobs has moved
|
||||
for (unsigned char i = 0; i < 3; i = i++) {
|
||||
for (KNOB* kb = knobList->begin(); kb != knobList->end(); kb++) {
|
||||
if (kb->dev == usbDevice && kb->num == i+1) {
|
||||
if ((tempKnobs >> (i*8) & 0xff) != (knobs >> (i*8) & 0xff) && kb->command->index > 0)
|
||||
{
|
||||
COMMAND cmd = *kb->command;
|
||||
cmd.suffix = (unsigned char)(knobs >> (i * 8) & 0xff);
|
||||
qDebug(logUsbControl()) << "Knob event:" << cmd.command << "Value:" << cmd.suffix;
|
||||
emit button(&cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
knobs = tempKnobs;
|
||||
|
||||
// Tuning knob
|
||||
jogCounter = jogCounter + (qint8)data[13];
|
||||
|
||||
}
|
||||
|
|
|
@ -56,12 +56,12 @@ using namespace std;
|
|||
struct COMMAND {
|
||||
COMMAND() {}
|
||||
|
||||
COMMAND(int index, QString text, int command, char suffix) :
|
||||
index(index), text(text), command(command), suffix(suffix) {}
|
||||
COMMAND(int index, QString text, int command, availableBands band) :
|
||||
index(index), text(text), command(command), band(band) {}
|
||||
COMMAND(int index, QString text, int command, mode_kind mode) :
|
||||
index(index), text(text), command(command), mode(mode) {}
|
||||
COMMAND(int index, QString text, usbCommandType cmdType, int command, unsigned char suffix) :
|
||||
index(index), text(text), cmdType(cmdType), command(command), suffix(suffix) {}
|
||||
COMMAND(int index, QString text, usbCommandType cmdType, int command, availableBands band) :
|
||||
index(index), text(text), cmdType(cmdType), command(command), band(band) {}
|
||||
COMMAND(int index, QString text, usbCommandType cmdType, int command, mode_kind mode) :
|
||||
index(index), text(text), cmdType(cmdType), command(command), mode(mode) {}
|
||||
|
||||
int index=0;
|
||||
QString text;
|
||||
|
@ -69,30 +69,46 @@ struct COMMAND {
|
|||
unsigned char suffix=0x0;
|
||||
availableBands band=bandGen;
|
||||
mode_kind mode=modeLSB;
|
||||
usbCommandType cmdType = commandButton;
|
||||
};
|
||||
|
||||
struct BUTTON {
|
||||
BUTTON() {}
|
||||
|
||||
BUTTON(quint8 dev, int num, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off) :
|
||||
BUTTON(usbDeviceType dev, int num, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off) :
|
||||
dev(dev), num(num), name(""), pos(pos), textColour(textColour), onCommand(on), offCommand(off) {}
|
||||
BUTTON(quint8 dev, QString name, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off) :
|
||||
BUTTON(usbDeviceType dev, QString name, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off) :
|
||||
dev(dev), num(-1), name(name), pos(pos), textColour(textColour), onCommand(on), offCommand(off) {}
|
||||
|
||||
quint8 dev;
|
||||
usbDeviceType dev;
|
||||
int num;
|
||||
QString name;
|
||||
QRect pos;
|
||||
QColor textColour;
|
||||
int onEvent = 0;
|
||||
int offEvent = 0;
|
||||
const COMMAND* onCommand=Q_NULLPTR;
|
||||
const COMMAND* offCommand=Q_NULLPTR;
|
||||
const COMMAND* onCommand = Q_NULLPTR;
|
||||
const COMMAND* offCommand = Q_NULLPTR;
|
||||
QGraphicsTextItem* onText;
|
||||
QGraphicsTextItem* offText;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct KNOB {
|
||||
KNOB() {}
|
||||
|
||||
KNOB(usbDeviceType dev, int num, QRect pos, const QColor textColour, COMMAND* command) :
|
||||
dev(dev), num(num), name(""), pos(pos), textColour(textColour), command(command) {}
|
||||
|
||||
usbDeviceType dev;
|
||||
int num;
|
||||
QString name;
|
||||
QRect pos;
|
||||
QColor textColour;
|
||||
const COMMAND* command = Q_NULLPTR;
|
||||
QGraphicsTextItem* text;
|
||||
|
||||
};
|
||||
|
||||
#if defined(USB_CONTROLLER)
|
||||
class usbController : public QObject
|
||||
{
|
||||
|
@ -109,6 +125,7 @@ public slots:
|
|||
void ledControl(bool on, unsigned char num);
|
||||
void receiveCommands(QVector<COMMAND>*);
|
||||
void receiveButtons(QVector<BUTTON>*);
|
||||
void receiveKnobs(QVector<KNOB>*);
|
||||
void getVersion();
|
||||
void receiveSensitivity(int val);
|
||||
|
||||
|
@ -119,14 +136,15 @@ signals:
|
|||
void doShuttle(bool plus, quint8 level);
|
||||
void setBand(int band);
|
||||
void button(const COMMAND* cmd);
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but,QVector<COMMAND>* cmd);
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<KNOB>* kb, QVector<COMMAND>* cmd);
|
||||
void sendSensitivity(int val);
|
||||
|
||||
private:
|
||||
hid_device* handle=NULL;
|
||||
int hidStatus = 1;
|
||||
bool isOpen=false;
|
||||
quint32 buttons=0;
|
||||
quint32 buttons = 0;
|
||||
quint32 knobs = 0;
|
||||
unsigned char jogpos=0;
|
||||
unsigned char shutpos=0;
|
||||
unsigned char shutMult = 0;
|
||||
|
@ -135,6 +153,7 @@ private:
|
|||
QByteArray lastData = QByteArray(8,0x0);
|
||||
unsigned char lastDialPos=0;
|
||||
QVector<BUTTON>* buttonList;
|
||||
QVector<KNOB>* knobList;
|
||||
QVector<COMMAND>* commands = Q_NULLPTR;
|
||||
QString product="";
|
||||
QString manufacturer="";
|
||||
|
@ -151,8 +170,9 @@ private:
|
|||
unsigned short knownUsbDevices[4][3] = {
|
||||
{shuttleXpress,0x0b33,0x0020},
|
||||
{shuttlePro2,0x0b33,0x0030},
|
||||
{RC28,0x0c26,0x001e},
|
||||
{eCoderPlus, 0x1fc9, 0x0003}
|
||||
{eCoderPlus,0x0c26,0x001e},
|
||||
//{RC28,0x0c26,0x001e},
|
||||
//{eCoderPlus, 0x1fc9, 0x0003}
|
||||
};
|
||||
|
||||
protected:
|
||||
|
|
196
wfmain.cpp
196
wfmain.cpp
|
@ -74,6 +74,7 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
|
|||
qRegisterMetaType<rigstate*>();
|
||||
qRegisterMetaType<QList<radio_cap_packet>>();
|
||||
qRegisterMetaType<QVector<BUTTON>*>();
|
||||
qRegisterMetaType<QVector<KNOB>*>();
|
||||
qRegisterMetaType<QVector<COMMAND>*>();
|
||||
qRegisterMetaType<const COMMAND*>();
|
||||
qRegisterMetaType<QList<radio_cap_packet>>();
|
||||
|
@ -1670,11 +1671,12 @@ void wfmain::setupUsbControllerDevice()
|
|||
connect(usbControllerDev, SIGNAL(doShuttle(bool, unsigned char)), this, SLOT(doShuttle(bool, unsigned char)));
|
||||
connect(usbControllerDev, SIGNAL(button(const COMMAND*)), this, SLOT(buttonControl(const COMMAND*)));
|
||||
connect(usbControllerDev, SIGNAL(setBand(int)), this, SLOT(setBand(int)));
|
||||
connect(usbControllerDev, SIGNAL(newDevice(unsigned char, QVector<BUTTON>*, QVector<COMMAND>*)), shut, SLOT(newDevice(unsigned char, QVector<BUTTON>*, QVector<COMMAND>*)));
|
||||
connect(usbControllerDev, SIGNAL(newDevice(unsigned char, QVector<BUTTON>*, QVector<KNOB>*, QVector<COMMAND>*)), shut, SLOT(newDevice(unsigned char, QVector<BUTTON>*, QVector<KNOB>*, QVector<COMMAND>*)));
|
||||
usbControllerThread->start(QThread::LowestPriority);
|
||||
|
||||
connect(this, SIGNAL(sendUsbControllerCommands(QVector<COMMAND>*)), usbControllerDev, SLOT(receiveCommands(QVector<COMMAND>*)));
|
||||
connect(this, SIGNAL(sendUsbControllerButtons(QVector<BUTTON>*)), usbControllerDev, SLOT(receiveButtons(QVector<BUTTON>*)));
|
||||
connect(this, SIGNAL(sendUsbControllerKnobs(QVector<KNOB>*)), usbControllerDev, SLOT(receiveKnobs(QVector<KNOB>*)));
|
||||
connect(shut, SIGNAL(sendSensitivity(int)), usbControllerDev, SLOT(receiveSensitivity(int)));
|
||||
connect(shut, SIGNAL(sendSensitivity(int)), this, SLOT(receiveUsbSensitivity(int)));
|
||||
connect(usbControllerDev, SIGNAL(sendSensitivity(int)), shut, SLOT(receiveSensitivity(int)));
|
||||
|
@ -2445,6 +2447,7 @@ void wfmain::loadSettings()
|
|||
emit initUsbController(prefs.usbSensitivity);
|
||||
emit sendUsbControllerCommands(&usbCommands);
|
||||
emit sendUsbControllerButtons(&usbButtons);
|
||||
emit sendUsbControllerKnobs(&usbKnobs);
|
||||
}
|
||||
|
||||
int numCommands = settings->beginReadArray("Commands");
|
||||
|
@ -2465,6 +2468,7 @@ void wfmain::loadSettings()
|
|||
comm.band = (availableBands)settings->value("Band", 0).toInt();
|
||||
comm.mode = (mode_kind)settings->value("Mode", 0).toInt();
|
||||
comm.suffix = (unsigned char)settings->value("Suffix", 0).toInt();
|
||||
comm.cmdType = (usbCommandType)settings->value("CommandType", 0).toInt();
|
||||
usbCommands.append(comm);
|
||||
}
|
||||
settings->endArray();
|
||||
|
@ -2483,7 +2487,7 @@ void wfmain::loadSettings()
|
|||
{
|
||||
settings->setArrayIndex(nb);
|
||||
BUTTON butt;
|
||||
butt.dev = settings->value("Dev", 0).toInt();
|
||||
butt.dev = (usbDeviceType)settings->value("Dev", 0).toInt();
|
||||
butt.num = settings->value("Num", 0).toInt();
|
||||
butt.name = settings->value("Name", "").toString();
|
||||
butt.pos = QRect(settings->value("Left", 0).toInt(),
|
||||
|
@ -2511,6 +2515,45 @@ void wfmain::loadSettings()
|
|||
settings->endArray();
|
||||
}
|
||||
|
||||
|
||||
int numKnobs = settings->beginReadArray("Knobs");
|
||||
// This is the last time the knobs were changed, (v1.58)
|
||||
if (numKnobs == 0 || priorVersionFloat < 1.58) {
|
||||
settings->endArray();
|
||||
// We have no knobs so create defaults
|
||||
resetUsbKnobs();
|
||||
}
|
||||
else {
|
||||
usbKnobs.clear();
|
||||
for (int nk = 0; nk < numKnobs; nk++)
|
||||
{
|
||||
settings->setArrayIndex(nk);
|
||||
KNOB kb;
|
||||
kb.dev = (usbDeviceType)settings->value("Dev", 0).toInt();
|
||||
kb.num = settings->value("Num", 0).toInt();
|
||||
kb.name = settings->value("Name", "").toString();
|
||||
kb.pos = QRect(settings->value("Left", 0).toInt(),
|
||||
settings->value("Top", 0).toInt(),
|
||||
settings->value("Width", 0).toInt(),
|
||||
settings->value("Height", 0).toInt());
|
||||
kb.textColour = QColor((settings->value("Colour", "Green").toString()));
|
||||
|
||||
QString cmd = settings->value("Command", "None").toString();
|
||||
|
||||
QVector<COMMAND>::iterator usbc = usbCommands.begin();
|
||||
|
||||
while (usbc != usbCommands.end())
|
||||
{
|
||||
if (cmd == usbc->text) {
|
||||
kb.command = usbc;
|
||||
}
|
||||
++usbc;
|
||||
}
|
||||
usbKnobs.append(kb);
|
||||
}
|
||||
settings->endArray();
|
||||
}
|
||||
|
||||
settings->endGroup();
|
||||
#endif
|
||||
}
|
||||
|
@ -2931,6 +2974,23 @@ void wfmain::saveSettings()
|
|||
|
||||
settings->endArray();
|
||||
|
||||
settings->beginWriteArray("Knobs");
|
||||
for (int nk = 0; nk < usbKnobs.count(); nk++)
|
||||
{
|
||||
settings->setArrayIndex(nk);
|
||||
settings->setValue("Dev", usbKnobs[nk].dev);
|
||||
settings->setValue("Num", usbKnobs[nk].num);
|
||||
settings->setValue("Left", usbKnobs[nk].pos.left());
|
||||
settings->setValue("Top", usbKnobs[nk].pos.top());
|
||||
settings->setValue("Width", usbKnobs[nk].pos.width());
|
||||
settings->setValue("Height", usbKnobs[nk].pos.height());
|
||||
settings->setValue("Colour", usbKnobs[nk].textColour.name());
|
||||
if (usbKnobs[nk].command != Q_NULLPTR)
|
||||
settings->setValue("Command", usbKnobs[nk].command->text);
|
||||
}
|
||||
|
||||
settings->endArray();
|
||||
|
||||
settings->beginWriteArray("Commands");
|
||||
for (int nc = 0; nc < usbCommands.count(); nc++)
|
||||
{
|
||||
|
@ -2942,6 +3002,7 @@ void wfmain::saveSettings()
|
|||
settings->setValue("Band", usbCommands[nc].band);
|
||||
settings->setValue("Mode", usbCommands[nc].mode);
|
||||
settings->setValue("Suffix", usbCommands[nc].suffix);
|
||||
settings->setValue("CommandType", usbCommands[nc].cmdType);
|
||||
}
|
||||
|
||||
settings->endArray();
|
||||
|
@ -9059,6 +9120,7 @@ void wfmain::on_enableUsbChk_clicked(bool checked)
|
|||
emit initUsbController(prefs.usbSensitivity);
|
||||
emit sendUsbControllerCommands(&usbCommands);
|
||||
emit sendUsbControllerButtons(&usbButtons);
|
||||
emit sendUsbControllerKnobs(&usbKnobs);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -9086,6 +9148,7 @@ void wfmain::on_usbButtonsResetBtn_clicked()
|
|||
if (ret == QMessageBox::Ok) {
|
||||
qInfo(logUsbControl()) << "Resetting USB buttons to default values";
|
||||
resetUsbButtons();
|
||||
resetUsbKnobs();
|
||||
on_enableUsbChk_clicked(true); // Force disconnect/reconnect of USB controller.
|
||||
}
|
||||
}
|
||||
|
@ -9257,9 +9320,9 @@ void wfmain::resetUsbButtons()
|
|||
usbButtons.append(BUTTON(eCoderPlus, 12, QRect(410, 351, 55, 55), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 13, QRect(87, 512, 55, 55), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 14, QRect(410, 512, 55, 55), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 16, QRect(121, 102, 68, 73), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 17, QRect(242, 102, 68, 73), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 18, QRect(362, 102, 68, 73), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 16, QRect(128, 104, 45, 47), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 17, QRect(256, 104, 45, 47), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 18, QRect(380, 104, 45, 47), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 19, QRect(124, 2, 55, 30), Qt::red, &usbCommands[1], &usbCommands[2]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 20, QRect(290, 2, 55, 30), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
usbButtons.append(BUTTON(eCoderPlus, 21, QRect(404, 2, 55, 30), Qt::red, &usbCommands[0], &usbCommands[0]));
|
||||
|
@ -9269,65 +9332,80 @@ void wfmain::resetUsbButtons()
|
|||
#endif
|
||||
}
|
||||
|
||||
void wfmain::resetUsbKnobs()
|
||||
{
|
||||
#ifdef USB_CONTROLLER
|
||||
usbKnobs.clear();
|
||||
// eCoder
|
||||
usbKnobs.append(KNOB(eCoderPlus, 1, QRect(120, 153, 72, 27), Qt::red, &usbCommands[0]));
|
||||
usbKnobs.append(KNOB(eCoderPlus, 2, QRect(242, 153, 72, 27), Qt::red, &usbCommands[0]));
|
||||
usbKnobs.append(KNOB(eCoderPlus, 3, QRect(362, 153, 72, 27), Qt::red, &usbCommands[0]));
|
||||
emit sendUsbControllerKnobs(&usbKnobs);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void wfmain::resetUsbCommands()
|
||||
{
|
||||
#ifdef USB_CONTROLLER
|
||||
usbCommands.clear();
|
||||
int num = 0;
|
||||
usbCommands.append(COMMAND(num++, "None", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "PTT On", cmdSetPTT, 0x1));
|
||||
usbCommands.append(COMMAND(num++, "PTT Off", cmdSetPTT, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "PTT Toggle", cmdPTTToggle, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Tune", cmdStartATU, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Step+", cmdSetStepUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Step-", cmdSetStepDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Span+", cmdSetSpanUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Span-", cmdSetSpanDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode+", cmdSetModeUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode-", cmdSetModeDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode LSB", cmdSetMode, modeLSB));
|
||||
usbCommands.append(COMMAND(num++, "Mode USB", cmdSetMode, modeUSB));
|
||||
usbCommands.append(COMMAND(num++, "Mode LSBD", cmdSetMode, modeLSB_D));
|
||||
usbCommands.append(COMMAND(num++, "Mode USBD", cmdSetMode, modeUSB_D));
|
||||
usbCommands.append(COMMAND(num++, "Mode CW", cmdSetMode, modeCW));
|
||||
usbCommands.append(COMMAND(num++, "Mode CWR", cmdSetMode, modeCW_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode FM", cmdSetMode, modeFM));
|
||||
usbCommands.append(COMMAND(num++, "Mode AM", cmdSetMode, modeAM));
|
||||
usbCommands.append(COMMAND(num++, "Mode RTTY", cmdSetMode, modeRTTY));
|
||||
usbCommands.append(COMMAND(num++, "Mode RTTYR", cmdSetMode, modeRTTY_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode PSK", cmdSetMode, modePSK));
|
||||
usbCommands.append(COMMAND(num++, "Mode PSKR", cmdSetMode, modePSK_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode DV", cmdSetMode, modeDV));
|
||||
usbCommands.append(COMMAND(num++, "Mode DD", cmdSetMode, modeDD));
|
||||
usbCommands.append(COMMAND(num++, "Band+", cmdSetBandUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Band-", cmdSetBandDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "23cm", cmdGetBandStackReg, band23cm));
|
||||
usbCommands.append(COMMAND(num++, "70cm", cmdGetBandStackReg, band70cm));
|
||||
usbCommands.append(COMMAND(num++, "2m", cmdGetBandStackReg, band2m));
|
||||
usbCommands.append(COMMAND(num++, "AIR", cmdGetBandStackReg, bandAir));
|
||||
usbCommands.append(COMMAND(num++, "WFM", cmdGetBandStackReg, bandWFM));
|
||||
usbCommands.append(COMMAND(num++, "4m", cmdGetBandStackReg, band4m));
|
||||
usbCommands.append(COMMAND(num++, "6m", cmdGetBandStackReg, band6m));
|
||||
usbCommands.append(COMMAND(num++, "10m", cmdGetBandStackReg, band10m));
|
||||
usbCommands.append(COMMAND(num++, "12m", cmdGetBandStackReg, band12m));
|
||||
usbCommands.append(COMMAND(num++, "15m", cmdGetBandStackReg, band15m));
|
||||
usbCommands.append(COMMAND(num++, "17m", cmdGetBandStackReg, band17m));
|
||||
usbCommands.append(COMMAND(num++, "20m", cmdGetBandStackReg, band20m));
|
||||
usbCommands.append(COMMAND(num++, "30m", cmdGetBandStackReg, band30m));
|
||||
usbCommands.append(COMMAND(num++, "40m", cmdGetBandStackReg, band40m));
|
||||
usbCommands.append(COMMAND(num++, "60m", cmdGetBandStackReg, band60m));
|
||||
usbCommands.append(COMMAND(num++, "80m", cmdGetBandStackReg, band80m));
|
||||
usbCommands.append(COMMAND(num++, "160m", cmdGetBandStackReg, band160m));
|
||||
usbCommands.append(COMMAND(num++, "630m", cmdGetBandStackReg, band630m));
|
||||
usbCommands.append(COMMAND(num++, "2200m", cmdGetBandStackReg, band2200m));
|
||||
usbCommands.append(COMMAND(num++, "GEN", cmdGetBandStackReg, bandGen));
|
||||
usbCommands.append(COMMAND(num++, "NR On", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NR Off", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NB On", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NB Off", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Split On", cmdNone, 0x01));
|
||||
usbCommands.append(COMMAND(num++, "Split Off", cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Swap VFOs", cmdVFOSwap, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "None", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "PTT On", commandButton, cmdSetPTT, 0x1));
|
||||
usbCommands.append(COMMAND(num++, "PTT Off", commandButton, cmdSetPTT, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "PTT Toggle", commandButton, cmdPTTToggle, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Tune", commandButton, cmdStartATU, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Step+", commandButton, cmdSetStepUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Step-", commandButton, cmdSetStepDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Span+", commandButton, cmdSetSpanUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Span-", commandButton, cmdSetSpanDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode+", commandButton, cmdSetModeUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode-", commandButton, cmdSetModeDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Mode LSB", commandButton, cmdSetMode, modeLSB));
|
||||
usbCommands.append(COMMAND(num++, "Mode USB", commandButton, cmdSetMode, modeUSB));
|
||||
usbCommands.append(COMMAND(num++, "Mode LSBD", commandButton, cmdSetMode, modeLSB_D));
|
||||
usbCommands.append(COMMAND(num++, "Mode USBD", commandButton, cmdSetMode, modeUSB_D));
|
||||
usbCommands.append(COMMAND(num++, "Mode CW", commandButton, cmdSetMode, modeCW));
|
||||
usbCommands.append(COMMAND(num++, "Mode CWR", commandButton, cmdSetMode, modeCW_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode FM", commandButton, cmdSetMode, modeFM));
|
||||
usbCommands.append(COMMAND(num++, "Mode AM", commandButton, cmdSetMode, modeAM));
|
||||
usbCommands.append(COMMAND(num++, "Mode RTTY", commandButton, cmdSetMode, modeRTTY));
|
||||
usbCommands.append(COMMAND(num++, "Mode RTTYR", commandButton, cmdSetMode, modeRTTY_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode PSK", commandButton, cmdSetMode, modePSK));
|
||||
usbCommands.append(COMMAND(num++, "Mode PSKR", commandButton, cmdSetMode, modePSK_R));
|
||||
usbCommands.append(COMMAND(num++, "Mode DV", commandButton, cmdSetMode, modeDV));
|
||||
usbCommands.append(COMMAND(num++, "Mode DD", commandButton, cmdSetMode, modeDD));
|
||||
usbCommands.append(COMMAND(num++, "Band+", commandButton, cmdSetBandUp, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Band-", commandButton, cmdSetBandDown, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "23cm", commandButton, cmdGetBandStackReg, band23cm));
|
||||
usbCommands.append(COMMAND(num++, "70cm", commandButton, cmdGetBandStackReg, band70cm));
|
||||
usbCommands.append(COMMAND(num++, "2m", commandButton, cmdGetBandStackReg, band2m));
|
||||
usbCommands.append(COMMAND(num++, "AIR", commandButton, cmdGetBandStackReg, bandAir));
|
||||
usbCommands.append(COMMAND(num++, "WFM", commandButton, cmdGetBandStackReg, bandWFM));
|
||||
usbCommands.append(COMMAND(num++, "4m", commandButton, cmdGetBandStackReg, band4m));
|
||||
usbCommands.append(COMMAND(num++, "6m", commandButton, cmdGetBandStackReg, band6m));
|
||||
usbCommands.append(COMMAND(num++, "10m", commandButton, cmdGetBandStackReg, band10m));
|
||||
usbCommands.append(COMMAND(num++, "12m", commandButton, cmdGetBandStackReg, band12m));
|
||||
usbCommands.append(COMMAND(num++, "15m", commandButton, cmdGetBandStackReg, band15m));
|
||||
usbCommands.append(COMMAND(num++, "17m", commandButton, cmdGetBandStackReg, band17m));
|
||||
usbCommands.append(COMMAND(num++, "20m", commandButton, cmdGetBandStackReg, band20m));
|
||||
usbCommands.append(COMMAND(num++, "30m", commandButton, cmdGetBandStackReg, band30m));
|
||||
usbCommands.append(COMMAND(num++, "40m", commandButton, cmdGetBandStackReg, band40m));
|
||||
usbCommands.append(COMMAND(num++, "60m", commandButton, cmdGetBandStackReg, band60m));
|
||||
usbCommands.append(COMMAND(num++, "80m", commandButton, cmdGetBandStackReg, band80m));
|
||||
usbCommands.append(COMMAND(num++, "160m", commandButton, cmdGetBandStackReg, band160m));
|
||||
usbCommands.append(COMMAND(num++, "630m", commandButton, cmdGetBandStackReg, band630m));
|
||||
usbCommands.append(COMMAND(num++, "2200m", commandButton, cmdGetBandStackReg, band2200m));
|
||||
usbCommands.append(COMMAND(num++, "GEN", commandButton, cmdGetBandStackReg, bandGen));
|
||||
usbCommands.append(COMMAND(num++, "NR On", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NR Off", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NB On", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "NB Off", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Split On", commandButton, cmdNone, 0x01));
|
||||
usbCommands.append(COMMAND(num++, "Split Off", commandButton, cmdNone, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "Swap VFOs", commandButton, cmdVFOSwap, 0x0));
|
||||
usbCommands.append(COMMAND(num++, "AF Gain", commandKnob, cmdSetAfGain, 0xff));
|
||||
usbCommands.append(COMMAND(num++, "RF Gain", commandKnob, cmdSetRxRfGain, 0xff));
|
||||
emit sendUsbControllerCommands(&usbCommands);
|
||||
#endif
|
||||
}
|
||||
|
|
5
wfmain.h
5
wfmain.h
|
@ -226,6 +226,7 @@ signals:
|
|||
void initUsbController(int sens);
|
||||
void sendUsbControllerCommands(QVector<COMMAND>* cmds);
|
||||
void sendUsbControllerButtons(QVector<BUTTON>* buts);
|
||||
void sendUsbControllerKnobs(QVector<KNOB>* kbs);
|
||||
void setClusterUdpPort(int port);
|
||||
void setClusterEnableUdp(bool udp);
|
||||
void setClusterEnableTcp(bool tcp);
|
||||
|
@ -1068,6 +1069,7 @@ private:
|
|||
void updateUsbButtons();
|
||||
|
||||
void resetUsbButtons();
|
||||
void resetUsbKnobs();
|
||||
void resetUsbCommands();
|
||||
|
||||
int oldFreqDialVal;
|
||||
|
@ -1147,6 +1149,7 @@ private:
|
|||
QString usbDeviceName;
|
||||
QVector<COMMAND> usbCommands;
|
||||
QVector<BUTTON> usbButtons;
|
||||
QVector<KNOB> usbKnobs;
|
||||
#endif
|
||||
|
||||
dxClusterClient* cluster = Q_NULLPTR;
|
||||
|
@ -1181,7 +1184,7 @@ Q_DECLARE_METATYPE(QList<radio_cap_packet>)
|
|||
Q_DECLARE_METATYPE(QList<spotData>)
|
||||
Q_DECLARE_METATYPE(rigstate*)
|
||||
Q_DECLARE_METATYPE(QVector <BUTTON>*)
|
||||
Q_DECLARE_METATYPE(struct BUTTON*)
|
||||
Q_DECLARE_METATYPE(QVector <KNOB>*)
|
||||
Q_DECLARE_METATYPE(QVector <COMMAND>*)
|
||||
Q_DECLARE_METATYPE(const COMMAND*)
|
||||
Q_DECLARE_METATYPE(codecType)
|
||||
|
|
|
@ -195,5 +195,6 @@ enum codecType { LPCM, PCMU, OPUS };
|
|||
enum passbandActions {passbandStatic, pbtInnerMove, pbtOuterMove, pbtMoving, passbandResizing};
|
||||
|
||||
enum usbDeviceType { usbNone = 0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad, eCoderPlus};
|
||||
enum usbCommandType{ commandButton, commandKnob };
|
||||
|
||||
#endif // WFVIEWTYPES_H
|
||||
|
|
Ładowanie…
Reference in New Issue