kopia lustrzana https://gitlab.com/eliggett/wfview
'Almost' working shuttle support
rodzic
fad416c5f3
commit
8ee8d23fb9
|
@ -14,6 +14,7 @@
|
|||
|
||||
// 7850 and 7851 have the same commands and are essentially identical
|
||||
|
||||
|
||||
enum model_kind {
|
||||
model7100 = 0x88,
|
||||
model7200 = 0x76,
|
||||
|
|
68
shuttle.h
68
shuttle.h
|
@ -1,68 +0,0 @@
|
|||
#ifndef SHUTTLE_H
|
||||
#define SHUTTLE_H
|
||||
|
||||
#include <iostream>
|
||||
#include <QThread>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#include "hidapi/hidapi.h"
|
||||
#else
|
||||
#include "hidapi.h"
|
||||
#endif
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
//Headers needed for sleeping.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#define HIDDATALENGTH 64
|
||||
#define MAX_STR 255
|
||||
|
||||
|
||||
class shuttle : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
shuttle();
|
||||
~shuttle();
|
||||
int hidApiWrite(unsigned char* data, unsigned char length);
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void run();
|
||||
void runTimer();
|
||||
void ledControl(bool on, unsigned char num);
|
||||
|
||||
signals:
|
||||
void jogPlus();
|
||||
void jogMinus();
|
||||
|
||||
void doShuttle(bool plus, quint8 level);
|
||||
|
||||
void button(bool,unsigned char num);
|
||||
void newDevice(unsigned char devType);
|
||||
|
||||
private:
|
||||
hid_device* handle;
|
||||
enum { NONE, shuttleXpress, shuttlePro2, RC28 }usbDevice;
|
||||
bool isOpen=false;
|
||||
unsigned int buttons=0;
|
||||
unsigned char jogpos=0;
|
||||
unsigned char shutpos=0;
|
||||
unsigned char shutMult = 0;
|
||||
QTime lastShuttle = QTime::currentTime();
|
||||
QByteArray lastData="";
|
||||
unsigned char lastDialPos=0;
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
|
@ -7,10 +7,21 @@ shuttleSetup::shuttleSetup(QWidget* parent) :
|
|||
ui(new Ui::shuttleSetup)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
scene = new QGraphicsScene();
|
||||
scene = new shuttleScene();
|
||||
connect(scene, SIGNAL(mousePressed(QPoint)), this, SLOT(mousePressed(QPoint)));
|
||||
ui->graphicsView->setScene(scene);
|
||||
textItem = scene->addText("No USB controller found");
|
||||
textItem->setDefaultTextColor(Qt::gray);
|
||||
|
||||
for (QString cmd : onEventCommands) {
|
||||
onEvent.addItem(cmd);
|
||||
}
|
||||
for (QString cmd : offEventCommands) {
|
||||
offEvent.addItem(cmd);
|
||||
}
|
||||
|
||||
connect(&onEvent, SIGNAL(currentIndexChanged(int)), this, SLOT(onEventIndexChanged(int)));
|
||||
connect(&offEvent, SIGNAL(currentIndexChanged(int)), this, SLOT(offEventIndexChanged(int)));
|
||||
}
|
||||
|
||||
shuttleSetup::~shuttleSetup()
|
||||
|
@ -24,12 +35,79 @@ shuttleSetup::~shuttleSetup()
|
|||
}
|
||||
}
|
||||
|
||||
void shuttleSetup::newDevice(unsigned char devType)
|
||||
void shuttleSetup::mousePressed(QPoint p)
|
||||
{
|
||||
// Receive mouse event from the scene
|
||||
qDebug() << "Looking for button Point x=" << p.x() << " y=" << p.y();
|
||||
bool found = false;
|
||||
for (BUTTON& b : *buttons)
|
||||
{
|
||||
if (b.pos.contains(p))
|
||||
{
|
||||
found = true;
|
||||
currentButton = &b;
|
||||
// Add off event first so it doesn't obscure on event.
|
||||
if (offEventProxy == Q_NULLPTR) {
|
||||
offEventProxy = scene->addWidget(&offEvent);
|
||||
}
|
||||
if (onEventProxy == Q_NULLPTR) {
|
||||
onEventProxy = scene->addWidget(&onEvent);
|
||||
}
|
||||
onEvent.blockSignals(true);
|
||||
onEvent.move(p);
|
||||
onEvent.setCurrentIndex(currentButton->onEvent);
|
||||
onEvent.show();
|
||||
onEvent.blockSignals(false);
|
||||
|
||||
p.setY(p.y() + 40);
|
||||
offEvent.blockSignals(true);
|
||||
offEvent.move(p);
|
||||
offEvent.setCurrentIndex(currentButton->offEvent);
|
||||
offEvent.show();
|
||||
offEvent.blockSignals(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
onEvent.hide();
|
||||
offEvent.hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void shuttleSetup::onEventIndexChanged(int index) {
|
||||
qDebug() << "On Event for button" << currentButton->num << "Event" << index;
|
||||
if (currentButton != Q_NULLPTR) {
|
||||
currentButton->onEvent = index;
|
||||
currentButton->onCommand.text->setPlainText(onEventCommands[index]);
|
||||
currentButton->onCommand.index = index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void shuttleSetup::offEventIndexChanged(int index) {
|
||||
qDebug() << "Off Event for button" << currentButton->num << "Event" << index;
|
||||
if (currentButton != Q_NULLPTR) {
|
||||
currentButton->offEvent = index;
|
||||
currentButton->offCommand.text->setPlainText(offEventCommands[index]);
|
||||
currentButton->offCommand.index = index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void shuttleSetup::newDevice(unsigned char devType, QVector<BUTTON>* but)
|
||||
{
|
||||
buttons = but;
|
||||
|
||||
if (bgImage != Q_NULLPTR) {
|
||||
scene->removeItem(bgImage);
|
||||
delete bgImage;
|
||||
bgImage = Q_NULLPTR;
|
||||
if (onEventProxy != Q_NULLPTR)
|
||||
scene->removeItem(onEventProxy);
|
||||
if (offEventProxy != Q_NULLPTR)
|
||||
scene->removeItem(offEventProxy);
|
||||
}
|
||||
QImage image;
|
||||
|
||||
|
@ -51,6 +129,21 @@ void shuttleSetup::newDevice(unsigned char devType)
|
|||
bgImage = new QGraphicsPixmapItem(QPixmap::fromImage(image));
|
||||
scene->addItem(bgImage);
|
||||
|
||||
ui->graphicsView->setMinimumSize(bgImage->boundingRect().width() + 2, bgImage->boundingRect().height() + 2);
|
||||
ui->graphicsView->setMinimumSize(bgImage->boundingRect().width() + 100, bgImage->boundingRect().height() + 2);
|
||||
this->resize(this->sizeHint());
|
||||
currentDevice = devType;
|
||||
|
||||
// Set button text
|
||||
for (BUTTON& b : *buttons)
|
||||
{
|
||||
b.onCommand.text = new QGraphicsTextItem(onEventCommands[b.onEvent]);
|
||||
b.onCommand.text->setDefaultTextColor(b.textColour);
|
||||
scene->addItem(b.onCommand.text);
|
||||
b.onCommand.text->setPos(b.pos.x(), b.pos.y());
|
||||
|
||||
b.offCommand.text = new QGraphicsTextItem(offEventCommands[b.onEvent]);
|
||||
b.offCommand.text->setDefaultTextColor(b.textColour);
|
||||
scene->addItem(b.offCommand.text);
|
||||
b.offCommand.text->setPos(b.pos.x(), b.pos.y()+10);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,11 +6,20 @@
|
|||
#include <QGraphicsScene>
|
||||
#include <QGraphicsTextItem>
|
||||
#include <QGraphicsPixmapItem>
|
||||
#include <QPoint>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QVector.h>
|
||||
#include <QRect.h>
|
||||
#include <QComboBox.h>
|
||||
#include <QLabel.h>
|
||||
#include <QGraphicsProxyWidget.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <qobject.h>
|
||||
|
||||
#include "shuttle.h"
|
||||
#include "usbcontroller.h"
|
||||
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class shuttleSetup;
|
||||
|
@ -25,15 +34,69 @@ public:
|
|||
~shuttleSetup();
|
||||
|
||||
public slots:
|
||||
void newDevice(unsigned char devType);
|
||||
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but);
|
||||
void mousePressed(QPoint p);
|
||||
void onEventIndexChanged(int index);
|
||||
void offEventIndexChanged(int index);
|
||||
|
||||
private:
|
||||
enum { NONE, shuttleXpress, shuttlePro2, RC28 }usbDevice;
|
||||
Ui::shuttleSetup* ui;
|
||||
QGraphicsScene* scene;
|
||||
QGraphicsTextItem* textItem;
|
||||
QGraphicsPixmapItem* bgImage = Q_NULLPTR;
|
||||
QGraphicsItem* bgImage = Q_NULLPTR;
|
||||
QLabel* imgLabel;
|
||||
unsigned char currentDevice = 0;
|
||||
QVector<BUTTON>* buttons;
|
||||
BUTTON* currentButton=Q_NULLPTR;
|
||||
QComboBox onEvent;
|
||||
QComboBox offEvent;
|
||||
QGraphicsProxyWidget* onEventProxy=Q_NULLPTR;
|
||||
QGraphicsProxyWidget* offEventProxy=Q_NULLPTR;
|
||||
|
||||
|
||||
QStringList onEventCommands = {"None", "PTT Toggle", "PTT On", "Tune","Step+","Step-", "NR","NB","AGC","Mode+","Mode-","Band+", "Band-",
|
||||
"23cm","70cm","2m","AIR","WFM","4m","6m","10m","12m","15m","17m","20m","30m","40m","60m","80m","160m","630m","2200m","GEN" };
|
||||
|
||||
QStringList offEventCommands = { "None", "PTT Toggle", "PTT Off",
|
||||
"23cm", "70cm", "2m", "AIR","WFM","4m", "6m", "10m", "12m", "15m","17m", "20m", "30m", "40m", "60m", "80m", "160m","630m","2200m","GEN"};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class shuttleScene : public QGraphicsScene
|
||||
{
|
||||
Q_OBJECT
|
||||
QGraphicsLineItem* item = Q_NULLPTR;
|
||||
|
||||
signals:
|
||||
void mousePressed(QPoint p);
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent* event) {
|
||||
|
||||
if (event->button() == Qt::RightButton)
|
||||
{
|
||||
emit mousePressed(event->scenePos().toPoint());
|
||||
}
|
||||
else
|
||||
{
|
||||
QGraphicsScene::mousePressEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent* event) {
|
||||
|
||||
}
|
||||
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) {
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
|
@ -1,26 +1,33 @@
|
|||
#pragma comment (lib, "Setupapi.lib")
|
||||
#include "shuttle.h"
|
||||
#include "usbcontroller.h"
|
||||
#include <QDebug>
|
||||
|
||||
shuttle::shuttle()
|
||||
usbController::usbController()
|
||||
{
|
||||
qInfo() << "Starting HID USB device detection";
|
||||
}
|
||||
|
||||
shuttle::~shuttle()
|
||||
usbController::~usbController()
|
||||
{
|
||||
qDebug() << "************ Ending HID";
|
||||
hid_close(handle);
|
||||
hid_exit();
|
||||
for (BUTTON& b : buttonList)
|
||||
{
|
||||
if (b.onCommand.text)
|
||||
delete b.onCommand.text;
|
||||
if (b.offCommand.text)
|
||||
delete b.offCommand.text;
|
||||
}
|
||||
}
|
||||
|
||||
void shuttle::init()
|
||||
void usbController::init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
int shuttle::hidApiWrite(unsigned char* data, unsigned char length)
|
||||
int usbController::hidApiWrite(unsigned char* data, unsigned char length)
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_UNUSED(length);
|
||||
|
@ -47,7 +54,7 @@ int shuttle::hidApiWrite(unsigned char* data, unsigned char length)
|
|||
}
|
||||
|
||||
|
||||
void shuttle::run()
|
||||
void usbController::run()
|
||||
{
|
||||
handle = hid_open(0x0b33, 0x0020, NULL);
|
||||
if (!handle) {
|
||||
|
@ -65,13 +72,29 @@ void shuttle::run()
|
|||
}
|
||||
else {
|
||||
usbDevice = shuttlePro2;
|
||||
buttonList.clear();
|
||||
buttonList.append(BUTTON(0, QRect(60, 66, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(1, QRect(114, 50, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(2, QRect(169, 47, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(3, QRect(225, 59, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(4, QRect(41, 132, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(5, QRect(91, 105, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(6, QRect(144, 93, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(7, QRect(204, 99, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(8, QRect(253, 124, 40, 30), Qt::red));
|
||||
buttonList.append(BUTTON(9, QRect(50, 270, 70, 55), Qt::red));
|
||||
buttonList.append(BUTTON(10, QRect(210, 270, 70, 55), Qt::red));
|
||||
buttonList.append(BUTTON(11, QRect(50, 335, 70, 55), Qt::red));
|
||||
buttonList.append(BUTTON(12, QRect(210, 335, 70, 55), Qt::red));
|
||||
buttonList.append(BUTTON(13, QRect(30, 195, 25, 80), Qt::red));
|
||||
buttonList.append(BUTTON(14, QRect(280, 195, 25, 80), Qt::red));
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
usbDevice = shuttleXpress;
|
||||
}
|
||||
|
||||
|
||||
if (handle)
|
||||
{
|
||||
int res;
|
||||
|
@ -81,12 +104,12 @@ void shuttle::run()
|
|||
res = hid_get_product_string(handle, product, MAX_STR);
|
||||
qInfo() << QString("Found Device: %0 from %1").arg(QString::fromWCharArray(product)).arg(QString::fromWCharArray(manufacturer));
|
||||
hid_set_nonblocking(handle, 1);
|
||||
emit newDevice(usbDevice);
|
||||
emit newDevice(usbDevice,&buttonList);
|
||||
QTimer::singleShot(0, this, SLOT(runTimer()));
|
||||
}
|
||||
}
|
||||
|
||||
void shuttle::runTimer()
|
||||
void usbController::runTimer()
|
||||
{
|
||||
int res=1;
|
||||
while (res > 0) {
|
||||
|
@ -95,7 +118,7 @@ void shuttle::runTimer()
|
|||
if (res < 0)
|
||||
{
|
||||
qInfo() << "USB Device disconnected?";
|
||||
emit newDevice(0);
|
||||
emit newDevice(0,&buttonList);
|
||||
hid_close(handle);
|
||||
QTimer::singleShot(1000, this, SLOT(run()));
|
||||
return;
|
||||
|
@ -103,24 +126,25 @@ void shuttle::runTimer()
|
|||
else if (res == 5 && (usbDevice == shuttleXpress || usbDevice == shuttlePro2))
|
||||
{
|
||||
data.resize(res);
|
||||
qDebug() << "Shuttle Data received: " << hex << (unsigned char)data[0] << ":"
|
||||
|
||||
/*qDebug() << "usbController Data received " << hex << (unsigned char)data[0] << ":"
|
||||
<< hex << (unsigned char)data[1] << ":"
|
||||
<< hex << (unsigned char)data[2] << ":"
|
||||
<< hex << (unsigned char)data[3] << ":"
|
||||
<< hex << (unsigned char)data[4];
|
||||
|
||||
*/
|
||||
unsigned int tempButtons = (unsigned int)((unsigned char)data[3] | (unsigned char)data[4] << 8);
|
||||
unsigned char tempJogpos = (unsigned char)data[1];
|
||||
unsigned char tempShutpos = (unsigned char)data[0];
|
||||
|
||||
if (tempJogpos == jogpos + 1 || (tempJogpos == 0 && jogpos == 0xff))
|
||||
{
|
||||
qDebug() << "JOG PLUS";
|
||||
emit jogPlus();
|
||||
counter++;
|
||||
//qDebug() << "JOG PLUS" << counter;
|
||||
}
|
||||
else if (tempJogpos != jogpos) {
|
||||
qDebug() << "JOG MINUS";
|
||||
emit jogMinus();
|
||||
counter--;
|
||||
//qDebug() << "JOG MINUS" << counter;
|
||||
}
|
||||
|
||||
/* Button matrix:
|
||||
|
@ -143,15 +167,38 @@ void shuttle::runTimer()
|
|||
*/
|
||||
if (buttons != tempButtons)
|
||||
{
|
||||
qDebug() << "BUTTON: " << qSetFieldWidth(16) << bin << tempButtons;
|
||||
//qDebug() << "BUTTON: " << qSetFieldWidth(16) << bin << tempButtons;
|
||||
|
||||
// Step through all buttons and emit ones that have been pressed.
|
||||
for (unsigned char i = 0; i < 16; i++)
|
||||
{
|
||||
if ((tempButtons >> i & 1) && !(buttons >> i & 1))
|
||||
emit button(true, i);
|
||||
if ((tempButtons >> i & 1) && !(buttons >> i & 1))
|
||||
{
|
||||
if (i < buttonList.size() && buttonList[i].onCommand.text && buttonList[i].onCommand.index>0) {
|
||||
qDebug() << "On Button event:" << buttonList[i].onCommand.text->toPlainText();
|
||||
if (buttonList[i].onCommand.index > 12) // Band selection
|
||||
{
|
||||
emit setBand(buttonList[i].onCommand.index - 13);
|
||||
}
|
||||
else {
|
||||
emit button(true, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((buttons >> i & 1) && !(tempButtons >> i & 1))
|
||||
emit button(false, i);
|
||||
{
|
||||
if (i < buttonList.size() && buttonList[i].offCommand.text && buttonList[i].onCommand.index>0) {
|
||||
qDebug() << "Off Button event:" << buttonList[i].offCommand.text->toPlainText();
|
||||
if (buttonList[i].offCommand.index > 2) // Band selection
|
||||
{
|
||||
emit setBand(buttonList[i].offCommand.index - 3);
|
||||
}
|
||||
else {
|
||||
emit button(false, i);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -196,36 +243,44 @@ void shuttle::runTimer()
|
|||
|
||||
if ((unsigned char)data[5] == 0x07)
|
||||
{
|
||||
if ((unsigned char)data[3]==0x01)
|
||||
if ((unsigned char)data[3] == 0x01)
|
||||
{
|
||||
qDebug() << "Frequency UP";
|
||||
emit jogPlus();
|
||||
//qDebug() << "Frequency UP";
|
||||
counter++;
|
||||
//emit jogPlus();
|
||||
}
|
||||
else if ((unsigned char)data[3] == 0x02)
|
||||
{
|
||||
qDebug() << "Frequency DOWN";
|
||||
emit jogMinus();
|
||||
//qDebug() << "Frequency DOWN";
|
||||
emit jogMinus();
|
||||
counter--;
|
||||
}
|
||||
}
|
||||
|
||||
lastData = data;
|
||||
}
|
||||
|
||||
if (lastShuttle.msecsTo(QTime::currentTime()) >= 1000)
|
||||
if (lastusbController.msecsTo(QTime::currentTime()) >= 500 || lastusbController > QTime::currentTime())
|
||||
{
|
||||
if (shutpos > 0 && shutpos < 8)
|
||||
{
|
||||
shutMult = shutpos;
|
||||
emit doShuttle(true, shutMult);
|
||||
qInfo() << "SHUTTLE PLUS" << shutMult;
|
||||
//qInfo() << "Shuttle PLUS" << shutMult;
|
||||
|
||||
}
|
||||
else if (shutpos <= 0xff && shutpos >= 0xf0) {
|
||||
shutMult = abs(shutpos - 0xff) + 1;
|
||||
emit doShuttle(false, shutMult);
|
||||
qInfo() << "SHUTTLE MINUS" << shutMult;
|
||||
//qInfo() << "Shuttle MINUS" << shutMult;
|
||||
}
|
||||
lastShuttle = QTime::currentTime();
|
||||
if (counter != 0) {
|
||||
emit sendJog(counter);
|
||||
//qInfo() << "Change Frequency by" << counter << "hz";
|
||||
counter = 0;
|
||||
}
|
||||
|
||||
lastusbController = QTime::currentTime();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -233,25 +288,25 @@ void shuttle::runTimer()
|
|||
QTimer::singleShot(25, this, SLOT(runTimer()));
|
||||
}
|
||||
|
||||
void shuttle::ledControl(bool on, unsigned char num)
|
||||
void usbController::ledControl(bool on, unsigned char num)
|
||||
{
|
||||
if (usbDevice == RC28) {
|
||||
QByteArray data(9, 0x0);
|
||||
data[0] = 8;
|
||||
data[1] = 0x01;
|
||||
unsigned char ledNum = 0x07;
|
||||
if (on)
|
||||
ledNum &= ~(1ULL << (num - 1));
|
||||
|
||||
QByteArray data(9,0x0);
|
||||
data[0] = 8;
|
||||
data[1] = 0x01;
|
||||
unsigned char ledNum=0x07;
|
||||
if (on)
|
||||
ledNum &= ~(1ULL << (num - 1));
|
||||
data[2] = ledNum;
|
||||
|
||||
data[2] = ledNum;
|
||||
int res = hid_write(handle, (const unsigned char*)data.constData(), 8);
|
||||
|
||||
int res = hid_write(handle, (const unsigned char*)data.constData(), 8);
|
||||
if (res < 0) {
|
||||
qDebug() << "Unable to write(), Error:" << hid_error(handle);
|
||||
return;
|
||||
}
|
||||
|
||||
if (res < 0) {
|
||||
qDebug() << "Unable to write(), Error:" << hid_error(handle);
|
||||
return;
|
||||
qDebug() << "write() success";
|
||||
}
|
||||
|
||||
qDebug() << "write() success";
|
||||
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
#ifndef usbController_H
|
||||
#define usbController_H
|
||||
|
||||
#include <iostream>
|
||||
#include <QThread>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QRect>
|
||||
#include <QGraphicsTextItem>
|
||||
#include <QColor>
|
||||
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
#include "hidapi/hidapi.h"
|
||||
#else
|
||||
#include "hidapi.h"
|
||||
#endif
|
||||
|
||||
#ifndef Q_OS_WIN
|
||||
//Headers needed for sleeping.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
// Include these so we have the various enums
|
||||
//#include "wfmain.h"
|
||||
#include "rigidentities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#define HIDDATALENGTH 64
|
||||
#define MAX_STR 255
|
||||
|
||||
|
||||
/* Any additions/modifications to cmds enum must also be made in wfmain.h */
|
||||
enum cmds {
|
||||
cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdSetFreq, cmdGetMode, cmdSetMode,
|
||||
cmdGetDataMode, cmdSetModeFilter, cmdSetDataModeOn, cmdSetDataModeOff, cmdGetRitEnabled, cmdGetRitValue,
|
||||
cmdSpecOn, cmdSpecOff, cmdDispEnable, cmdDispDisable, cmdGetRxGain, cmdSetRxRfGain, cmdGetAfGain, cmdSetAfGain,
|
||||
cmdGetSql, cmdSetSql, cmdGetIFShift, cmdSetIFShift, cmdGetTPBFInner, cmdSetTPBFInner,
|
||||
cmdGetTPBFOuter, cmdSetTPBFOuter, cmdGetATUStatus,
|
||||
cmdSetATU, cmdStartATU, cmdGetSpectrumMode,
|
||||
cmdGetSpectrumSpan, cmdScopeCenterMode, cmdScopeFixedMode, cmdGetPTT, cmdSetPTT,
|
||||
cmdGetTxPower, cmdSetTxPower, cmdGetMicGain, cmdSetMicGain, cmdSetModLevel,
|
||||
cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
|
||||
cmdGetCurrentModLevel, cmdStartRegularPolling, cmdStopRegularPolling, cmdQueNormalSpeed,
|
||||
cmdGetVdMeter, cmdGetIdMeter, cmdGetSMeter, cmdGetCenterMeter, cmdGetPowerMeter,
|
||||
cmdGetSWRMeter, cmdGetALCMeter, cmdGetCompMeter, cmdGetTxRxMeter,
|
||||
cmdGetTone, cmdGetTSQL, cmdGetDTCS, cmdGetRptAccessMode, cmdGetPreamp, cmdGetAttenuator, cmdGetAntenna,
|
||||
cmdSetTime, cmdSetDate, cmdSetUTCOffset
|
||||
};
|
||||
|
||||
struct COMMAND {
|
||||
/* COMMAND(cmds command, char suffix, bool bandswitch, bandType band) :
|
||||
command(command), suffix(suffix), bandswitch(bandswitch), band(band) {} */
|
||||
|
||||
int index;
|
||||
cmds command;
|
||||
char suffix;
|
||||
bool bandswitch;
|
||||
bandType band;
|
||||
QGraphicsTextItem* text;
|
||||
};
|
||||
|
||||
struct BUTTON {
|
||||
BUTTON(char num, QRect pos, const QColor col) :
|
||||
num(num), pos(pos), textColour(col) {}
|
||||
|
||||
quint8 num;
|
||||
QRect pos;
|
||||
int onEvent = 0;
|
||||
int offEvent = 0;
|
||||
COMMAND onCommand;
|
||||
COMMAND offCommand;
|
||||
const QColor textColour;
|
||||
};
|
||||
|
||||
class usbController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
usbController();
|
||||
~usbController();
|
||||
int hidApiWrite(unsigned char* data, unsigned char length);
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void run();
|
||||
void runTimer();
|
||||
void ledControl(bool on, unsigned char num);
|
||||
|
||||
signals:
|
||||
void jogPlus();
|
||||
void jogMinus();
|
||||
void sendJog(int counter);
|
||||
void doShuttle(bool plus, quint8 level);
|
||||
void setBand(int band);
|
||||
|
||||
void button(bool,unsigned char num);
|
||||
void newDevice(unsigned char devType, QVector<BUTTON>* but);
|
||||
private:
|
||||
hid_device* handle;
|
||||
enum { NONE, shuttleXpress, shuttlePro2, RC28 }usbDevice;
|
||||
bool isOpen=false;
|
||||
unsigned int buttons=0;
|
||||
unsigned char jogpos=0;
|
||||
unsigned char shutpos=0;
|
||||
unsigned char shutMult = 0;
|
||||
QTime lastusbController = QTime::currentTime();
|
||||
QByteArray lastData="";
|
||||
unsigned char lastDialPos=0;
|
||||
int counter = 0;
|
||||
QVector<BUTTON> buttonList;
|
||||
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif
|
82
wfmain.cpp
82
wfmain.cpp
|
@ -26,7 +26,6 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
|||
rpt = new repeaterSetup();
|
||||
sat = new satelliteSetup();
|
||||
trxadj = new transceiverAdjustments();
|
||||
srv = new udpServerSetup();
|
||||
shut = new shuttleSetup();
|
||||
abtBox = new aboutbox();
|
||||
selRad = new selectRadio();
|
||||
|
@ -47,6 +46,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
|||
qRegisterMetaType <datekind>();
|
||||
qRegisterMetaType<rigstate*>();
|
||||
qRegisterMetaType<QList<radio_cap_packet>>();
|
||||
qRegisterMetaType<QVector<BUTTON>*>();
|
||||
qRegisterMetaType<networkStatus>();
|
||||
|
||||
haveRigCaps = false;
|
||||
|
@ -59,7 +59,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, const QString s
|
|||
|
||||
setAudioDevicesUI();
|
||||
|
||||
setupShuttleDevice();
|
||||
setupUsbControllerDevice();
|
||||
|
||||
setDefaultColors();
|
||||
setDefPrefs();
|
||||
|
@ -113,9 +113,9 @@ wfmain::~wfmain()
|
|||
delete rpt;
|
||||
delete ui;
|
||||
delete settings;
|
||||
if (shuttleThread != Q_NULLPTR) {
|
||||
shuttleThread->quit();
|
||||
shuttleThread->wait();
|
||||
if (usbControllerThread != Q_NULLPTR) {
|
||||
usbControllerThread->quit();
|
||||
usbControllerThread->wait();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1280,20 +1280,20 @@ void wfmain::setupKeyShortcuts()
|
|||
connect(keyDebug, SIGNAL(activated()), this, SLOT(on_debugBtn_clicked()));
|
||||
}
|
||||
|
||||
void wfmain::setupShuttleDevice()
|
||||
void wfmain::setupUsbControllerDevice()
|
||||
{
|
||||
shuttleDev = new shuttle();
|
||||
shuttleThread = new QThread(this);
|
||||
shuttleDev->moveToThread(shuttleThread);
|
||||
connect(shuttleThread, SIGNAL(started()), shuttleDev, SLOT(run()));
|
||||
connect(shuttleThread, SIGNAL(finished()), shuttleDev, SLOT(deleteLater()));
|
||||
connect(shuttleDev, SIGNAL(jogPlus()), this, SLOT(shortcutStepPlus()));
|
||||
connect(shuttleDev, SIGNAL(jogMinus()), this, SLOT(shortcutStepMinus()));
|
||||
connect(shuttleDev, SIGNAL(doShuttle(bool, unsigned char)), this, SLOT(doShuttle(bool, unsigned char)));
|
||||
connect(shuttleDev, SIGNAL(button(bool, unsigned char)), this, SLOT(buttonControl(bool, unsigned char)));
|
||||
connect(this, SIGNAL(shuttleLed(bool, unsigned char)), shuttleDev, SLOT(ledControl(bool, unsigned char)));
|
||||
connect(shuttleDev, SIGNAL(newDevice(unsigned char)), shut, SLOT(newDevice(unsigned char)));
|
||||
shuttleThread->start(QThread::LowestPriority);
|
||||
usbControllerDev = new usbController();
|
||||
usbControllerThread = new QThread(this);
|
||||
usbControllerDev->moveToThread(usbControllerThread);
|
||||
connect(usbControllerThread, SIGNAL(started()), usbControllerDev, SLOT(run()));
|
||||
connect(usbControllerThread, SIGNAL(finished()), usbControllerDev, SLOT(deleteLater()));
|
||||
connect(usbControllerDev, SIGNAL(sendJog(int)), this, SLOT(changeFrequency(int)));
|
||||
connect(usbControllerDev, SIGNAL(doShuttle(bool, unsigned char)), this, SLOT(doShuttle(bool, unsigned char)));
|
||||
connect(usbControllerDev, SIGNAL(button(bool, unsigned char)), this, SLOT(buttonControl(bool, unsigned char)));
|
||||
connect(usbControllerDev, SIGNAL(setBand(int)), this, SLOT(setBand(int)));
|
||||
connect(this, SIGNAL(shuttleLed(bool, unsigned char)), usbControllerDev, SLOT(ledControl(bool, unsigned char)));
|
||||
connect(usbControllerDev, SIGNAL(newDevice(unsigned char, QVector<BUTTON>*)), shut, SLOT(newDevice(unsigned char, QVector<BUTTON>*)));
|
||||
usbControllerThread->start(QThread::LowestPriority);
|
||||
}
|
||||
|
||||
void wfmain::pttToggle(bool status)
|
||||
|
@ -1368,6 +1368,18 @@ void wfmain::stepDown()
|
|||
ui->tuningStepCombo->setCurrentIndex(ui->tuningStepCombo->currentIndex() - 1);
|
||||
}
|
||||
|
||||
void wfmain::changeFrequency(int value) {
|
||||
if (freqLock) return;
|
||||
|
||||
freqt f;
|
||||
f.Hz = roundFrequencyWithStep(freq.Hz, value, tsKnobHz);
|
||||
|
||||
f.MHzDouble = f.Hz / (double)1E6;
|
||||
setUIFreq();
|
||||
issueCmdUniquePriority(cmdSetFreq, f);
|
||||
issueDelayedCommandUnique(cmdGetFreq);
|
||||
}
|
||||
|
||||
void wfmain::setDefPrefs()
|
||||
{
|
||||
defPrefs.useFullScreen = false;
|
||||
|
@ -2418,8 +2430,8 @@ void wfmain::shortcutMinus()
|
|||
|
||||
f.MHzDouble = f.Hz / (double)1E6;
|
||||
setUIFreq();
|
||||
//emit setFrequency(0,f);
|
||||
issueCmd(cmdSetFreq, f);
|
||||
//issueCmd(cmdSetFreq, f);
|
||||
issueCmdUniquePriority(cmdSetFreq, f);
|
||||
issueDelayedCommandUnique(cmdGetFreq);
|
||||
}
|
||||
|
||||
|
@ -2432,8 +2444,8 @@ void wfmain::shortcutPlus()
|
|||
|
||||
f.MHzDouble = f.Hz / (double)1E6;
|
||||
setUIFreq();
|
||||
//emit setFrequency(0,f);
|
||||
issueCmd(cmdSetFreq, f);
|
||||
//issueCmd(cmdSetFreq, f);
|
||||
issueCmdUniquePriority(cmdSetFreq, f);
|
||||
issueDelayedCommandUnique(cmdGetFreq);
|
||||
}
|
||||
|
||||
|
@ -2446,7 +2458,7 @@ void wfmain::shortcutStepMinus()
|
|||
|
||||
f.MHzDouble = f.Hz / (double)1E6;
|
||||
setUIFreq();
|
||||
emit setFrequency(f);
|
||||
issueCmd(cmdSetFreq, f);
|
||||
issueDelayedCommandUnique(cmdGetFreq);
|
||||
}
|
||||
|
||||
|
@ -2459,7 +2471,7 @@ void wfmain::shortcutStepPlus()
|
|||
|
||||
f.MHzDouble = f.Hz / (double)1E6;
|
||||
setUIFreq();
|
||||
emit setFrequency(f);
|
||||
issueCmd(cmdSetFreq, f);
|
||||
issueDelayedCommandUnique(cmdGetFreq);
|
||||
}
|
||||
|
||||
|
@ -4300,6 +4312,12 @@ void wfmain::bandStackBtnClick()
|
|||
emit getBandStackReg(bandStkBand, bandStkRegCode);
|
||||
}
|
||||
|
||||
void wfmain::setBand(int band)
|
||||
{
|
||||
bandStkBand = rigCaps.bsr[(bandType)band]; // 23cm
|
||||
bandStackBtnClick();
|
||||
}
|
||||
|
||||
void wfmain::on_band23cmbtn_clicked()
|
||||
{
|
||||
bandStkBand = rigCaps.bsr[band23cm]; // 23cm
|
||||
|
@ -5901,17 +5919,17 @@ void wfmain::on_debugBtn_clicked()
|
|||
//setRadioTimeDatePrep();
|
||||
//wf->setInteraction(QCP::iRangeZoom, true);
|
||||
//wf->setInteraction(QCP::iRangeDrag, true);
|
||||
bool ok;
|
||||
int height = QInputDialog::getInt(this, "wfview Radio Polling Setup", "Poll Timing Interval (ms)", 350, 1, 500, 1, &ok );
|
||||
//bool ok;
|
||||
//int height = QInputDialog::getInt(this, "wfview Radio Polling Setup", "Poll Timing Interval (ms)", 350, 1, 500, 1, &ok );
|
||||
|
||||
this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
this->setMaximumSize(QSize(1025,height));
|
||||
this->setMinimumSize(QSize(1025,height));
|
||||
//this->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
//this->setMaximumSize(QSize(1025,height));
|
||||
//this->setMinimumSize(QSize(1025,height));
|
||||
//this->setMaximumSize(QSize(929, 270));
|
||||
//this->setMinimumSize(QSize(929, 270));
|
||||
|
||||
resize(minimumSize());
|
||||
adjustSize(); // main window
|
||||
adjustSize();
|
||||
//resize(minimumSize());
|
||||
//adjustSize(); // main window
|
||||
//adjustSize();
|
||||
|
||||
}
|
||||
|
|
25
wfmain.h
25
wfmain.h
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <qcustomplot.h>
|
||||
#include <qserialportinfo.h>
|
||||
#include "shuttle.h"
|
||||
#include "usbcontroller.h"
|
||||
#include "shuttlesetup.h"
|
||||
|
||||
#include <deque>
|
||||
|
@ -285,6 +285,13 @@ private slots:
|
|||
void receiveBaudRate(quint32 baudrate);
|
||||
void radioSelection(QList<radio_cap_packet> radios);
|
||||
|
||||
// Added for RC28/Shuttle support
|
||||
void pttToggle(bool);
|
||||
void stepUp();
|
||||
void stepDown();
|
||||
void changeFrequency(int value);
|
||||
void setBand(int band);
|
||||
|
||||
void setRadioTimeDateSend();
|
||||
|
||||
void buttonControl(bool on, unsigned char button);
|
||||
|
@ -630,7 +637,7 @@ private:
|
|||
void setSerialDevicesUI();
|
||||
void setAudioDevicesUI();
|
||||
void setServerToPrefs();
|
||||
void setupShuttleDevice();
|
||||
void setupUsbControllerDevice();
|
||||
void setInitialTiming();
|
||||
void getSettingsFilePath(QString settingsFile);
|
||||
|
||||
|
@ -666,6 +673,7 @@ private:
|
|||
unsigned char setModeVal=0;
|
||||
unsigned char setFilterVal=0;
|
||||
|
||||
/* Any additions/modifications to cmds enum must also be made in usbcontroller.h */
|
||||
enum cmds {cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdSetFreq, cmdGetMode, cmdSetMode,
|
||||
cmdGetDataMode, cmdSetModeFilter, cmdSetDataModeOn, cmdSetDataModeOff, cmdGetRitEnabled, cmdGetRitValue,
|
||||
cmdSpecOn, cmdSpecOff, cmdDispEnable, cmdDispDisable, cmdGetRxGain, cmdSetRxRfGain, cmdGetAfGain, cmdSetAfGain,
|
||||
|
@ -860,7 +868,6 @@ private:
|
|||
repeaterSetup *rpt;
|
||||
satelliteSetup *sat;
|
||||
transceiverAdjustments *trxadj;
|
||||
udpServerSetup *srv;
|
||||
shuttleSetup* shut;
|
||||
aboutbox *abtBox;
|
||||
selectRadio *selRad;
|
||||
|
@ -894,11 +901,11 @@ private:
|
|||
rigstate* rigState = Q_NULLPTR;
|
||||
|
||||
SERVERCONFIG serverConfig;
|
||||
shuttle *shuttleDev = Q_NULLPTR;
|
||||
QThread *shuttleThread = Q_NULLPTR;
|
||||
#ifdef RTAUDIO
|
||||
RtAudio audio;
|
||||
#endif
|
||||
void serverAddUserLine(const QString& user, const QString& pass, const int& type);
|
||||
|
||||
usbController *usbControllerDev = Q_NULLPTR;
|
||||
QThread *usbControllerThread = Q_NULLPTR;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -917,7 +924,7 @@ Q_DECLARE_METATYPE(enum meterKind)
|
|||
Q_DECLARE_METATYPE(enum spectrumMode)
|
||||
Q_DECLARE_METATYPE(QList<radio_cap_packet>)
|
||||
Q_DECLARE_METATYPE(rigstate*)
|
||||
|
||||
Q_DECLARE_METATYPE(QVector <BUTTON>*)
|
||||
|
||||
#endif // WFMAIN_H
|
||||
#endif
|
10
wfview.pro
10
wfview.pro
|
@ -143,7 +143,7 @@ CONFIG(debug, release|debug) {
|
|||
}
|
||||
|
||||
linux:LIBS += -L./ -l$$QCPLIB -lopus
|
||||
macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus
|
||||
macx:LIBS += -framework CoreAudio -framework CoreFoundation -hidapi -lpthread -lopus
|
||||
|
||||
win32:INCLUDEPATH += ../hidapi/hidapi
|
||||
win32:SOURCES += ../hidapi/windows/hid.c
|
||||
|
@ -180,8 +180,7 @@ SOURCES += main.cpp\
|
|||
resampler/resample.c \
|
||||
repeatersetup.cpp \
|
||||
rigctld.cpp \
|
||||
ring/ring.cpp \
|
||||
shuttle.cpp \
|
||||
usbcontroller.cpp \
|
||||
shuttlesetup.cpp \
|
||||
transceiveradjustments.cpp \
|
||||
selectradio.cpp \
|
||||
|
@ -210,8 +209,7 @@ HEADERS += wfmain.h \
|
|||
repeaterattributes.h \
|
||||
rigctld.h \
|
||||
ulaw.h \
|
||||
ring/ring.h \
|
||||
shuttle.h \
|
||||
usbcontroller.h \
|
||||
shuttlesetup.h \
|
||||
transceiveradjustments.h \
|
||||
audiotaper.h \
|
||||
|
@ -225,7 +223,7 @@ FORMS += wfmain.ui \
|
|||
selectradio.ui \
|
||||
repeatersetup.ui \
|
||||
transceiveradjustments.ui \
|
||||
shuttlesetup.ui
|
||||
shuttlesetup.ui \
|
||||
aboutbox.ui
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.;..\hidapi\hidapi;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>release\</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>release\</ObjectFileName>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2e";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX="/usr/local";GITSHORT="c1f9358";HOST="wfview.org";UNAME="build";NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2e";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX="/usr/local";GITSHORT="fad416c";HOST="wfview.org";UNAME="build";NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<ProgramDataBaseFileName></ProgramDataBaseFileName>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
|
@ -85,12 +85,12 @@
|
|||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2e\";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"c1f9358\";HOST=\"wfview.org\";UNAME=\"build\";NDEBUG;QT_NO_DEBUG;QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2e\";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"fad416c\";HOST=\"wfview.org\";UNAME=\"build\";NDEBUG;QT_NO_DEBUG;QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc><CompilerFlavor>msvc</CompilerFlavor><Include>./$(Configuration)/moc_predefs.h</Include><ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription><DynamicSource>output</DynamicSource><QtMocDir>$(Configuration)</QtMocDir><QtMocFileName>moc_%(Filename).cpp</QtMocFileName></QtMoc><QtRcc><Compression>default</Compression><ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription><QtRccDir>$(Configuration)</QtRccDir><QtRccFileName>qrc_%(Filename).cpp</QtRccFileName></QtRcc><QtUic><ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription><QtUicDir>$(ProjectDir)</QtUicDir><QtUicFileName>ui_%(Filename).h</QtUicFileName></QtUic></ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>.;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;debug;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>.;..\hidapi\hidapi;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;debug;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AssemblerListingLocation>debug\</AssemblerListingLocation>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<ObjectFileName>debug\</ObjectFileName>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2e";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX="/usr/local";GITSHORT="c1f9358";HOST="wfview.org";UNAME="build";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2e";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX="/usr/local";GITSHORT="fad416c";HOST="wfview.org";UNAME="build";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessToFile>false</PreprocessToFile>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<WarningLevel>0</WarningLevel>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2e\";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"c1f9358\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION=\"1.2e\";BUILD_WFVIEW;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;EIGEN_MPL2_ONLY;EIGEN_DONT_VECTORIZE;EIGEN_VECTORIZE_SSE3;PREFIX=\"/usr/local\";GITSHORT=\"fad416c\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<QtMoc><CompilerFlavor>msvc</CompilerFlavor><Include>./$(Configuration)/moc_predefs.h</Include><ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription><DynamicSource>output</DynamicSource><QtMocDir>$(Configuration)</QtMocDir><QtMocFileName>moc_%(Filename).cpp</QtMocFileName></QtMoc><QtRcc><Compression>default</Compression><ExecutionDescription>Rcc'ing %(Identity)...</ExecutionDescription><QtRccDir>$(Configuration)</QtRccDir><QtRccFileName>qrc_%(Filename).cpp</QtRccFileName></QtRcc><QtUic><ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription><QtUicDir>$(ProjectDir)</QtUicDir><QtUicFileName>ui_%(Filename).h</QtUicFileName></QtUic></ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -133,6 +133,7 @@
|
|||
<ClCompile Include="calibrationwindow.cpp" />
|
||||
<ClCompile Include="commhandler.cpp" />
|
||||
<ClCompile Include="freqmemory.cpp" />
|
||||
<ClCompile Include="..\hidapi\windows\hid.c" />
|
||||
<ClCompile Include="logcategories.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="meter.cpp" />
|
||||
|
@ -146,10 +147,12 @@
|
|||
<ClCompile Include="rigidentities.cpp" />
|
||||
<ClCompile Include="satellitesetup.cpp" />
|
||||
<ClCompile Include="selectradio.cpp" />
|
||||
<ClCompile Include="shuttlesetup.cpp" />
|
||||
<ClCompile Include="tcpserver.cpp" />
|
||||
<ClCompile Include="transceiveradjustments.cpp" />
|
||||
<ClCompile Include="udphandler.cpp" />
|
||||
<ClCompile Include="udpserver.cpp" />
|
||||
<ClCompile Include="usbcontroller.cpp" />
|
||||
<ClCompile Include="wfmain.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -290,6 +293,16 @@
|
|||
|
||||
|
||||
|
||||
</QtMoc>
|
||||
<QtMoc Include="shuttlesetup.h">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</QtMoc>
|
||||
<ClInclude Include="resampler\speex_resampler.h" />
|
||||
<QtMoc Include="tcpserver.h">
|
||||
|
@ -333,6 +346,16 @@
|
|||
|
||||
</QtMoc>
|
||||
<ClInclude Include="ulaw.h" />
|
||||
<QtMoc Include="usbcontroller.h">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</QtMoc>
|
||||
<QtMoc Include="wfmain.h">
|
||||
|
||||
|
||||
|
@ -402,6 +425,11 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -464,6 +492,17 @@
|
|||
|
||||
|
||||
|
||||
</QtUic>
|
||||
<QtUic Include="shuttlesetup.ui">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</QtUic>
|
||||
<QtUic Include="transceiveradjustments.ui">
|
||||
|
||||
|
@ -518,6 +557,7 @@
|
|||
<None Include="qdarkstyle\rc\radio_unchecked.png" />
|
||||
<None Include="qdarkstyle\rc\radio_unchecked_disabled.png" />
|
||||
<None Include="qdarkstyle\rc\radio_unchecked_focus.png" />
|
||||
<None Include="resources\rc28.png" />
|
||||
<QtRcc Include="resources\resources.qrc">
|
||||
|
||||
|
||||
|
@ -531,6 +571,8 @@
|
|||
<InitFuncName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">resources</InitFuncName><InitFuncName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">resources</InitFuncName></QtRcc>
|
||||
<None Include="qdarkstyle\rc\right_arrow.png" />
|
||||
<None Include="qdarkstyle\rc\right_arrow_disabled.png" />
|
||||
<None Include="resources\shuttlepro.png" />
|
||||
<None Include="resources\shuttlexpress.png" />
|
||||
<None Include="qdarkstyle\rc\sizegrip.png" />
|
||||
<QtRcc Include="qdarkstyle\style.qrc">
|
||||
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
<ClCompile Include="freqmemory.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\hidapi\windows\hid.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="logcategories.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -101,6 +104,9 @@
|
|||
<ClCompile Include="selectradio.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="shuttlesetup.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="tcpserver.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -113,6 +119,9 @@
|
|||
<ClCompile Include="udpserver.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="usbcontroller.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="wfmain.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -181,6 +190,9 @@
|
|||
<QtMoc Include="selectradio.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="shuttlesetup.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<ClInclude Include="resampler\speex_resampler.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -199,6 +211,9 @@
|
|||
<ClInclude Include="ulaw.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<QtMoc Include="usbcontroller.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="wfmain.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
|
@ -251,6 +266,11 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -274,6 +294,9 @@
|
|||
<QtUic Include="selectradio.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="shuttlesetup.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="transceiveradjustments.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
|
@ -369,6 +392,9 @@
|
|||
<None Include="qdarkstyle\rc\radio_unchecked_focus.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="resources\rc28.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<QtRcc Include="resources\resources.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</QtRcc>
|
||||
|
@ -378,6 +404,12 @@
|
|||
<None Include="qdarkstyle\rc\right_arrow_disabled.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="resources\shuttlepro.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="resources\shuttlexpress.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
<None Include="qdarkstyle\rc\sizegrip.png">
|
||||
<Filter>Resource Files</Filter>
|
||||
</None>
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(PATH)</LocalDebuggerEnvironment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<QtLastBackgroundBuild>2022-04-18T13:23:03.5252168Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2022-04-20T14:41:25.1423672Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<QtLastBackgroundBuild>2022-04-18T13:23:05.0598803Z</QtLastBackgroundBuild>
|
||||
<QtLastBackgroundBuild>2022-04-20T14:41:38.4063700Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Ładowanie…
Reference in New Issue