failbranch
Phil Taylor 2023-02-02 23:11:49 +00:00
rodzic 3993046771
commit 80dc5d2df6
4 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -44,8 +44,8 @@ public slots:
void offEventIndexChanged(int index);
private:
enum { NONE=0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad } usbDevice;
usbDeviceType usbDevice = usbNone;
Ui::controllerSetup* ui;
QGraphicsScene* scene;
QGraphicsTextItem* textItem;

Wyświetl plik

@ -167,7 +167,7 @@ void usbController::run()
if (!handle) {
handle = hid_open(0x0c26, 0x001e, NULL);
if (!handle) {
usbDevice = NONE;
usbDevice = usbNone;
}
else {
usbDevice = RC28;
@ -226,7 +226,7 @@ void usbController::run()
void usbController::runTimer()
{
int res=1;
while (res > 0) {
QByteArray data(HIDDATALENGTH, 0x0);
res = hid_read(handle, (unsigned char*)data.data(), HIDDATALENGTH);
@ -329,6 +329,9 @@ void usbController::runTimer()
BUTTON* butf1 = Q_NULLPTR;
BUTTON* butf2 = Q_NULLPTR;;
//delayedCmdQue.erase(std::remove_if(delayedCmdQue.begin() + 1, delayedCmdQue.end(), [cmd](const commandtype& c) { return (c.cmd == cmd); }),
for (BUTTON* but = buttonList->begin(); but != buttonList->end(); but++) {
if (but->dev == usbDevice) {

Wyświetl plik

@ -106,7 +106,6 @@ signals:
private:
hid_device* handle;
enum { NONE=0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad }usbDevice;
bool isOpen=false;
unsigned int buttons=0;
unsigned char jogpos=0;
@ -126,7 +125,7 @@ private:
#endif
void buttonState(QString but, bool val);
void buttonState(QString but, double val);
usbDeviceType usbDevice = usbNone;
protected:
};

Wyświetl plik

@ -194,4 +194,6 @@ enum codecType { LPCM, PCMU, OPUS };
enum passbandActions {passbandStatic, pbtInnerMove, pbtOuterMove, pbtMoving, passbandResizing};
enum usbDeviceType { usbNone = 0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad };
#endif // WFVIEWTYPES_H