Porównaj commity

..

No commits in common. "master" and "v1.60" have entirely different histories.

56 zmienionych plików z 2326 dodań i 7984 usunięć

1018
CHANGELOG

Plik diff jest za duży Load Diff

109
CI-V.md
Wyświetl plik

@ -1,109 +0,0 @@
## this is a merged list of CI-V addresses, type of interface(s), rates and all.
It has been merged from many sources but the most important ones are these:
1) https://www.docksideradio.com/Icom%20Radio%20Hex%20Addresses.htm
2) http://www.plicht.de/ci-v/civ-bus-adressing/
3) https://www.icomjapan.com/support/manual/
first of all a list that appears not to be a known CI-V address in use:
| model | addr |
| ----- | ---- |
|? | 0x06 |
|? | 0x36 |
|? | 0x54 |
|? | 0x7E |
|? | 0x82 |
|? | 0x84 |
|? | 0x8A |
|? | 0x90 |
|? | 0x92 |
|? | 0x9E |
|? | 0xA0 |
|? | 0xA8 |
|? | 0xAA |
and here the list of known CI-V addresses
| model | addr | year | interface | rate |
| ------------ | ---- | ---- | -------------------------------------- | ---- |
| IC-1271 | 0x24 | 1987 | TTL | auto |
| IC-1275 | 0x18 | 1989 | TTL | auto |
| IC-271 | 0x20 | 1983 | TTL | auto |
| IC-275 | 0x10 | 1987 | TTL | auto |
| IC-375 | 0x12 | 198? | TTL | auto |
| IC-471 | 0x22 | 1984 | TTL | auto |
| IC-475 | 0x14 | 1987 | TTL | auto |
| IC-575 | 0x16 | 1988 | TTL | auto |
| IC-7000 | 0x70 | 2005 | TTL | auto |
| IC-703 | 0x68 | 2003 | TTL | auto |
| IC-705 | 0xA4 | 2020 | USB, Bluetooth, Wifi | auto |
| IC-706 | 0x48 | 1995 | TTL | auto |
| IC-706MkII | 0x4E | 1997 | TTL | auto |
| IC-706MkII-G | 0x58 | 1998 | TTL | auto |
| IC-707 | 0x3E | 1993 | TTL | auto |
| IC-7100 | 0x88 | 2012 | TTL | auto |
| IC-718 | 0x5E | 2001 | TTL | auto |
| IC-7200 | 0x76 | 2007 | TTL | auto |
| IC-725 | 0x28 | 1988 | TTL | 1200 |
| IC-726 | 0x30 | 1989 | TTL | auto |
| IC-728 | 0x38 | 1992 | TTL | 1200 |
| IC-729 | 0x3A | 1992 | TTL | 9600 |
| IC-7300 | 0x94 | 2016 | TTL, USB | auto |
| IC-735 | 0x04 | 1985 | TTL | 1200 |
| IC-736 | 0x40 | 1994 | TTL | 9600 |
| IC-737 | 0x3C | 1993 | TTL | 9600 |
| IC-738 | 0x44 | 1994 | TTL | 9600 |
| IC-7410 | 0x80 | 2011 | TTL, USB | auto |
| IC-746 | 0x56 | 1998 | TTL | auto |
| IC-746Pro | 0x66 | 2001 | TTL | auto |
| IC-751A | 0x1C | 1985 | TTL | 1200 |
| IC-756 | 0x50 | 1997 | TTL | auto |
| IC-756Pro | 0x5C | 2000 | TTL | auto |
| IC-756ProII | 0x64 | 2001 | TTL | auto |
| IC-756ProIII | 0x6E | 2004 | TTL | auto |
| IC-7600 | 0x7A | 2009 | TTL, USB | auto |
| IC-7610 | 0x98 | 2017 | TTL, USB, Ethernet | auto |
| IC-761 | 0x1E | 1987 | TTL | 1200 |
| IC-765 | 0x2C | 1989 | TTL | 1200 |
| IC-7700 | 0x74 | 2007 | TTL, RS-232C 9 pin, Ethernet | auto |
| IC-775 | 0x46 | 1995 | TTL | auto |
| IC-7800 | 0x6A | 2004 | TTL, RS-232C 9 pin, Ethernet | auto |
| IC-78 | 0x62 | 2000 | TTL | auto |
| IC-781 | 0x26 | 1987 | TTL | 1200 |
| IC-785x | 0x8E | 2015 | TTL, USB, Ethernet | auto |
| IC-820 | 0x42 | 1994 | TTL | auto |
| IC-821 | 0x4C | 1996 | TTL | auto |
| IC-905 | 0xAC | 2023 | USB, Ethernet | auto |
| IC-9100 | 0x7C | 2010 | TTL, USB | auto |
| IC-910 | 0x60 | 2001 | TTL | auto |
| IC-9700 | 0xA2 | 2019 | TTL, USB, Ethernet | auto |
| IC-970 | 0x2E | 1990 | TTL | auto |
| IC-R10 | 0x52 | 1996 | TTL | auto |
| IC-R20 | 0x6C | 2004 | TTL | auto |
| IC-R30 | 0x9C | 2018 | TTL, Bluetooth | auto |
| IC-R7000 | 0x08 | 1986 | TTL | auto |
| IC-R7100 | 0x34 | 1991 | TTL | auto |
| IC-R71 | 0x1A | 1984 | TTL | auto |
| IC-R72 | 0x32 | 1992 | TTL | auto |
| IC-R75 | 0x5A | 1999 | TTL, RS-232C 9 pin | auto |
| IC-R8500 | 0x4A | 1996 | TTL, RS-232C 25 pin | auto |
| IC-R8600 | 0x96 | 2017 | TTL, USB, Ethernet | auto |
| IC-R9000 | 0x2A | 1989 | TTL | auto |
| IC-R9500 | 0x72 | 2007 | TTL, RS-232C 9 pin, Ethernet | auto |
| IC-RX7 | 0x78 | 2007 | TTL | auto |
| ID-4100 | 0x9A | 2017 | TTL, Bluetooth | auto |
| ID-5100 | 0x8C | 2014 | TTL, Bluetooth | auto |
| ID-51 | 0x86 | 2012 | TTL | auto |
| ID-52 | 0xA6 | 2021 | TTL, Bluetooth | auto |

Wyświetl plik

@ -18,7 +18,6 @@ sudo apt-get install libeigen3-dev
sudo apt-get install portaudio19-dev
sudo apt-get install librtaudio-dev
sudo apt-get install libhidapi-dev libqt5gamepad5-dev
sudo apt-get install libudev-dev
~~~
Now you need to install qcustomplot. There are two versions that are commonly found in linux distros: 1.3 and 2.0. Either will work fine. If you are not sure which version your linux install comes with, simply run both commands. One will work and the other will fail, and that's fine!
@ -80,7 +79,8 @@ install wfview on suse 15.3 & up, sles 15.x or tumbleweed; this was done on a cl
we need to add packages to be able to build the stuff.
- sudo zypper in --type pattern devel_basis
- sudo zypper in libQt5Widgets-devel libqt5-qtbase-common-devel libqt5-qtserialport-devel libQt5SerialPort5 qcustomplot-devel libqcustomplot2 libQt5PrintSupport-devel libqt5-qtmultimedia-devel lv2-devel libopus-devel eigen3-devel libQt5Xml-devel portaudio-devel rtaudio-devel libqt5-qtgamepad-devel libQt5Gamepad5
- sudo zypper in libQt5Widgets-devel libqt5-qtbase-common-devel libqt5-qtserialport-devel libQt5SerialPort5 qcustomplot-devel libqcustomplot2 libQt5PrintSupport-devel libqt5-qtmultimedia-devel lv2-devel libopus-devel eigen3-devel libQt5Xml-devel portaudio-devel rtaudio-devel libqt5-qtgamepad-dev
libQt5Gamepad5
optional (mainly for development specifics): get and install qt5:
@ -129,28 +129,6 @@ When done, create a build area, clone the repo, build and install:
wfview is now installed in /usr/local/bin
Fedora 36:
2023-04-11/Knud OZ1DGN
Precondition:
F36 KDE plasma desktop
wfview 1.61 prebuild binary
Install following packages:
sudo dnf install qcustomplot-qt5 qt5-qtmultimedia qt5-qtserialport rtaudio portaudio hidapi qt5-qtgamepad
sudo ln -s /usr/lib64/libqcustomplot-qt5.so.2 /usr/lib64/libqcustomplot.so.2
Move /usr/share/wfview to /usr/local/share:
sudo mv /usr/share/wfview/stylesheets/* /usr/local/share/wfview
# How to configure your RC-28 knob under Linux
To use RC-28 knob you need to add udev rules, please execute as root:

Wyświetl plik

@ -1,13 +1,71 @@
The following highlights are in this 1.6x-release since v1.60:
+1.60 released
+1.61 many small fixes for several platforms
+1.62 cw side tone added
performance fix for 9700
+1.63 started adding IC-905 (obviously untested)
started multi-usb
The following highlights are in this 1.51-release ince v1.50:
+ 1.51
Fix for squished screen
Only request passband when there is a scope available
Change default passband colors.
Fix passband colorswatch
Ignore second VFO scope data (for now)
Silently ignore server audio issues if server is not enabled.
Always use 8bit encoding for audio device names
Make multimedia-plugins message only for Linux
Add PSK modes to IC-7610 and to passband.
Add passband for FM mode
Added click-drag tuning. Needs refinement but it's a start.
colorpicker: Move to 3 columns
passband indicator
Remove logging of audio device realm
+ 1.52 added cluster spotting including color picker suport
optional SQLITE in memory for spots (disabled)
+ 1.53 modified band buttons to look more alike the layout on the rigs
audio selction combobox shows full devicenames
Fixed color preset zero issue.
Fixed unusual set of conditions in which manual CI-V address would fail
to identify the connected radio.
Fixed broken RTS preference. Added preliminary (and untested) support
for the IC-703, 737, 738, and 756.
added libs for suse builds; it also builds on leap 15.5
Add skimmer support (setting not saved)
Add AR Cluster support
+1.54 Various wfserver fixes
logging using termbin edge case fix
+1.55 Compiles with QT5 and 6 now
Many audio-fixes
Fix wfserver device detection
Prevent memory leak on exit
Dawid Szymanski - SQ6EMM/SN6M 'standardHFfix'; fixed missing 160m band
Support hotplug audio on QT6+
Remove Exception from RT audio as it doesn't exist in newer versions of RTAudio
Tidy-up device enumeration for Qt audio
Log enumeration of audio devices
Fix codec selection issue in both QT5 and 6
Make sure compilation with QT5 still works
+1.56 Rename in/out Formats to avoid confusion
Fix all audio formats and some compile warnings!
Add function to handle connect/disconnect
Add option of popup alert
Change serial port signal for QT6.
Various audio fixes (needs checking with Qt5)
Fix portaudio
Fix for QTAudio when using QT6 and above.
+1.57 Merged current shuttle code in. Note that it does
not work yet and is commented out in the build process
Fix invalid filter width being sent to rig by rigctld.
Ability to drag the passband for a variable filter width
Added preference for automatic sideband.
+1.58 PTT on now is default
PBT is shown on the passband, see "Show more" button
filterwidth can be adjusted . see "Show more" button
capability to send predefined cw for righs that support it.
Fixed up many key shortcuts, added HJKL key shortcuts.
+1.59 rc28-shuttle control added
many repeater/split functionality
added "Swap VFOs" command to the USB controller, which seems to work.
Added "scope out of range" notification.
many fixes
added a known limitations and issues file.
Notes:
- We know about high CPU usage on RPi.

Wyświetl plik

@ -15,7 +15,8 @@ aboutbox::aboutbox(QWidget *parent) :
ui->topText->setText("wfview version " + QString(WFVIEW_VERSION));
QString head = QString("<html><head></head><body>");
QString copyright = QString("Copyright 2017-2023 Elliott H. Liggett, W6EL and Phil E. Taylor, M0VSE. All rights reserved.<br/>wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
QString copyright = QString("Copyright 2017-2022 Elliott H. Liggett, W6EL. All rights reserved.<br/>wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
QString nacode = QString("<br/><br/>Networking, audio, rigctl server, and much more written by Phil Taylor, M0VSE");
QString scm = QString("<br/><br/>Source code and issues managed by Roeland Jansen, PA3MET");
QString doctest = QString("<br/><br/>Testing and development mentorship from Jim Nijkamp, PA8E.");
@ -85,7 +86,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.");
// String it all together:
QString aboutText = head + copyright + "\n" + "\n" + scm + "\n" + doctest + dedication + wfviewcommunityack;
QString aboutText = head + copyright + "\n" + nacode + "\n" + scm + "\n" + doctest + dedication + wfviewcommunityack;
aboutText.append(website + "\n" + donate + "\n"+ docs + support + contact +"\n");
aboutText.append("\n" + ssCredit + "\n" + rsCredit + "\n");

Wyświetl plik

@ -113,11 +113,13 @@ bool audioConverter::convert(audioPacket audio)
QByteArray outPacket(nSamples * sizeof(float) * inFormat.channelCount(), (char)0xff); // Preset the output buffer size.
float* out = (float*)outPacket.data();
int ret = opus_decode_float(opusDecoder, in, audio.data.size(), out, nSamples, 0);
if (ret != nSamples)
{
qDebug(logAudio()) << "opus_decode_float: returned:" << ret << "samples, expected:" << nSamples;
}
//if (audio.seq > lastAudioSequence + 1) {
// nSamples = opus_decode_float(opusDecoder, Q_NULLPTR, 0, out, nSamples, 1);
//}
//else {
nSamples = opus_decode_float(opusDecoder, in, audio.data.size(), out, nSamples, 0);
//}
//lastAudioSequence = audio.seq;
audio.data.clear();
audio.data = outPacket; // Replace incoming data with converted.
}

Wyświetl plik

@ -103,8 +103,6 @@ void commHandler::sendDataOut(const QByteArray &writeData)
qint64 bytesWritten;
previousSent = writeData;
if(PTTviaRTS)
{
// Size: 1 2 3 4 5 6 7 8
@ -128,7 +126,7 @@ void commHandler::sendDataOut(const QByteArray &writeData)
printHex(pttreturncmd, false, true);
emit haveDataFromPort(pttreturncmd);
mutex.unlock();
return;
} else if(writeData.endsWith(QByteArrayLiteral("\x1C\x00\x01\xFD")))
@ -172,15 +170,6 @@ void commHandler::receiveDataIn()
port->startTransaction();
inPortData = port->readAll();
if (inPortData.startsWith("\xFC\xFC\xFC\xFC\xFC"))
{
// Colission detected by remote end, re-send previous command.
qInfo(logSerial()) << "Collision detected by remote, resending previous command";
port->commitTransaction();
sendDataOut(previousSent);
return;
}
if(inPortData.size() == 1)
{
// Generally for baud <= 9600
@ -196,6 +185,7 @@ void commHandler::receiveDataIn()
}
}
if (inPortData.startsWith("\xFE\xFE"))
{
if(inPortData.contains("\xFC"))
@ -220,6 +210,7 @@ void commHandler::receiveDataIn()
//printHex(inPortData, false, true);
while (pos > -1 && fdPos > -1) {
combined++;
spectrumDivisionNumber = 0;
spectrumDivisionNumber = inPortData[pos + 3] & 0x0f;
spectrumDivisionNumber += ((inPortData[pos + 3] & 0xf0) >> 4) * 10;
@ -235,8 +226,8 @@ void commHandler::receiveDataIn()
}
else if (spectrumDivisionNumber > lastSpectrum && spectrumDivisionNumber <= spectrumDivisionMax) {
spectrumData.insert(spectrumData.length(), inPortData.mid(pos + 5, fdPos-5));
//qInfo() << "Added spectrum seq:" << spectrumDivisionNumber << "len" << fdPos-5<< "Spec" << spectrumData.length();
spectrumData.insert(spectrumData.length(), inPortData.mid(pos + 4, fdPos-5));
//qDebug() << "Added spectrum seq:" << spectrumDivisionNumber << "len" << fdPos-5;
//printHex(inPortData.mid((pos+4),fdPos - (pos+5)), false, true);
}
else {

Wyświetl plik

@ -57,7 +57,6 @@ private:
//QDataStream stream;
QByteArray outPortData;
QByteArray inPortData;
QByteArray previousSent;
//QDataStream outStream;
//QDataStream inStream;

Plik diff jest za duży Load Diff

Wyświetl plik

@ -6,7 +6,6 @@
#include <QGraphicsScene>
#include <QGraphicsTextItem>
#include <QGraphicsPixmapItem>
#include <QGraphicsRectItem>
#include <QPoint>
#include <QGraphicsSceneMouseEvent>
#include <QVector>
@ -15,99 +14,13 @@
#include <QLabel>
#include <QGraphicsProxyWidget>
#include <QAbstractItemView>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QPushButton>
#include <QScopedPointer>
#include <QCheckBox>
#include <QFileDialog>
#include <QMessageBox>
#include <QLayoutItem>
#include <QDebug>
#include <QObject>
#include <QColorDialog>
#include <QWidget>
#include <QSpinBox>
#include <QCheckBox>
#include "usbcontroller.h"
class controllerScene : public QGraphicsScene
{
Q_OBJECT
QGraphicsLineItem* item = Q_NULLPTR;
signals:
void showMenu(controllerScene* scene, QPoint p);
void buttonAction(bool pressed, QPoint p);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent* event) {
if (event->button() == Qt::RightButton)
{
emit showMenu(this, event->scenePos().toPoint());
}
else if (event->button() == Qt::LeftButton)
{
// Simulate a button press
emit buttonAction(true,event->scenePos().toPoint());
}
else
{
QGraphicsScene::mousePressEvent(event);
}
}
void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) {
if (event->button() == Qt::LeftButton)
{
// Simulate a button release
emit buttonAction(false,event->scenePos().toPoint());
}
else
{
QGraphicsScene::mouseReleaseEvent(event);
}
}
};
struct tabContent {
QWidget* tab;
QVBoxLayout* mainLayout;
QHBoxLayout* topLayout;
QWidget* widget;
QVBoxLayout* layout;
QCheckBox* disabled;
QLabel* message;
QGraphicsView* view;
QLabel* pageLabel;
QSpinBox* page;
QHBoxLayout* sensLayout;
QLabel* sensLabel;
QSlider* sens;
QImage* image;
QGraphicsItem* bgImage = Q_NULLPTR;
controllerScene* scene = Q_NULLPTR;
QGridLayout* grid;
QLabel* brightLabel;
QComboBox* brightness;
QLabel* speedLabel;
QComboBox* speed;
QLabel* orientLabel;
QComboBox* orientation;
QLabel* colorLabel;
QPushButton* color;
QLabel* timeoutLabel;
QSpinBox* timeout;
QLabel* pagesLabel;
QSpinBox* pages;
QLabel* helpText;
};
namespace Ui {
class controllerSetup;
@ -122,102 +35,68 @@ public:
~controllerSetup();
signals:
void started();
void sendRequest(USBDEVICE* dev, usbFeatureType request, int val=0, QString text="", QImage* img=Q_NULLPTR, QColor* color=Q_NULLPTR);
void programDisable(USBDEVICE* dev, bool disable);
void programPages(USBDEVICE* dev, int pages);
void backup(USBDEVICE* dev, QString path);
void restore(USBDEVICE *dev, QString path);
public slots:
void init(usbDevMap* dev, QVector<BUTTON>* but, QVector<KNOB>* kb, QVector<COMMAND>* cmd, QMutex* mut);
void newDevice(USBDEVICE* dev);
void removeDevice(USBDEVICE* dev);
void showMenu(controllerScene *scene,QPoint p);
void newDevice(unsigned char devType, QVector<BUTTON>* but, QVector<COMMAND>* cmd);
void mousePressed(QPoint p);
void onEventIndexChanged(int index);
void offEventIndexChanged(int index);
void knobEventIndexChanged(int index);
void ledNumberChanged(int index);
void sensitivityMoved(USBDEVICE* dev, int val);
void brightnessChanged(USBDEVICE* dev, int index);
void orientationChanged(USBDEVICE* dev, int index);
void speedChanged(USBDEVICE* dev, int index);
void colorPicker(USBDEVICE* dev, QPushButton* btn, QColor color);
void buttonOnColorClicked();
void buttonOffColorClicked();
void buttonIconClicked();
void latchStateChanged(int state);
void timeoutChanged(USBDEVICE* dev, int val);
void pageChanged(USBDEVICE* dev, int val);
void pagesChanged(USBDEVICE* dev, int val);
void disableClicked(USBDEVICE* dev, bool clicked, QWidget* widget);
void setConnected(USBDEVICE* dev);
void hideEvent(QHideEvent *event);
void on_tabWidget_currentChanged(int index);
void on_backupButton_clicked();
void on_restoreButton_clicked();
private:
usbDeviceType type = usbNone;
usbDeviceType usbDevice = usbNone;
Ui::controllerSetup* ui;
QGraphicsScene* scene;
QGraphicsTextItem* textItem;
QGraphicsItem* bgImage = Q_NULLPTR;
QLabel* imgLabel;
unsigned char currentDevice = 0;
QVector<BUTTON>* buttons;
QVector<KNOB>* knobs;
QVector<COMMAND>* commands;
usbDevMap* devices;
BUTTON* currentButton = Q_NULLPTR;
KNOB* currentKnob = Q_NULLPTR;
// Update Dialog
QDialog * updateDialog = Q_NULLPTR;
QComboBox* onEvent;
QComboBox* offEvent;
QComboBox* knobEvent;
QLabel* onLabel;
QLabel* offLabel;
QLabel* knobLabel;
QPushButton* buttonOnColor;
QPushButton* buttonOffColor;
QCheckBox *buttonLatch;
QPushButton* buttonIcon;
QLabel* iconLabel;
QSpinBox* ledNumber;
BUTTON* currentButton=Q_NULLPTR;
QComboBox onEvent;
QComboBox offEvent;
QGraphicsProxyWidget* onEventProxy=Q_NULLPTR;
QGraphicsProxyWidget* offEventProxy=Q_NULLPTR;
QString deviceName;
QMutex* mutex;
QColor initialColor = Qt::white;
QLabel* noControllersText;
int numTabs=0;
QMap<QString,tabContent*> tabs;
// Below are used for each tab:
/*
QList<QWidget *> tabs;
QList<QVBoxLayout *> layouts;
QList<QWidget *> widgets;
QList<QGraphicsView *> graphicsViews;
QList<QGraphicsScene*> scenes;
QList<QGraphicsItem*> bgImages;
QList<QSlider *>sensitivitys;
// Just used for QuickKeys device
QList<QComboBox *>brightCombos;
QList<QComboBox *>speedCombos;
QList<QComboBox *>orientCombos;
QList<QPushButton *>colorButtons;
QList<QSpinBox *>timeoutSpins;
*/
};
class controllerScene : 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
#endif

Wyświetl plik

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>788</width>
<height>646</height>
<width>302</width>
<height>343</height>
</rect>
</property>
<property name="windowTitle">
@ -15,26 +15,30 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="tabPosition">
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Tab 1</string>
</attribute>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Tab 2</string>
</attribute>
</widget>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGraphicsView" name="graphicsView"/>
</item>
</layout>
</item>
<item row="2" column="0">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:700;&quot;&gt;Button configuration: &lt;/span&gt;Right-click on each button to configure it.&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;Top selection is command to send when button is pressed and bottom is (optional) command to send when button is released.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
@ -51,20 +55,6 @@
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="backupButton">
<property name="text">
<string>Backup</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="restoreButton">
<property name="text">
<string>Restore</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">

Wyświetl plik

@ -1,8 +1,6 @@
#include "cwsender.h"
#include "ui_cwsender.h"
#include "logcategories.h"
cwSender::cwSender(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::cwSender)
@ -17,86 +15,37 @@ cwSender::cwSender(QWidget *parent) :
ui->textToSendEdit->setFocus();
ui->statusbar->setToolTipDuration(3000);
this->setToolTipDuration(3000);
connect(ui->textToSendEdit->lineEdit(), &QLineEdit::textEdited, this, &cwSender::textChanged);
}
cwSender::~cwSender()
{
qDebug(logCW()) << "Running CW Sender destructor.";
if (toneThread != Q_NULLPTR) {
toneThread->quit();
toneThread->wait();
toneThread = Q_NULLPTR;
tone = Q_NULLPTR;
/* Finally disconnect all connections */
for (auto conn: connections)
{
disconnect(conn);
}
connections.clear();
}
delete ui;
}
void cwSender::showEvent(QShowEvent *event)
{
(void)event;
emit getCWSettings();
QMainWindow::showEvent(event);
(void)event;
}
void cwSender::handleKeySpeed(unsigned char wpm)
{
if (wpm != ui->wpmSpin->value() && (wpm >= ui->wpmSpin->minimum()) && (wpm <= ui->wpmSpin->maximum()))
//qDebug(logCW()) << "Told that current WPM is" << wpm;
if((wpm >= 6) && (wpm <=48))
{
//qDebug(logCW()) << "Setting WPM UI control to" << wpm;
ui->wpmSpin->blockSignals(true);
QMetaObject::invokeMethod(ui->wpmSpin, "setValue", Qt::QueuedConnection, Q_ARG(int, wpm));
ui->wpmSpin->setValue(wpm);
ui->wpmSpin->blockSignals(false);
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QMetaObject::invokeMethod(tone, [=]() {
tone->setSpeed(wpm);
}, Qt::QueuedConnection);
#else
emit setKeySpeed(ratio);
#endif
}
}
void cwSender::handleDashRatio(unsigned char ratio)
{
double calc = double(ratio/10);
if (calc != ui->dashSpin->value() && (calc >= ui->dashSpin->minimum()) && (ratio <= ui->dashSpin->maximum()))
{
ui->dashSpin->blockSignals(true);
QMetaObject::invokeMethod(ui->dashSpin, "setValue", Qt::QueuedConnection, Q_ARG(double, calc));
ui->dashSpin->blockSignals(false);
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QMetaObject::invokeMethod(tone, [=]() {
tone->setRatio(ratio);
}, Qt::QueuedConnection);
#else
emit setDashRatio(ratio);
#endif
}
}
void cwSender::handlePitch(unsigned char pitch) {
int cwPitch = round((((600.0 / 255.0) * pitch) + 300) / 5.0) * 5.0;
if (cwPitch != ui->pitchSpin->value() && cwPitch >= ui->pitchSpin->minimum() && cwPitch <= ui->pitchSpin->maximum())
{
ui->pitchSpin->blockSignals(true);
QMetaObject::invokeMethod(ui->pitchSpin, "setValue", Qt::QueuedConnection, Q_ARG(int, cwPitch));
ui->pitchSpin->blockSignals(false);
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QMetaObject::invokeMethod(tone, [=]() {
tone->setFrequency(pitch);
}, Qt::QueuedConnection);
#else
emit setPitch(tone);
#endif
}
quint16 cwPitch = round((((600.0 / 255.0) * pitch) + 300) / 5.0) * 5.0;
ui->pitchSpin->blockSignals(true);
ui->pitchSpin->setValue(cwPitch);
ui->pitchSpin->blockSignals(false);
}
void cwSender::handleBreakInMode(unsigned char b)
@ -119,56 +68,24 @@ void cwSender::handleCurrentModeUpdate(mode_kind mode)
}
}
void cwSender::textChanged(QString text)
{
if (ui->sendImmediateChk->isChecked() && text.size() && text.back() == ' ')
{
int toSend = text.mid(0, 30).size();
if (toSend > 0) {
ui->textToSendEdit->clearEditText();
ui->transcriptText->moveCursor(QTextCursor::End);
ui->transcriptText->insertPlainText(text.mid(0, 30).toUpper());
ui->transcriptText->moveCursor(QTextCursor::End);
emit sendCW(text.mid(0, 30));
}
if( (currentMode != modeCW) && (currentMode != modeCW_R) )
{
ui->statusbar->showMessage("Note: Mode needs to be set to CW or CW-R to send CW.", 3000);
}
}
}
void cwSender::on_sendBtn_clicked()
{
if( (ui->textToSendEdit->currentText().length() > 0) &&
(ui->textToSendEdit->currentText().length() <= 30) )
{
QString text = ui->textToSendEdit->currentText();
ui->transcriptText->moveCursor(QTextCursor::End);
ui->transcriptText->insertPlainText(ui->textToSendEdit->currentText().toUpper()+"\n");
ui->transcriptText->moveCursor(QTextCursor::End);
if (!ui->sendImmediateChk->isChecked())
{
ui->textToSendEdit->addItem(ui->textToSendEdit->currentText());
if (ui->textToSendEdit->count() > 5) {
ui->textToSendEdit->removeItem(0);
}
ui->textToSendEdit->setCurrentIndex(-1);
} else {
ui->textToSendEdit->clearEditText();
ui->textToSendEdit->clear();
emit sendCW(ui->textToSendEdit->currentText());
ui->transcriptText->appendPlainText(ui->textToSendEdit->currentText());
ui->textToSendEdit->addItem(ui->textToSendEdit->currentText());
if (ui->textToSendEdit->count() > 5) {
ui->textToSendEdit->removeItem(0);
}
ui->textToSendEdit->setCurrentIndex(-1);
ui->textToSendEdit->setFocus();
ui->statusbar->showMessage("Sending CW", 3000);
emit sendCW(text);
}
if( (currentMode != modeCW) && (currentMode != modeCW_R) )
if( (currentMode==modeCW) || (currentMode==modeCW_R) )
{
} else {
ui->statusbar->showMessage("Note: Mode needs to be set to CW or CW-R to send CW.", 3000);
}
}
@ -197,16 +114,12 @@ void cwSender::on_wpmSpin_valueChanged(int wpm)
emit setKeySpeed((unsigned char)wpm);
}
void cwSender::on_dashSpin_valueChanged(double ratio)
{
emit setDashRatio((unsigned char)double(ratio * 10));
}
void cwSender::on_pitchSpin_valueChanged(int arg1)
{
// quint16 cwPitch = round((((600.0 / 255.0) * pitch) + 300) / 5.0) * 5.0;
unsigned char pitch = 0;
pitch = ceil((arg1 - 300) * (255.0 / 600.0));
qDebug() << "Setting pitch" << pitch;
emit setPitch(pitch);
}
@ -260,56 +173,6 @@ void cwSender::on_macro10btn_clicked()
processMacroButton(10, ui->macro10btn);
}
void cwSender::on_sidetoneEnableChk_clicked(bool clicked)
{
ui->sidetoneLevelSlider->setEnabled(clicked);
if (clicked && toneThread == Q_NULLPTR)
{
toneThread = new QThread(this);
toneThread->setObjectName("sidetone()");
tone = new cwSidetone(sidetoneLevel, ui->wpmSpin->value(),ui->pitchSpin->value(),ui->dashSpin->value(),this);
tone->moveToThread(toneThread);
toneThread->start();
connections.append(connect(toneThread, &QThread::finished,
[=]() { tone->deleteLater(); }));
connections.append(connect(this, &cwSender::sendCW,
[=](const QString& text) { tone->send(text); ui->sidetoneEnableChk->setEnabled(false); }));
connections.append(connect(this, &cwSender::setKeySpeed,
[=](const unsigned char& wpm) { tone->setSpeed(wpm); }));
connections.append(connect(this, &cwSender::setDashRatio,
[=](const unsigned char& ratio) { tone->setRatio(ratio); }));
connections.append(connect(this, &cwSender::setPitch,
[=](const unsigned char& pitch) { tone->setFrequency(pitch); }));
connections.append(connect(this, &cwSender::setLevel,
[=](const unsigned char& level) { tone->setLevel(level); }));
connections.append(connect(this, &cwSender::stopCW,
[=]() { tone->stopSending(); }));
connections.append(connect(tone, &cwSidetone::finished,
[=]() { ui->sidetoneEnableChk->setEnabled(true); }));
} else if (!clicked && toneThread != Q_NULLPTR) {
/* disconnect all connections */
toneThread->quit();
toneThread->wait();
toneThread = Q_NULLPTR;
tone = Q_NULLPTR;
for (auto conn: connections)
{
disconnect(conn);
}
connections.clear();
}
}
void cwSender::on_sidetoneLevelSlider_valueChanged(int val)
{
sidetoneLevel = val;
emit setLevel(val);
}
void cwSender::processMacroButton(int buttonNumber, QPushButton *btn)
{
if(ui->macroEditChk->isChecked())
@ -326,33 +189,19 @@ void cwSender::runMacroButton(int buttonNumber)
if(macroText[buttonNumber].isEmpty())
return;
QString outText;
if(macroText[buttonNumber].contains("%1"))
if(macroText[buttonNumber].contains("\%1"))
{
outText = macroText[buttonNumber].arg(sequenceNumber, 3, 10, QChar('0'));
sequenceNumber++;
ui->sequenceSpin->blockSignals(true);
QMetaObject::invokeMethod(ui->sequenceSpin, "setValue", Qt::QueuedConnection, Q_ARG(int, sequenceNumber));
ui->sequenceSpin->setValue(sequenceNumber);
ui->sequenceSpin->blockSignals(false);
} else {
outText = macroText[buttonNumber];
}
if (ui->cutNumbersChk->isChecked())
{
outText.replace("0", "T");
outText.replace("9", "N");
}
ui->transcriptText->moveCursor(QTextCursor::End);
ui->transcriptText->insertPlainText(outText.toUpper()+"\n");
ui->transcriptText->moveCursor(QTextCursor::End);
for (int i = 0; i < outText.size(); i = i + 30) {
emit sendCW(outText.mid(i,30));
}
emit sendCW(outText);
ui->transcriptText->appendPlainText(outText);
ui->textToSendEdit->setFocus();
if( (currentMode==modeCW) || (currentMode==modeCW_R) )
{
@ -366,22 +215,22 @@ void cwSender::editMacroButton(int buttonNumber, QPushButton* btn)
{
bool ok;
QString promptFirst = QString("Please enter the text for macro %1,\n"
"up to 60 characters.\n").arg(buttonNumber);
QString promptSecond = QString("You may use \"%1\" to insert a sequence number.");
"up to 30 characters.\n").arg(buttonNumber);
QString promptSecond = QString("You may use \"\%1\" to insert a sequence number.");
QString prompt = promptFirst+promptSecond;
QString newMacroText = QInputDialog::getText(this, "Macro Edit",
prompt,
QLineEdit::Normal, macroText[buttonNumber], &ok).toUpper();
QLineEdit::Normal, macroText[buttonNumber], &ok);
if(!ok)
return;
if (newMacroText.length() > 60)
if(newMacroText.length() > 30)
{
QMessageBox msgBox;
msgBox.setText(QString("The text entered was too long \n"
"(max length is 60 characters).\n"
"Your input was %1 characters.").arg(newMacroText.length()));
"(max length is 30 characters).\n"
"Your input was %1 characters.").arg(newMacroText.length()));
msgBox.exec();
this->raise();
return;
@ -415,47 +264,6 @@ void cwSender::on_sequenceSpin_valueChanged(int newSeq)
ui->textToSendEdit->setFocus();
}
bool cwSender::getCutNumbers()
{
return ui->cutNumbersChk->isChecked();
}
bool cwSender::getSendImmediate()
{
return ui->sendImmediateChk->isChecked();
}
bool cwSender::getSidetoneEnable()
{
return ui->sidetoneEnableChk->isChecked();
}
int cwSender::getSidetoneLevel()
{
return ui->sidetoneLevelSlider->value();
}
void cwSender::setCutNumbers(bool val)
{
ui->cutNumbersChk->setChecked(val);
}
void cwSender::setSendImmediate(bool val)
{
ui->sendImmediateChk->setChecked(val);
}
void cwSender::setSidetoneEnable(bool val)
{
ui->sidetoneEnableChk->setChecked(val);
on_sidetoneEnableChk_clicked(val);
}
void cwSender::setSidetoneLevel(int val)
{
QMetaObject::invokeMethod(ui->sidetoneLevelSlider, "setValue", Qt::QueuedConnection, Q_ARG(int, val));
}
QStringList cwSender::getMacroText()
{
// This is for preference saving:

Wyświetl plik

@ -6,11 +6,11 @@
#include <QFont>
#include <QInputDialog>
#include <QMessageBox>
#include <QThread>
#include <QList>
#include <math.h>
#include "cwsidetone.h"
#include "wfviewtypes.h"
#include "logcategories.h"
namespace Ui {
class cwSender;
@ -25,32 +25,16 @@ public:
~cwSender();
QStringList getMacroText();
void setMacroText(QStringList macros);
void setCutNumbers(bool val);
void setSendImmediate(bool val);
void setSidetoneEnable(bool val);
void setSidetoneLevel(int val);
bool getCutNumbers();
bool getSendImmediate();
bool getSidetoneEnable();
int getSidetoneLevel();
signals:
void sendCW(QString cwMessage);
void stopCW();
void setKeySpeed(unsigned char wpm);
void setDashRatio(unsigned char ratio);
void setPitch(unsigned char pitch);
void setLevel(int level);
void setBreakInMode(unsigned char b);
void getCWSettings();
void sidetone(QString text);
void pitchChanged(int val);
void dashChanged(int val);
void wpmChanged(int val);
public slots:
void handleKeySpeed(unsigned char wpm);
void handleDashRatio(unsigned char ratio);
void handlePitch(unsigned char pitch);
void handleBreakInMode(unsigned char b);
void handleCurrentModeUpdate(mode_kind mode);
@ -63,14 +47,10 @@ private slots:
//void on_textToSendEdit_returnPressed();
void textChanged(QString text);
void on_breakinCombo_activated(int index);
void on_wpmSpin_valueChanged(int arg1);
void on_dashSpin_valueChanged(double arg1);
void on_pitchSpin_valueChanged(int arg1);
void on_macro1btn_clicked();
@ -95,25 +75,15 @@ private slots:
void on_sequenceSpin_valueChanged(int arg1);
void on_sidetoneEnableChk_clicked(bool clicked);
void on_sidetoneLevelSlider_valueChanged(int val);
private:
Ui::cwSender *ui;
QString macroText[11];
int sequenceNumber = 1;
int lastSentPos = 0;
mode_kind currentMode;
int sidetoneLevel=0;
void processMacroButton(int buttonNumber, QPushButton *btn);
void runMacroButton(int buttonNumber);
void editMacroButton(int buttonNumber, QPushButton *btn);
void setMacroButtonText(QString btnText, QPushButton *btn);
cwSidetone* tone=Q_NULLPTR;
QThread* toneThread = Q_NULLPTR;
bool sidetoneWasEnabled=false;
QList<QMetaObject::Connection> connections;
};
#endif // CWSENDER_H

Wyświetl plik

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>835</width>
<width>886</width>
<height>451</height>
</rect>
</property>
@ -177,140 +177,7 @@
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="stopBtn">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="toolTip">
<string>Stop sending CW</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Local Sidetone Level</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="sidetoneLevelSlider">
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="sidetoneEnableChk">
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="sendBtn">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Send</string>
</property>
<property name="shortcut">
<string>Return</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="textToSendEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Type here to send text as CW</string>
</property>
<property name="inputMethodHints">
<set>Qt::ImhUppercaseOnly</set>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="currentText">
<string notr="true"/>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="3" colspan="2">
<item row="1" column="3">
<layout class="QGridLayout" name="gridLayout_3">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
@ -343,20 +210,42 @@
</item>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_4">
<item row="1" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>PITCH (Hz):</string>
<string>WPM:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label">
<item row="3" column="1">
<widget class="QSpinBox" name="wpmSpin">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Set the Words Per Minute</string>
</property>
<property name="minimum">
<number>6</number>
</property>
<property name="maximum">
<number>48</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>WPM:</string>
<string>Break In</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -385,77 +274,99 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<item row="1" column="2">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Break In</string>
<string>PITCH (Hz):</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QDoubleSpinBox" name="dashSpin">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>2.800000000000000</double>
</property>
<property name="maximum">
<double>4.500000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>3.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_5">
</layout>
</item>
<item row="1" column="1">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="spacerLabel">
<property name="text">
<string>Dash Ratio</string>
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="wpmSpin">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="toolTip">
<string>Set the Words Per Minute</string>
<property name="topMargin">
<number>0</number>
</property>
<property name="minimum">
<number>6</number>
<property name="rightMargin">
<number>0</number>
</property>
<property name="maximum">
<number>48</number>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QCheckBox" name="cutNumbersChk">
<property name="text">
<string>Cut Num</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="sendImmediateChk">
<property name="text">
<string>Send Immed</string>
</property>
</widget>
<item>
<widget class="QPushButton" name="sendBtn">
<property name="text">
<string>Send</string>
</property>
<property name="shortcut">
<string>Return</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="stopBtn">
<property name="toolTip">
<string>Stop sending CW</string>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="textToSendEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Type here to send text as CW</string>
</property>
<property name="editable">
<bool>true</bool>
</property>
<property name="currentText">
<string notr="true"/>
</property>
<property name="insertPolicy">
<enum>QComboBox::InsertAtTop</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>

Wyświetl plik

@ -1,308 +0,0 @@
#include "cwsidetone.h"
#include "logcategories.h"
cwSidetone::cwSidetone(int level, int speed, int freq, double ratio, QWidget* parent) :
parent(parent),
volume(level),
speed(speed),
frequency(freq),
ratio(ratio)
{
/*
* Characters to match Icom table
* Unknown characters will return '?'
*/
cwTable.clear();
cwTable['0'] = "-----";
cwTable['1'] = ".----";
cwTable['2'] = "..---";
cwTable['3'] = "...--";
cwTable['4'] = "....-";
cwTable['5'] = ".....";
cwTable['6'] = "-....";
cwTable['7'] = "--...";
cwTable['8'] = "---..";
cwTable['9'] = "----.";
cwTable['A'] = ".-";
cwTable['B'] = "-...";
cwTable['C'] = "-.-.";
cwTable['D'] = "-..";
cwTable['E'] = ".";
cwTable['F'] = "..-.";
cwTable['G'] = "--.";
cwTable['H'] = "....";
cwTable['I'] = "..";
cwTable['J'] = ".---";
cwTable['K'] = "-.-";
cwTable['L'] = ".-..";
cwTable['M'] = "--";
cwTable['N'] = "-.";
cwTable['O'] = "---";
cwTable['P'] = ".--.";
cwTable['Q'] = "--.-";
cwTable['R'] = ".-.";
cwTable['S'] = "...";
cwTable['T'] = "-";
cwTable['U'] = "..-";
cwTable['V'] = "...-";
cwTable['W'] = ".--";
cwTable['X'] = "-..-";
cwTable['Y'] = "-.--";
cwTable['Z'] = "--..";
cwTable['/'] = "-..-.";
cwTable['?'] = "..--..";
cwTable['.'] = ".-.-.-";
cwTable['-'] = "-....-";
cwTable[','] = "--..--";
cwTable[':'] = "---...";
cwTable['\''] = ".----.";
cwTable['('] = "-.--.-";
cwTable[')'] = "-.--.-";
cwTable['='] = "-...-";
cwTable['+'] = ".-.-.";
cwTable['"'] = ".-..-.";
cwTable[' '] = " ";
init();
}
cwSidetone::~cwSidetone()
{
qInfo(logCW()) << "cwSidetone() finished";
this->stop();
output->stop();
}
void cwSidetone::init()
{
format.setSampleRate(44100);
format.setChannelCount(1);
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
format.setCodec("audio/pcm");
format.setSampleSize(16);
format.setByteOrder(QAudioFormat::LittleEndian);
format.setSampleType(QAudioFormat::SignedInt);
QAudioDeviceInfo device(QAudioDeviceInfo::defaultOutputDevice());
#else
format.setSampleFormat(QAudioFormat::Int16);
QAudioDevice device = QMediaDevices::defaultAudioOutput();
#endif
if (!device.isNull()) {
if (!device.isFormatSupported(format)) {
qWarning(logCW()) << "Default format not supported, using preferred";
format = device.preferredFormat();
}
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
output.reset(new QAudioOutput(device,format));
#else
output.reset(new QAudioSink(device,format));
#endif
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
qInfo(logCW()) << QString("Sidetone Output: %0 (volume: %1 rate: %2 size: %3 type: %4)")
.arg(device.deviceName()).arg(volume).arg(format.sampleRate()).arg(format.sampleSize()).arg(format.sampleType());
#else
qInfo(logCW()) << QString("Sidetone Output: %0 (volume: %1 rate: %2 type: %3")
.arg(device.description()).arg(volume).arg(format.sampleRate()).arg(format.sampleFormat());
#endif
}
this->start(); // Start QIODevice
}
void cwSidetone::send(QString text)
{
text=text.simplified();
for (int pos=0; pos < text.size(); pos++)
{
QChar ch = text.at(pos).toUpper();
QString currentChar;
if (ch == NULL)
{
currentChar = cwTable[' '];
}
else if (this->cwTable.contains(ch))
{
currentChar = cwTable[ch];
}
else
{
currentChar=cwTable['?'];
}
generateMorse(currentChar);
}
if (output->state() == QAudio::StoppedState)
{
output->start(this);
}
else if (output->state() == QAudio::IdleState) {
output->suspend();
output->resume();
}
return;
}
void cwSidetone::start()
{
open(QIODevice::ReadOnly);
}
void cwSidetone::stop()
{
close();
}
qint64 cwSidetone::readData(char *data, qint64 len)
{
QMutexLocker locker(&mutex);
const qint64 total = qMin(((qint64)buffer.size()), len);
memcpy(data, buffer.constData(), total);
buffer.remove(0,total);
if (buffer.size() == 0) {
emit finished();
}
return total;
}
qint64 cwSidetone::writeData(const char *data, qint64 len)
{
Q_UNUSED(data);
Q_UNUSED(len);
return 0;
}
qint64 cwSidetone::bytesAvailable() const
{
return buffer.size() + QIODevice::bytesAvailable();
}
void cwSidetone::generateMorse(QString morse)
{
int dit = int(double(SIDETONE_MULTIPLIER / this->speed * SIDETONE_MULTIPLIER));
int dah = int(double(dit * this->ratio));
QMutexLocker locker(&mutex);
for (int i=0;i<morse.size();i++)
{
QChar c = morse.at(i);
if (c == '-')
{
buffer.append(generateData(dah,this->frequency));
}
else if (c == '.')
{
buffer.append(generateData(dit,this->frequency));
}
else // Space char
{
buffer.append(generateData(dit,0));
}
if (i<morse.size()-1)
{
buffer.append(generateData(dit,0));
}
else
{
buffer.append(generateData(dit*3,0)); // inter-character space
}
}
return;
}
QByteArray cwSidetone::generateData(qint64 len, qint64 freq)
{
QByteArray data;
const int channels = format.channelCount();
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
const int channelBytes = format.sampleSize() / 8;
#else
const int channelBytes = format.bytesPerSample();
#endif
const int sampleRate = format.sampleRate();
//qint64 length = (sampleRate * channels * channelBytes) * len / 100000;
qint64 length = format.bytesForDuration(len);
const int sampleBytes = channels * channelBytes;
length -= length % sampleBytes;
Q_UNUSED(sampleBytes) // suppress warning in release builds
data.resize(length);
unsigned char *ptr = reinterpret_cast<unsigned char *>(data.data());
int sampleIndex = 0;
while (length) {
const qreal x = (qSin(2 * M_PI * freq * qreal(sampleIndex % sampleRate) / sampleRate)) * qreal(volume/100.0);
for (int i=0; i<channels; ++i) {
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
if (format.sampleSize() == 8 && format.sampleType() == QAudioFormat::UnSignedInt)
*reinterpret_cast<quint8 *>(ptr) = static_cast<quint8>((1.0 + x) / 2 * 255);
else if (format.sampleSize() == 16 && format.sampleType() == QAudioFormat::SignedInt)
*reinterpret_cast<qint16 *>(ptr) = static_cast<qint16>(x * std::numeric_limits<qint16>::max());
else if (format.sampleSize() == 32 && format.sampleType() == QAudioFormat::SignedInt)
*reinterpret_cast<qint32 *>(ptr) = static_cast<qint32>(x * std::numeric_limits<qint32>::max());
else if (format.sampleType() == QAudioFormat::Float)
*reinterpret_cast<float *>(ptr) = x;
else
qWarning(logCW()) << QString("Unsupported sample size: %0 type: %1").arg(format.sampleSize()).arg(format.sampleType());
#else
if (format.sampleFormat() == QAudioFormat::UInt8)
*reinterpret_cast<quint8 *>(ptr) = static_cast<quint8>((1.0 + x) / 2 * 255);
else if (format.sampleFormat() == QAudioFormat::Int16)
*reinterpret_cast<qint16 *>(ptr) = static_cast<qint16>(x * std::numeric_limits<qint16>::max());
else if (format.sampleFormat() == QAudioFormat::Int32)
*reinterpret_cast<qint32 *>(ptr) = static_cast<qint32>(x * std::numeric_limits<qint32>::max());
else if (format.sampleFormat() == QAudioFormat::Float)
*reinterpret_cast<float *>(ptr) = x;
else
qWarning(logCW()) << QString("Unsupported sample format: %0").arg(format.sampleFormat());
#endif
ptr += channelBytes;
length -= channelBytes;
}
++sampleIndex;
}
return data;
}
void cwSidetone::setSpeed(unsigned char speed)
{
this->speed = (int)speed;
}
void cwSidetone::setFrequency(unsigned char frequency)
{
this->frequency = round((((600.0 / 255.0) * frequency) + 300) / 5.0) * 5.0;
}
void cwSidetone::setRatio(unsigned char ratio)
{
this->ratio = (double)ratio/10.0;
}
void cwSidetone::setLevel(int level) {
volume = level;
}
void cwSidetone::stopSending() {
QMutexLocker locker(&mutex);
buffer.clear();
emit finished();
}

Wyświetl plik

@ -1,69 +0,0 @@
#ifndef CWSIDETONE_H
#define CWSIDETONE_H
#include <QApplication>
#include <QAudioOutput>
#include <QMap>
#include <QScopedPointer>
#include <QtMath>
#include <QMutex>
#include <QMutexLocker>
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
#include <QAudioDeviceInfo>
#include <QAudioOutput>
#else
#include <QAudioDevice>
#include <QAudioSink>
#include <QMediaDevices>
#endif
//#define SIDETONE_MULTIPLIER 386.0
#define SIDETONE_MULTIPLIER 1095.46
class cwSidetone : public QIODevice
{
Q_OBJECT
public:
explicit cwSidetone(int level, int speed, int freq, double ratio, QWidget *parent = 0);
~cwSidetone();
void start();
void stop();
qint64 readData(char *data, qint64 maxlen) override;
qint64 writeData(const char *data, qint64 len) override;
qint64 bytesAvailable() const override;
qint64 size() const override { return buffer.size(); }
signals:
void finished();
public slots:
void send(QString text);
void setSpeed(unsigned char speed);
void setFrequency(unsigned char frequency);
void setRatio(unsigned char ratio);
void setLevel(int level);
void stopSending();
private:
void init();
void generateMorse(QString morse);
QByteArray generateData(qint64 len, qint64 freq);
QByteArray buffer;
QMap< QChar, QString> cwTable;
QWidget* parent;
int volume;
int speed;
int frequency;
double ratio;
QAudioFormat format;
QMutex mutex;
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
QScopedPointer<QAudioOutput> output;
#else
QScopedPointer<QAudioSink> output;
#endif
};
#endif // CWSIDETONE_H

Wyświetl plik

@ -493,7 +493,7 @@ void meter::drawScalePo(QPainter *qp)
// Here, P is now 60 watts:
// Higher scale:
//i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178. **Not used?**
i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178.
//qDebug() << "meter i: " << i;
dnPerWatt = (213-143.0f) / 50.0f; // 1.4 dn per watt
// P=5 here.

Wyświetl plik

@ -177,12 +177,10 @@ typedef union token_packet {
union {
struct {
quint16 authstartid; // 0x20
char unusedg2[2]; // 0x22
quint16 resetcap; // 0x24
char unusedg1; // 0x26
char unusedg[5]; // 0x22
quint16 commoncap; // 0x27
char unusedh; // 0x29
quint8 macaddress[6]; // 0x2a
quint8 macaddress[6]; // 0x2a
};
quint8 guid[GUIDLEN]; // 0x20
};
@ -399,49 +397,6 @@ typedef union capabilities_packet {
} *capabilities_packet_t;
typedef union streamdeck_image_header {
struct
{
quint8 cmd;
quint8 suffix;
quint8 button;
quint8 isLast;
quint16 length;
quint16 index;
};
char packet[8];
} *streamdeck_image_header_t;
typedef union streamdeck_v1_image_header {
struct
{
quint8 cmd;
quint8 suffix;
quint16 index;
quint8 isLast;
quint8 button;
quint8 unused[10];
};
char packet[16];
} *streamdeck_v1_image_header_t;
typedef union streamdeck_lcd_header {
struct
{
quint8 cmd;
quint8 suffix;
quint16 x;
quint16 y;
quint16 width;
quint16 height;
quint8 isLast;
quint16 index;
quint16 length;
quint8 unused;
};
char packet[16];
} *streamdeck_lcd_header_t;
#pragma pack(pop)

10
prefs.h
Wyświetl plik

@ -2,10 +2,8 @@
#define PREFS_H
#include <QString>
#include <QColor>
#include <QMap>
#include "wfviewtypes.h"
#include "wfviewtypes.h"
struct preferences {
// Program:
@ -17,7 +15,6 @@ struct preferences {
// Interface:
bool useFullScreen;
bool useSystemTheme;
int wfEnable;
bool drawPeaks;
underlay_t underlayMode = underlayNone;
int underlayBufferSize = 64;
@ -65,9 +62,8 @@ struct preferences {
QString clusterTcpServerName;
QString clusterTcpUserName;
QString clusterTcpPassword;
int clusterTimeout;
bool clusterSkimmerSpotsEnable;
int clusterTimeout; // used?
bool clusterSkimmerSpotsEnable; // where is this used?
};
#endif // PREFS_H

Wyświetl plik

@ -445,7 +445,7 @@ void repeaterSetup::showEvent(QShowEvent *event)
emit getSplitModeEnabled();
if(rig.hasRepeaterModes)
emit getRptDuplexOffset();
QMainWindow::showEvent(event);
(void)event;
}
@ -688,7 +688,6 @@ void repeaterSetup::on_splitPlusButton_clicked()
txfreqhz = currentMainFrequency.Hz + hzOffset;
f.Hz = txfreqhz;
f.VFO = inactiveVFO;
f.MHzDouble = f.Hz/1E6;
txString = QString::number(f.Hz / double(1E6), 'f', 6);
ui->splitTransmitFreqEdit->setText(txString);
usedPlusSplit = true;
@ -708,7 +707,6 @@ void repeaterSetup::on_splitMinusBtn_clicked()
txfreqhz = currentMainFrequency.Hz - hzOffset;
f.Hz = txfreqhz;
f.VFO = inactiveVFO;
f.MHzDouble = f.Hz/1E6;
txString = QString::number(f.Hz / double(1E6), 'f', 6);
ui->splitTransmitFreqEdit->setText(txString);
usedPlusSplit = false;
@ -725,7 +723,6 @@ void repeaterSetup::on_splitTxFreqSetBtn_clicked()
{
f.Hz = fHz;
f.VFO = inactiveVFO;
f.MHzDouble = f.Hz/1E6;
emit setTransmitFrequency(f);
emit setTransmitMode(modeTransmitVFO);
}
@ -815,8 +812,6 @@ void repeaterSetup::on_rptrOffsetSetBtn_clicked()
{
freqt f;
f.Hz = getFreqHzFromMHzString(ui->rptrOffsetEdit->text());
f.MHzDouble = f.Hz/1E6;
f.VFO=activeVFO;
if(f.Hz != 0)
{
emit setRptDuplexOffset(f);

Wyświetl plik

@ -710,7 +710,7 @@ static int update_filter(SpeexResamplerState* st)
/* Adding buffer_size to filt_len won't overflow here because filt_len
could be multiplied by sizeof(spx_word16_t) above. */
min_alloc_size = st->filt_len - 1 + st->buffer_size;
if (min_alloc_size > st->mem_alloc_size && st->nb_channels>0)
if (min_alloc_size > st->mem_alloc_size)
{
spx_word16_t* mem;
if (INT_MAX / sizeof(spx_word16_t) / st->nb_channels < min_alloc_size)

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 321 KiB

Wyświetl plik

@ -1,11 +1,10 @@
#!/bin/bash
echo "This script copies the following items into your system:"
echo ""
echo "icon: unix_icons/wfview.png to /usr/share/icons/hicolor/256x256/apps/"
echo "icon: wfview.png to /usr/share/pixmaps/"
echo "wfview application to /usr/local/bin/"
echo "wfview.desktop to /usr/share/applications/"
echo "org.wfview.wfview.metainfo.xml metadata file to /usr/share/metainfo/"
echo "qdarkstyle stylesheet to /usr/share/wfview/stylesheets/"
echo "qdarkstyle stylesheet to /usr/share/wfview/stylesheets"
echo ""
echo "This script MUST be run from the build directory. Do not run it from the source directory!"
@ -31,8 +30,7 @@ echo ""
cp wfview /usr/local/bin/wfview
cp wfview.desktop /usr/share/applications/
cp unix_icons/wfview.png /usr/share/icons/hicolor/256x256/apps/
cp org.wfview.wfview.metainfo.xml /usr/share/metainfo/
cp wfview.png /usr/share/pixmaps/
mkdir -p /usr/share/wfview/stylesheets
cp -r qdarkstyle /usr/share/wfview/stylesheets/

Wyświetl plik

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>org.wfview.wfview</id>
<launchable type="desktop-id">wfview.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<name>wfview</name>
<developer_name>Elliott H. Liggett</developer_name>
<summary>Open Source interface for Icom transceivers</summary>
<description>
<p>
wfview is a program developed by amateur radio enthusiasts to control modern Icom ham radios. It provides the user with controls
that may be comfortably operated from a keyboard, mouse, or touch screen interface. wfview is free and open source software.
</p>
<p>
wfview has been developed with an eye towards compatibility. Even though our target platform consists of modern-era transceivers,
wfviews command dictionary is focused on commands with the most compatibility. Many of Icoms transceivers from the last 20 years
will work to some degree with wfview, and we are always adding more.
</p>
</description>
<screenshots>
<screenshot type="default">
<image type="source">https://wfview.org/wp-content/uploads/2021/11/7300-remote-screenshot.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://wfview.org</url>
<url type="bugtracker">https://gitlab.com/eliggett/wfview/-/issues</url>
<content_rating type="oars-1.1"/>
</component>

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 113 KiB

Wyświetl plik

@ -4,13 +4,6 @@
<file>shuttlexpress.png</file>
<file>shuttlepro.png</file>
<file>rc28.png</file>
<file>ecoder.png</file>
<file>quickkeys.png</file>
<file>xbox.png</file>
<file>streamdeck.png</file>
<file>streamdeckmini.png</file>
<file>streamdeckxl.png</file>
<file>streamdeckpedal.png</file>
<file>streamdeckplus.png</file>
</qresource>
</RCC>

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 179 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 331 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 396 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 217 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 412 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 53 KiB

Wyświetl plik

@ -18,7 +18,5 @@
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
</dict>
</plist>

Wyświetl plik

@ -872,18 +872,6 @@ void rigCommander::setDataMode(bool dataOn, unsigned char filter)
prepDataAndSend(payload);
}
void rigCommander::getFrequency(unsigned char vfo)
{
if (rigCaps.hasVFOAB || rigCaps.hasVFOMS)
{
QByteArray payload("\x25");
payload.append(vfo);
prepDataAndSend(payload);
} else {
getFrequency();
}
}
void rigCommander::getFrequency()
{
// figure out frequency and then respond with haveFrequency();
@ -1026,72 +1014,6 @@ void rigCommander::setCwPitch(unsigned char pitch)
prepDataAndSend(payload);
}
void rigCommander::getDashRatio()
{
QByteArray payload;
switch (rigCaps.model)
{
case model705:
payload.setRawData("\x1A\x05\x02\x52", 4);
break;
case model9700:
payload.setRawData("\x1A\x05\x02\x24", 4);
break;
case model7100:
payload.setRawData("\x1A\x05\x01\x35", 4);
break;
case model7300:
payload.setRawData("\x1A\x05\x01\x61", 4);
break;
case model7610:
payload.setRawData("\x1A\x05\x02\x28", 4);
break;
case model7700:
payload.setRawData("\x1A\x05\x01\x34", 4);
break;
case model7850:
payload.setRawData("\x1A\x05\x02\x51", 4);
break;
default:
break;
}
prepDataAndSend(payload);
}
void rigCommander::setDashRatio(unsigned char ratio)
{
QByteArray payload;
switch (rigCaps.model)
{
case model705:
payload.setRawData("\x1A\x05\x02\x52", 4);
break;
case model9700:
payload.setRawData("\x1A\x05\x02\x24", 4);
break;
case model7100:
payload.setRawData("\x1A\x05\x01\x35", 4);
break;
case model7300:
payload.setRawData("\x1A\x05\x01\x61", 4);
break;
case model7610:
payload.setRawData("\x1A\x05\x02\x28", 4);
break;
case model7700:
payload.setRawData("\x1A\x05\x01\x34", 4);
break;
case model7850:
payload.setRawData("\x1A\x05\x02\x51", 4);
break;
default:
break;
}
payload.append(bcdEncodeInt(ratio).at(1)); // Discard first byte
prepDataAndSend(payload);
}
void rigCommander::getPskTone()
{
QByteArray payload;
@ -1687,9 +1609,11 @@ void rigCommander::parseCommand()
parseFrequency();
break;
case '\x25':
// Parse both VFOs
emit haveFrequency(parseFrequency(payloadIn, 5));
break;
if((int)payloadIn[1] == 0)
{
emit haveFrequency(parseFrequency(payloadIn, 5));
}
break;
case '\x01':
//qInfo(logRig()) << "Have mode data";
this->parseMode();
@ -1854,11 +1778,6 @@ void rigCommander::parseLevels()
emit haveTPBFOuter(level);
state.set(PBTOUT, level, false);
break;
case '\x06':
// NR Level
emit haveNRLevel(level);
state.set(NR, level, false);
break;
case '\x09':
// CW Pitch
emit haveCwPitch(level);
@ -1877,7 +1796,7 @@ void rigCommander::parseLevels()
case '\x0C':
state.set(KEYSPD, level, false);
//qInfo(logRig()) << "Have received key speed in RC, raw level: " << level << ", WPM: " << (level/6.071)+6 << ", rounded: " << round((level/6.071)+6);
emit haveKeySpeed(round((level / 6.071) + 6));
emit haveKeySpeed(round((level/6.071)+6));
break;
case '\x0D':
// Notch filder setting - ignore for now
@ -1889,12 +1808,12 @@ void rigCommander::parseLevels()
state.set(COMPLEVEL, level, false);
break;
case '\x12':
emit haveNB((bool)level);
// NB level - ignore for now
state.set(NB, level, false);
break;
case '\x15':
// monitor level
emit haveMonitorGain(level);
emit haveMonitorLevel(level);
state.set(MONITORLEVEL, level, false);
break;
case '\x16':
@ -2414,9 +2333,9 @@ void rigCommander::setCompLevel(unsigned char compLevel)
prepDataAndSend(payload);
}
void rigCommander::setMonitorGain(unsigned char monitorLevel)
void rigCommander::setMonitorLevel(unsigned char monitorLevel)
{
QByteArray payload("\x14\x15");
QByteArray payload("\x14\x0E");
payload.append(bcdEncodeInt(monitorLevel));
prepDataAndSend(payload);
}
@ -2435,22 +2354,6 @@ void rigCommander::setAntiVoxGain(unsigned char gain)
prepDataAndSend(payload);
}
void rigCommander::setNBLevel(unsigned char level)
{
if (rigCaps.hasNB) {
QByteArray payload(rigCaps.nbCommand);
payload.append(bcdEncodeInt(level));
prepDataAndSend(payload);
}
}
void rigCommander::setNRLevel(unsigned char level)
{
QByteArray payload("\x14\x06");
payload.append(bcdEncodeInt(level));
prepDataAndSend(payload);
}
void rigCommander::getRfGain()
{
@ -2460,13 +2363,8 @@ void rigCommander::getRfGain()
void rigCommander::getAfGain()
{
if (udp == Q_NULLPTR) {
QByteArray payload("\x14\x01");
prepDataAndSend(payload);
}
else {
emit haveAfGain(localVolume);
}
QByteArray payload("\x14\x01");
prepDataAndSend(payload);
}
void rigCommander::getIFShift()
@ -2511,7 +2409,7 @@ void rigCommander::getCompLevel()
prepDataAndSend(payload);
}
void rigCommander::getMonitorGain()
void rigCommander::getMonitorLevel()
{
QByteArray payload("\x14\x15");
prepDataAndSend(payload);
@ -2529,19 +2427,6 @@ void rigCommander::getAntiVoxGain()
prepDataAndSend(payload);
}
void rigCommander::getNBLevel()
{
if (rigCaps.hasNB) {
prepDataAndSend(rigCaps.nbCommand);
}
}
void rigCommander::getNRLevel()
{
QByteArray payload("\x14\x06");
prepDataAndSend(payload);
}
void rigCommander::getLevels()
{
// Function to grab all levels
@ -2551,7 +2436,7 @@ void rigCommander::getLevels()
getTxLevel(); // 0x0A
getMicGain(); // 0x0B
getCompLevel(); // 0x0E
// getMonitorGain(); // 0x15
// getMonitorLevel(); // 0x15
// getVoxGain(); // 0x16
// getAntiVoxGain(); // 0x17
}
@ -3075,11 +2960,9 @@ void rigCommander::parseRegister16()
state.set(PREAMP, (quint8)payloadIn.at(2), false);
break;
case '\x22':
emit haveNB(payloadIn.at(2) != 0);
state.set(NBFUNC, payloadIn.at(2) != 0, false);
break;
case '\x40':
emit haveNR(payloadIn.at(2) != 0);
state.set(NRFUNC, payloadIn.at(2) != 0, false);
break;
case '\x41': // Auto notch
@ -3106,15 +2989,12 @@ void rigCommander::parseRegister16()
emit haveRptAccessMode(ra);
break;
case '\x44':
emit haveComp(payloadIn.at(2) != 0);
state.set(COMPFUNC, payloadIn.at(2) != 0, false);
break;
case '\x45':
emit haveMonitor(payloadIn.at(2) != 0);
state.set(MONFUNC, payloadIn.at(2) != 0, false);
break;
case '\x46':
emit haveVox(payloadIn.at(2) != 0);
state.set(VOXFUNC, payloadIn.at(2) != 0, false);
break;
case '\x47':
@ -3158,10 +3038,6 @@ void rigCommander::parseBandStackReg()
freqt freqs = parseFrequency(payloadIn, 7);
//float freq = (float)freqs.MHzDouble;
// The Band Stacking command returns the regCode in the position that VFO is expected.
// As BSR is always on the active VFO, just set that.
freqs.VFO = selVFO_t::activeVFO;
bool dataOn = (payloadIn[11] & 0x10) >> 4; // not sure...
char mode = payloadIn[9];
char filter = payloadIn[10];
@ -3322,8 +3198,6 @@ void rigCommander::parseDetailedRegisters1A05()
case 90:
emit haveLANGain(level);
break;
case 228:
emit haveDashRatio(inputRaw);
default:
break;
}
@ -3542,10 +3416,6 @@ void rigCommander::determineRigCaps()
bandType bandDef4m = bandType(band4m, 70000000, 70500000, modeUSB);
bandType bandDef70cm = bandType(band70cm, 420000000, 450000000, modeUSB);
bandType bandDef23cm = bandType(band23cm, 1240000000, 1400000000, modeUSB);
bandType bandDef13cm = bandType(band13cm, 2300000000, 2450000000, modeUSB);
//bandType bandDef9cm = bandType(band9cm, 3300000000, 3500000000, modeUSB);
bandType bandDef6cm = bandType(band6cm, 5650000000, 5925000000, modeUSB);
bandType bandDef3cm = bandType(band3cm, 10000000000, 10500000000, modeUSB);
bandType bandDefAir(bandAir, 108000000, 137000000, modeAM);
bandType bandDefWFM(bandWFM, 88000000, 108000000, modeWFM);
@ -3741,55 +3611,6 @@ void rigCommander::determineRigCaps()
rigCaps.hasQuickSplitCommand = true;
rigCaps.quickSplitCommand = QByteArrayLiteral("\x1a\x05\x00\x43");
break;
case model905:
rigCaps.modelName = QString("IC-905");
rigCaps.rigctlModel = 0;
rigCaps.hasSpectrum = true;
rigCaps.spectSeqMax = 11;
rigCaps.spectAmpMax = 160;
rigCaps.spectLenMax = 475;
rigCaps.inputs.append(inputLAN);
rigCaps.inputs.append(inputUSB);
rigCaps.hasLan = true;
rigCaps.hasEthernet = true;
rigCaps.hasWiFi = false;
rigCaps.hasDD = true;
rigCaps.hasDV = true;
rigCaps.hasCTCSS = true;
rigCaps.hasDTCS = true;
rigCaps.hasRepeaterModes = true;
rigCaps.hasTBPF = true;
rigCaps.attenuators.push_back('\x10');
rigCaps.preamps.push_back('\x01');
rigCaps.bands = standardVU;
rigCaps.bands.push_back(bandDef23cm);
rigCaps.bands.push_back(bandDef13cm);
rigCaps.bands.push_back(bandDef6cm);
rigCaps.bands.push_back(bandDef3cm);
rigCaps.bsr[band2m] = 0x01;
rigCaps.bsr[band70cm] = 0x02;
rigCaps.bsr[band23cm] = 0x03;
rigCaps.bsr[band13cm] = 0x04;
rigCaps.bsr[band6cm] = 0x05;
rigCaps.bsr[band3cm] = 0x06;
rigCaps.modes = commonModes;
rigCaps.modes.insert(rigCaps.modes.end(), {createMode(modeDV, 0x17, "DV"),
createMode(modeDD, 0x22, "DD"),
createMode(modeATV, 0x23, "ATV")
});
rigCaps.scopeCenterSpans.insert(rigCaps.scopeCenterSpans.end(), {createScopeCenter(cs1M, "±1M"),
createScopeCenter(cs2p5M, "±2.5M"),
createScopeCenter(cs5M, "±5M"),
createScopeCenter(cs10M, "±10M"),
createScopeCenter(cs25M, "±25M")});
rigCaps.transceiveCommand = QByteArrayLiteral("\x1a\x05\x01\x42");
rigCaps.hasVFOMS = false;
rigCaps.hasVFOAB = true;
rigCaps.hasAdvancedRptrToneCmds = true;
rigCaps.hasQuickSplitCommand = true;
rigCaps.quickSplitCommand = QByteArrayLiteral("\x1a\x05\x00\x46");
break;
case model910h:
rigCaps.modelName = QString("IC-910H");
rigCaps.rigctlModel = 3044;
@ -4702,7 +4523,6 @@ void rigCommander::parseFrequency()
// payloadIn[01] = ; // . XX KHz
// printHex(payloadIn, false, true);
frequencyMhz = 0.0;
if (payloadIn.length() == 7)
{
@ -4773,8 +4593,6 @@ freqt rigCommander::parseFrequencyRptOffset(QByteArray data)
f.Hz += (data[1] & 0x0f) * 100; // 100 Hz
f.Hz += ((data[1] & 0xf0) >> 4) * 1000; // 1 KHz
f.MHzDouble=f.Hz/1E6;
f.VFO = activeVFO;
return f;
}
@ -4794,25 +4612,40 @@ freqt rigCommander::parseFrequency(QByteArray data, unsigned char lastPosition)
// NOTE: This function was written on the IC-7300, which has no need for 100 MHz and 1 GHz.
// Therefore, this function has to go to position +1 to retrieve those numbers for the IC-9700.
// TODO: 64-bit value is incorrect, multiplying by wrong numbers.
float freq = 0.0;
freqt freqs;
freqs.MHzDouble = 0;
freqs.Hz = 0;
// Does Frequency contain 100 MHz/1 GHz data?
// MHz:
freq += 100*(data[lastPosition+1] & 0x0f);
freq += (1000*((data[lastPosition+1] & 0xf0) >> 4));
freq += data[lastPosition] & 0x0f;
freq += 10*((data[lastPosition] & 0xf0) >> 4);
freqs.Hz += (data[lastPosition] & 0x0f) * 1E6;
freqs.Hz += ((data[lastPosition] & 0xf0) >> 4) * 1E6 * 10; // 10 MHz
if(data.length() >= lastPosition+1)
{
freqs.Hz += (data[lastPosition+1] & 0x0f) * 1E6 * 100; // 100 MHz
freqs.Hz += ((data[lastPosition+1] & 0xf0) >> 4) * 1E6 * 1000; // 1000 MHz
}
// Does Frequency contain VFO data? (\x25 command)
if (lastPosition-4 >= 0 && (quint8)data[lastPosition-4] < 0x02)
{
freqs.VFO=(selVFO_t)(quint8)data[lastPosition-4];
}
freqs.Hz += (data[lastPosition] & 0x0f) * 1E6;
freqs.Hz += ((data[lastPosition] & 0xf0) >> 4) * 1E6 * 10; // 10 MHz
// Hz:
freq += ((data[lastPosition-1] & 0xf0) >>4)/10.0 ;
freq += (data[lastPosition-1] & 0x0f) / 100.0;
freq += ((data[lastPosition-2] & 0xf0) >> 4) / 1000.0;
freq += (data[lastPosition-2] & 0x0f) / 10000.0;
freq += ((data[lastPosition-3] & 0xf0) >> 4) / 100000.0;
freq += (data[lastPosition-3] & 0x0f) / 1000000.0;
freqs.Hz += (data[lastPosition-1] & 0x0f) * 10E3; // 10 KHz
freqs.Hz += ((data[lastPosition-1] & 0xf0) >> 4) * 100E3; // 100 KHz
@ -4993,26 +4826,26 @@ void rigCommander::setAntenna(unsigned char ant, bool rx)
prepDataAndSend(payload);
}
void rigCommander::setNB(bool enabled) {
void rigCommander::setNb(bool enabled) {
QByteArray payload("\x16\x22");
payload.append((unsigned char)enabled);
prepDataAndSend(payload);
}
void rigCommander::getNB()
void rigCommander::getNb()
{
QByteArray payload;
payload.setRawData("\x16\x22", 2);
prepDataAndSend(payload);
}
void rigCommander::setNR(bool enabled) {
void rigCommander::setNr(bool enabled) {
QByteArray payload("\x16\x40");
payload.append((unsigned char)enabled);
prepDataAndSend(payload);
}
void rigCommander::getNR()
void rigCommander::getNr()
{
QByteArray payload;
payload.setRawData("\x16\x40", 2);
@ -5388,9 +5221,9 @@ void rigCommander::stateUpdated()
break;
case MONITORLEVEL:
if (i.value()._valid) {
setMonitorGain(state.getChar(MONITORLEVEL));
setMonitorLevel(state.getChar(MONITORLEVEL));
}
getMonitorGain();
getMonitorLevel();
break;
case VOXGAIN:
if (i.value()._valid) {
@ -5406,15 +5239,15 @@ void rigCommander::stateUpdated()
break;
case NBFUNC:
if (i.value()._valid) {
setNB(state.getBool(NBFUNC));
setNb(state.getBool(NBFUNC));
}
getNB();
getNb();
break;
case NRFUNC:
if (i.value()._valid) {
setNR(state.getBool(NRFUNC));
setNr(state.getBool(NRFUNC));
}
getNR();
getNr();
break;
case ANFFUNC:
if (i.value()._valid) {
@ -5634,16 +5467,6 @@ void rigCommander::stateUpdated()
}
getDialLock();
break;
case ANN:
case APO:
case BACKLIGHT:
case BEEP:
case TIME:
case BAT:
case KEYLIGHT:
break;
}
}
++i;

Wyświetl plik

@ -70,7 +70,6 @@ public slots:
// Frequency, Mode, BSR:
void setFrequency(unsigned char vfo, freqt freq);
void getFrequency(unsigned char vfo);
void getFrequency();
void selectVFO(vfo_t vfo);
void equalizeVFOsAB();
@ -104,10 +103,10 @@ public slots:
void setAttenuator(unsigned char att);
void setPreamp(unsigned char pre);
void setAntenna(unsigned char ant, bool rx);
void setNB(bool enabled);
void getNB();
void setNR(bool enabled);
void getNR();
void setNb(bool enabled);
void getNb();
void setNr(bool enabled);
void getNr();
void setAutoNotch(bool enabled);
void getAutoNotch();
void setToneEnabled(bool enabled);
@ -128,11 +127,8 @@ public slots:
void getManualNotch();
void getPassband();
void getNBLevel();
void getNRLevel(); void getCwPitch();
void getCwPitch();
void setCwPitch(unsigned char pitch);
void getDashRatio();
void setDashRatio(unsigned char ratio);
void getPskTone();
void setPskTone(unsigned char tone);
void getRttyMark();
@ -168,7 +164,7 @@ public slots:
void getTxLevel();
void getMicGain();
void getCompLevel();
void getMonitorGain();
void getMonitorLevel();
void getVoxGain();
void getAntiVoxGain();
void getUSBGain();
@ -194,15 +190,13 @@ public slots:
void setACCGain(unsigned char gain);
void setACCGain(unsigned char gain, unsigned char ab);
void setCompLevel(unsigned char compLevel);
void setMonitorGain(unsigned char monitorLevel);
void setMonitorLevel(unsigned char monitorLevel);
void setVoxGain(unsigned char gain);
void setAntiVoxGain(unsigned char gain);
void setModInput(rigInput input, bool dataOn);
void setModInputLevel(rigInput input, unsigned char level);
void setAfMute(bool muteOn);
void setDialLock(bool lockOn);
void setNBLevel(unsigned char level);
void setNRLevel(unsigned char level);
// NB, NR, IP+:
void setIPP(bool enabled);
@ -334,16 +328,9 @@ signals:
void haveTxPower(unsigned char level);
void haveMicGain(unsigned char level);
void haveCompLevel(unsigned char level);
void haveMonitorGain(unsigned char level);
void haveMonitorLevel(unsigned char level);
void haveVoxGain(unsigned char gain);
void haveAntiVoxGain(unsigned char gain);
void haveNBLevel(unsigned char level);
void haveNRLevel(unsigned char level);
void haveVox(bool en);
void haveMonitor(bool en);
void haveComp(bool en);
void haveNB(bool en);
void haveNR(bool en);
// Modulation source and gain:
void haveModInput(rigInput input, bool isData);
@ -376,7 +363,6 @@ signals:
// CW:
void haveKeySpeed(unsigned char wpm);
void haveCWBreakMode(unsigned char bmode);
void haveDashRatio(unsigned char ratio);
// Rig State

Plik diff jest za duży Load Diff

Wyświetl plik

@ -360,7 +360,7 @@ signals:
void setMicGain(quint8);
void setCompLevel(quint8);
void setTxPower(quint8);
void setMonitorGain(quint8);
void setMonitorLevel(quint8);
void setVoxGain(quint8);
void setAntiVoxGain(quint8);
void setSpectrumRefLevel(int);
@ -403,9 +403,6 @@ private:
rigstate* rigState = Q_NULLPTR;
rigCtlD* parent;
bool chkVfoEecuted=false;
unsigned long crcTable[256];
unsigned long doCrc(unsigned char* p, size_t n);
void genCrc(unsigned long crcTable[]);
QString getMode(quint8 mode, bool datamode);
quint8 getMode(QString modeString);
QString getFilter(quint8 mode, quint8 filter);
@ -413,9 +410,6 @@ private:
quint64 getRadioModes(QString mode = "");
QString getAntName(quint8 ant);
quint8 antFromName(QString name);
quint8 vfoFromName(QString vfo);
QString getVfoName(quint8 vfo);
int getCalibratedValue(quint8 meter,cal_table_t cal);
};

Wyświetl plik

@ -40,7 +40,6 @@ enum model_kind {
model756pro = 0x5C,
model756proii = 0x64,
model756proiii = 0x6E,
model905 = 0xAC,
model910h = 0x60,
model9100 = 0x7C,
modelUnknown = 0xFF
@ -56,12 +55,7 @@ enum rigInput{ inputMic=0,
inputUnknown=0xff
};
enum availableBands {
band3cm = 0,
band6cm,
band9cm,
band13cm,
band23cm,
enum availableBands { band23cm=0,
band70cm,
band2m,
bandAir,
@ -93,10 +87,7 @@ enum centerSpansType {
cs250k = 6,
cs500k = 7,
cs1M = 8,
cs2p5M = 9,
cs5M = 10,
cs10M = 11,
cs25M = 12,
cs2p5M = 9
};
struct centerSpanData {
@ -105,14 +96,14 @@ struct centerSpanData {
};
struct bandType {
bandType(availableBands band, quint64 lowFreq, quint64 highFreq, mode_kind defaultMode) :
bandType(availableBands band, quint32 lowFreq, quint32 highFreq, mode_kind defaultMode) :
band(band), lowFreq(lowFreq), highFreq(highFreq), defaultMode(defaultMode) {}
bandType() {}
availableBands band;
quint64 lowFreq;
quint64 highFreq;
quint32 lowFreq;
quint32 highFreq;
mode_kind defaultMode;
};
@ -137,9 +128,6 @@ struct rigCapabilities {
quint16 spectAmpMax;
quint16 spectLenMax;
bool hasNB = false;
QByteArray nbCommand;
bool hasDD;
bool hasDV;
bool hasATU;
@ -173,7 +161,7 @@ struct rigCapabilities {
std::vector <unsigned char> antennas;
std::vector <centerSpanData> scopeCenterSpans;
std::vector <bandType> bands;
unsigned char bsr[24] = {0};
unsigned char bsr[20] = {0};
std::vector <mode_info> modes;

Wyświetl plik

@ -16,8 +16,7 @@ enum stateTypes { VFOAFREQ, VFOBFREQ, CURRENTVFO, PTT, MODE, FILTER, PASSBAND, D
PREAMP, AGC, ATTENUATOR, MODINPUT, AFGAIN, RFGAIN, SQUELCH, RFPOWER, MICGAIN, COMPLEVEL, MONITORLEVEL, BAL, KEYSPD,
VOXGAIN, ANTIVOXGAIN, CWPITCH, NOTCHF, IF, PBTIN, PBTOUT, APF, NR, NB, NBDEPTH, NBWIDTH, RIGINPUT, POWERONOFF, RITVALUE,
FAGCFUNC, NBFUNC, COMPFUNC, VOXFUNC, TONEFUNC, TSQLFUNC, SBKINFUNC, FBKINFUNC, ANFFUNC, NRFUNC, AIPFUNC, APFFUNC, MONFUNC, MNFUNC,RFFUNC,
AROFUNC, MUTEFUNC, VSCFUNC, REVFUNC, SQLFUNC, ABMFUNC, BCFUNC, MBCFUNC, RITFUNC, AFCFUNC, SATMODEFUNC, SCOPEFUNC,
ANN, APO, BACKLIGHT, BEEP, TIME, BAT, KEYLIGHT,
AROFUNC, MUTEFUNC, VSCFUNC, REVFUNC, SQLFUNC, ABMFUNC, BCFUNC, MBCFUNC, RITFUNC, AFCFUNC, SATMODEFUNC, SCOPEFUNC,
RESUMEFUNC, TBURSTFUNC, TUNERFUNC, LOCKFUNC, SMETER, POWERMETER, SWRMETER, ALCMETER, COMPMETER, VOLTAGEMETER, CURRENTMETER,
};

Wyświetl plik

@ -440,7 +440,6 @@ void servermain::setDefPrefs()
udpDefPrefs.username = QString("");
udpDefPrefs.password = QString("");
udpDefPrefs.clientName = QHostInfo::localHostName();
}
void servermain::loadSettings()

Wyświetl plik

@ -683,7 +683,6 @@ void udpHandler::sendToken(uint8_t magic)
p.requestreply = 0x01;
p.innerseq = qToBigEndian(authSeq++);
p.tokrequest = tokRequest;
p.resetcap = qToBigEndian((quint16)0x0798);
p.token = token;
sendTrackedPacket(QByteArray::fromRawData((const char *)p.packet, sizeof(p)));

Wyświetl plik

@ -382,32 +382,31 @@ void udpServer::controlReceived()
qCritical(logAudio()) << "Unsupported Transmit Audio Handler selected!";
}
if (radio->txaudio != Q_NULLPTR) {
radio->txAudioThread = new QThread(this);
radio->txAudioThread->setObjectName("txAudio()");
//radio->txaudio = new audioHandler();
radio->txAudioThread = new QThread(this);
radio->txAudioThread->setObjectName("txAudio()");
radio->txaudio->moveToThread(radio->txAudioThread);
radio->txaudio->moveToThread(radio->txAudioThread);
radio->txAudioThread->start(QThread::TimeCriticalPriority);
radio->txAudioThread->start(QThread::TimeCriticalPriority);
connect(this, SIGNAL(setupTxAudio(audioSetup)), radio->txaudio, SLOT(init(audioSetup)));
connect(radio->txAudioThread, SIGNAL(finished()), radio->txaudio, SLOT(deleteLater()));
connect(this, SIGNAL(setupTxAudio(audioSetup)), radio->txaudio, SLOT(init(audioSetup)));
connect(radio->txAudioThread, SIGNAL(finished()), radio->txaudio, SLOT(deleteLater()));
// Not sure how we make this work in QT5.9?
// Not sure how we make this work in QT5.9?
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QMetaObject::invokeMethod(radio->txaudio, [=]() {
radio->txaudio->init(radio->txAudioSetup);
}, Qt::QueuedConnection);
QMetaObject::invokeMethod(radio->txaudio, [=]() {
radio->txaudio->init(radio->txAudioSetup);
}, Qt::QueuedConnection);
#else
emit setupTxAudio(radio->txAudioSetup);
#warning "QT 5.9 is not fully supported multiple rigs will NOT work!"
emit setupTxAudio(radio->txAudioSetup);
#warning "QT 5.9 is not fully supported multiple rigs will NOT work!"
#endif
hasTxAudio = datagram.senderAddress();
hasTxAudio = datagram.senderAddress();
connect(this, SIGNAL(haveAudioData(audioPacket)), radio->txaudio, SLOT(incomingAudio(audioPacket)));
connect(this, SIGNAL(haveAudioData(audioPacket)), radio->txaudio, SLOT(incomingAudio(audioPacket)));
}
}
if ((!memcmp(radio->guid, current->guid, GUIDLEN) || config->rigs.size() == 1) && radio->rxaudio == Q_NULLPTR && !config->lan)
{
@ -432,30 +431,27 @@ void udpServer::controlReceived()
qCritical(logAudio()) << "Unsupported Receive Audio Handler selected!";
}
if (radio->rxaudio != Q_NULLPTR)
{
radio->rxAudioThread = new QThread(this);
radio->rxAudioThread->setObjectName("rxAudio()");
radio->rxAudioThread = new QThread(this);
radio->rxAudioThread->setObjectName("rxAudio()");
radio->rxaudio->moveToThread(radio->rxAudioThread);
radio->rxaudio->moveToThread(radio->rxAudioThread);
radio->rxAudioThread->start(QThread::TimeCriticalPriority);
radio->rxAudioThread->start(QThread::TimeCriticalPriority);
connect(radio->rxAudioThread, SIGNAL(finished()), radio->rxaudio, SLOT(deleteLater()));
connect(radio->rxaudio, SIGNAL(haveAudioData(audioPacket)), this, SLOT(receiveAudioData(audioPacket)));
connect(radio->rxAudioThread, SIGNAL(finished()), radio->rxaudio, SLOT(deleteLater()));
connect(radio->rxaudio, SIGNAL(haveAudioData(audioPacket)), this, SLOT(receiveAudioData(audioPacket)));
#if (QT_VERSION >= QT_VERSION_CHECK(5,10,0))
QMetaObject::invokeMethod(radio->rxaudio, [=]() {
radio->rxaudio->init(radio->rxAudioSetup);
}, Qt::QueuedConnection);
QMetaObject::invokeMethod(radio->rxaudio, [=]() {
radio->rxaudio->init(radio->rxAudioSetup);
}, Qt::QueuedConnection);
#else
//#warning "QT 5.9 is not fully supported multiple rigs will NOT work!"
connect(this, SIGNAL(setupRxAudio(audioSetup)), radio->rxaudio, SLOT(init(audioSetup)));
setupRxAudio(radio->rxAudioSetup);
//#warning "QT 5.9 is not fully supported multiple rigs will NOT work!"
connect(this, SIGNAL(setupRxAudio(audioSetup)), radio->rxaudio, SLOT(init(audioSetup)));
setupRxAudio(radio->rxAudioSetup);
#endif
}
}
}

Plik diff jest za duży Load Diff

Wyświetl plik

@ -8,55 +8,23 @@
#include <QDateTime>
#include <QRect>
#include <QGraphicsTextItem>
#include <QSpinBox>
#include <QColor>
#include <QVector>
#include <QList>
#include <QMap>
#include <QMutex>
#include <QIODevice>
#include <QtEndian>
#include <QUuid>
#include <QLabel>
#include <QImage>
#include <QPainter>
#include <QImageWriter>
#include <QBuffer>
#include <QSettings>
#include <QMessageBox>
#include <memory>
#if defined(USB_CONTROLLER) && QT_VERSION < QT_VERSION_CHECK(6,0,0)
#include <QGamepad>
#endif
#if defined(USB_CONTROLLER)
#ifndef Q_OS_WIN
#include "hidapi/hidapi.h"
#else
#include "hidapi.h"
#endif
#ifdef HID_API_VERSION_MAJOR
#ifndef HID_API_MAKE_VERSION
#define HID_API_MAKE_VERSION(mj, mn, p) (((mj) << 24) | ((mn) << 8) | (p))
#endif
#ifndef HID_API_VERSION
#define HID_API_VERSION HID_API_MAKE_VERSION(HID_API_VERSION_MAJOR, HID_API_VERSION_MINOR, HID_API_VERSION_PATCH)
#endif
#if defined(__APPLE__) && HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)
#include <hidapi/hidapi_darwin.h>
#endif
#if defined(USING_HIDAPI_LIBUSB) && HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)
#include <hidapi_libusb.h>
#endif
#endif
#ifndef Q_OS_WIN
#include "hidapi/hidapi.h"
#else
#include "hidapi.h"
#endif
#endif
#ifndef Q_OS_WIN
//Headers needed for sleeping.
#include <unistd.h>
#endif
@ -65,100 +33,24 @@
using namespace std;
#define HIDDATALENGTH 64
#define MAX_STR 255
struct USBTYPE {
USBTYPE() {}
USBTYPE(usbDeviceType model,quint32 manufacturerId, quint32 productId , quint32 usage, quint32 usagePage, int buttons, int cols, int knobs, int leds, int maxPayload, int iconSize) :
model(model), manufacturerId(manufacturerId), productId(productId), usage(usage), usagePage(usagePage), buttons(buttons), cols(cols), knobs(knobs), leds(leds), maxPayload(maxPayload), iconSize(iconSize) {}
usbDeviceType model = usbNone;
quint32 manufacturerId=0;
quint32 productId=0;
quint32 usage=0;
quint32 usagePage=0;
int buttons=0; // How many buttons
int cols=0; // How many columns of buttons
int knobs=0; // How many knobs
int leds=0; // how many leds
int maxPayload=0; // Max allowed payload
int iconSize=0;
};
struct KNOBVALUE {
int value=0;
int previous=0;
quint8 send=0;
qint64 lastChanged=0;
QString name="";
};
struct USBDEVICE {
USBDEVICE() {}
USBDEVICE(USBTYPE type) : type(type) {}
USBTYPE type;
bool detected = false;
bool remove = false;
bool connected = false;
bool uiCreated = false;
bool disabled = false;
quint8 speed=2;
quint8 timeout=30;
quint8 brightness=2;
quint8 orientation=0;
QColor color=Qt::darkGray;
cmds lcd=cmdNone;
hid_device* handle = NULL;
QString product = "";
QString manufacturer = "";
QString serial = "<none>";
QString deviceId = "";
QString path = "";
int sensitivity = 1;
unsigned char jogpos=0;
unsigned char shutpos=0;
unsigned char shutMult = 0;
int jogCounter = 0;
quint32 buttons = 0;
quint32 knobs = 0;
QList<KNOBVALUE> knobValues;
QTime lastusbController = QTime::currentTime();
QByteArray lastData = QByteArray(8,0x0);
unsigned char lastDialPos=0;
QUuid uuid;
QLabel *message;
int pages=1;
int currentPage=0;
QGraphicsScene* scene = Q_NULLPTR;
QSpinBox* pageSpin = Q_NULLPTR;
QImage image;
quint8 ledStatus=0x07;
};
struct COMMAND {
COMMAND() {}
COMMAND(int index, QString text, usbCommandType cmdType, int command, int value) :
index(index), text(text), cmdType(cmdType), command(command), value(value) {}
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, int getCommand, unsigned char suffix) :
index(index), text(text), cmdType(cmdType), command(command), getCommand(getCommand), 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) {}
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) {}
int index=0;
QString text;
usbCommandType cmdType = commandButton;
int command=0;
int getCommand=0;
unsigned char suffix=0x0;
int value=0;
availableBands band=bandGen;
mode_kind mode=modeLSB;
};
@ -166,59 +58,25 @@ struct COMMAND {
struct BUTTON {
BUTTON() {}
BUTTON(usbDeviceType dev, int num, QRect pos, const QColor textColour, COMMAND* on, COMMAND* off, bool graphics=false, int led=0) :
dev(dev), num(num), name(""), pos(pos), textColour(textColour), onCommand(on), offCommand(off), on(onCommand->text), off(offCommand->text), graphics(graphics), led(led){}
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), on(onCommand->text), off(offCommand->text) {}
BUTTON(quint8 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) :
dev(dev), num(-1), name(name), pos(pos), textColour(textColour), onCommand(on), offCommand(off) {}
usbDeviceType dev;
USBDEVICE* parent = Q_NULLPTR;
int page=1;
quint8 dev;
int num;
QString name;
QRect pos;
QColor textColour;
const COMMAND* onCommand = Q_NULLPTR;
const COMMAND* offCommand = Q_NULLPTR;
QGraphicsRectItem* bgRect = Q_NULLPTR;
QGraphicsTextItem* text = Q_NULLPTR;
QString on;
QString off;
QString path;
QColor backgroundOn = Qt::lightGray;
QColor backgroundOff = Qt::blue;
QString iconName = "";
QImage* icon = Q_NULLPTR;
bool toggle = false;
bool isOn = false;
bool graphics = false;
int led = 0;
int onEvent = 0;
int offEvent = 0;
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), cmd(command->text) {}
usbDeviceType dev;
USBDEVICE* parent = Q_NULLPTR;
int page=1;
int num;
QString name;
QRect pos;
QColor textColour;
const COMMAND* command = Q_NULLPTR;
QGraphicsTextItem* text = Q_NULLPTR;
QString cmd;
QString path;
};
typedef QMap<QString,USBDEVICE> usbDevMap;
#if defined(USB_CONTROLLER)
class usbController : public QObject
{
@ -227,21 +85,15 @@ class usbController : public QObject
public:
usbController();
~usbController();
bool hotPlugEvent(const QByteArray & eventType, void * message, long * result);
public slots:
void init(QMutex* mut,usbDevMap* prefs ,QVector<BUTTON>* buts,QVector<KNOB>* knobs);
void init();
void run();
void runTimer();
void receivePTTStatus(bool on);
void receiveLevel(cmds cmd, unsigned char level);
void programPages(USBDEVICE* dev, int pages);
void programDisable(USBDEVICE* dev, bool disabled);
void sendRequest(USBDEVICE *dev, usbFeatureType feature, int val=0, QString text="", QImage* img=Q_NULLPTR, QColor* color=Q_NULLPTR);
void sendToLCD(QImage *img);
void backupController(USBDEVICE* dev, QString file);
void restoreController(USBDEVICE* dev, QString file);
void ledControl(bool on, unsigned char num);
void receiveCommands(QVector<COMMAND>*);
void receiveButtons(QVector<BUTTON>*);
void getVersion();
signals:
void jogPlus();
@ -250,53 +102,33 @@ signals:
void doShuttle(bool plus, quint8 level);
void setBand(int band);
void button(const COMMAND* cmd);
void initUI(usbDevMap* devs, QVector<BUTTON>* but, QVector<KNOB>* kb, QVector<COMMAND>* cmd, QMutex* mut);
void newDevice(USBDEVICE* dev);
void removeDevice(USBDEVICE* dev);
void setConnected(USBDEVICE* dev);
void changePage(USBDEVICE* dev, int page);
void newDevice(unsigned char devType, QVector<BUTTON>* but,QVector<COMMAND>* cmd);
private:
void loadButtons();
void loadKnobs();
void loadCommands();
int hidStatus = 1;
hid_device* handle;
bool isOpen=false;
int devicesConnected=0;
unsigned int buttons=0;
unsigned char jogpos=0;
unsigned char shutpos=0;
unsigned char shutMult = 0;
int jogCounter = 0;
QTime lastusbController = QTime::currentTime();
QByteArray lastData = QByteArray(8,0x0);
unsigned char lastDialPos=0;
QVector<BUTTON>* buttonList;
QVector<KNOB>* knobList;
QVector<BUTTON> defaultButtons;
QVector<KNOB> defaultKnobs;
QVector<USBTYPE> knownDevices;
QVector<COMMAND> commands;
usbDevMap* devices;
QVector<COMMAND>* commands = Q_NULLPTR;
QString product="";
QString manufacturer="";
QString serial="<none>";
#if (QT_VERSION < QT_VERSION_CHECK(6,0,0))
QGamepad* gamepad=Q_NULLPTR;
#endif
void buttonState(QString but, bool val);
void buttonState(QString but, double val);
QColor currentColour;
QMutex* mutex=Q_NULLPTR;
COMMAND sendCommand;
QTimer* dataTimer = Q_NULLPTR;
usbDeviceType usbDevice = usbNone;
protected:
};
class usbControllerDev : public QObject
{
Q_OBJECT
};
#endif
#endif

Plik diff jest za duży Load Diff

102
wfmain.h
Wyświetl plik

@ -19,7 +19,6 @@
#include <QMutexLocker>
#include <QColorDialog>
#include <QColor>
#include <QMap>
#include "logcategories.h"
#include "wfviewtypes.h"
@ -63,18 +62,6 @@
#include "rtaudio/RtAudio.h"
#endif
#ifdef USB_CONTROLLER
#ifdef Q_OS_WIN
#include <windows.h>
#include <dbt.h>
#define USB_HOTPLUG
#elif defined(Q_OS_LINUX)
#include <QSocketNotifier>
#include <libudev.h>
#define USB_HOTPLUG
#endif
#endif
#define numColorPresetsTotal (5)
namespace Ui {
@ -91,20 +78,7 @@ public:
static void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg);
void handleLogText(QString text);
#ifdef USB_HOTPLUG
#if defined(Q_OS_WIN)
protected:
virtual bool nativeEvent(const QByteArray& eventType, void* message, qintptr* result);
#elif defined(Q_OS_LINUX)
private slots:
void uDevEvent();
#endif
#endif
signals:
// Signal levels received to other parts of wfview
void sendLevel(cmds cmd, unsigned char level);
void usbHotplug();
// Basic to rig:
void setCIVAddr(unsigned char newRigCIVAddr);
void setRigID(unsigned char rigID);
@ -116,7 +90,6 @@ signals:
// Frequency, mode, band:
void getFrequency();
void getFrequency(unsigned char);
void setFrequency(unsigned char vfo, freqt freq);
void getMode();
void setMode(unsigned char modeIndex, unsigned char modeFilter);
@ -167,21 +140,7 @@ signals:
void getModInputLevel(rigInput input);
void getMeters(meterKind meter);
void getPassband();
void getVoxGain();
void getAntiVoxGain();
void getMonitorGain();
void getNBLevel();
void getNRLevel();
void getCompLevel();
void getCwPitch();
void getVox();
void getMonitor();
void getCompressor();
void getNB();
void getNR();
void getDashRatio();
void getPskTone();
void getRttyMark();
@ -199,18 +158,9 @@ signals:
void setMicGain(unsigned char);
void setCompLevel(unsigned char);
void setTxPower(unsigned char);
void setMonitorGain(unsigned char);
void setMonitorLevel(unsigned char);
void setVoxGain(unsigned char);
void setAntiVoxGain(unsigned char);
void setNBLevel(unsigned char level);
void setNRLevel(unsigned char level);
void setVox(bool en);
void setMonitor(bool en);
void setCompressor(bool en);
void setNB(bool en);
void setNR(bool en);
void setSpectrumRefLevel(int);
void setModLevel(rigInput input, unsigned char level);
@ -219,7 +169,6 @@ signals:
void setACCBGain(unsigned char level);
void setUSBGain(unsigned char level);
void setLANGain(unsigned char level);
void setPassband(quint16 pass);
// PTT, ATU, ATT, Antenna, Preamp:
@ -241,7 +190,6 @@ signals:
void getKeySpeed();
void setKeySpeed(unsigned char wpm);
void setCwPitch(unsigned char pitch);
void setDashRatio(unsigned char ratio);
void setCWBreakMode(unsigned char breakMode);
void getCWBreakMode();
@ -275,7 +223,8 @@ signals:
void openShuttle();
void requestRigState();
void stateUpdated();
void initUsbController(QMutex* mutex,usbDevMap* devs ,QVector<BUTTON>* buts,QVector<KNOB>* knobs);
void sendUsbControllerCommands(QVector<COMMAND>* cmds);
void sendUsbControllerButtons(QVector<BUTTON>* buts);
void setClusterUdpPort(int port);
void setClusterEnableUdp(bool udp);
void setClusterEnableTcp(bool tcp);
@ -286,7 +235,6 @@ signals:
void setClusterTimeout(int timeout);
void setClusterSkimmerSpots(bool enable);
void setFrequencyRange(double low, double high);
void sendControllerRequest(USBDEVICE* dev, usbFeatureType request, int val=0, QString text="", QImage* img=Q_NULLPTR, QColor* color=Q_NULLPTR);
private slots:
void setAudioDevicesUI();
@ -346,17 +294,9 @@ private slots:
void receiveModInput(rigInput input, bool dataOn);
//void receiveDuplexMode(duplexMode dm);
void receivePassband(quint16 pass);
void receiveMonitorGain(unsigned char pass);
void receiveNBLevel(unsigned char pass);
void receiveNRLevel(unsigned char pass);
void receiveCwPitch(unsigned char pitch);
void receiveTPBFInner(unsigned char level);
void receiveTPBFOuter(unsigned char level);
void receiveVox(bool en);
void receiveMonitor(bool en);
void receiveComp(bool en);
void receiveNB(bool en);
void receiveNR(bool en);
// Levels:
void receiveRfGain(unsigned char level);
@ -372,6 +312,7 @@ private slots:
void receiveTxPower(unsigned char power);
void receiveMicGain(unsigned char gain);
void receiveCompLevel(unsigned char compLevel);
void receiveMonitorGain(unsigned char monitorGain);
void receiveVoxGain(unsigned char voxGain);
void receiveAntiVoxGain(unsigned char antiVoxGain);
void receiveSpectrumRefLevel(int level);
@ -409,7 +350,6 @@ private slots:
void receiveBaudRate(quint32 baudrate);
void radioSelection(QList<radio_cap_packet> radios);
// Added for RC28/Shuttle support
void pttToggle(bool);
void stepUp();
@ -457,7 +397,8 @@ private slots:
void on_fEnterBtn_clicked();
void on_usbControllerBtn_clicked();
void on_usbControllersResetBtn_clicked();
void on_usbButtonsResetBtn_clicked();
void on_usbCommandsResetBtn_clicked();
void on_enableUsbChk_clicked(bool checked);
@ -551,7 +492,7 @@ private slots:
void on_vspCombo_currentIndexChanged(int value);
void on_scopeEnableWFBtn_stateChanged(int state);
void on_scopeEnableWFBtn_clicked(bool checked);
void on_sqlSlider_valueChanged(int value);
@ -745,10 +686,6 @@ private slots:
void on_colorEditPassband_editingFinished();
void on_colorSetBtnPBT_clicked();
void on_colorEditPBT_editingFinished();
void on_colorSetBtnMeterLevel_clicked();
void on_colorEditMeterLevel_editingFinished();
@ -977,7 +914,6 @@ private:
double oldLowerFreq;
double oldUpperFreq;
freqt freq;
freqt freqb;
float tsKnobMHz;
unsigned char setModeVal=0;
@ -1125,6 +1061,9 @@ private:
void updateUsbButtons();
void resetUsbButtons();
void resetUsbCommands();
int oldFreqDialVal;
rigCapabilities rigCaps;
@ -1151,7 +1090,7 @@ private:
satelliteSetup *sat;
transceiverAdjustments *trxadj;
cwSender *cw;
controllerSetup* usbWindow = Q_NULLPTR;
controllerSetup* shut;
aboutbox *abtBox;
selectRadio *selRad;
loggingWindow *logWindow;
@ -1199,18 +1138,9 @@ private:
#if defined (USB_CONTROLLER)
usbController *usbControllerDev = Q_NULLPTR;
QThread *usbControllerThread = Q_NULLPTR;
QString typeName;
QString usbDeviceName;
QVector<COMMAND> usbCommands;
QVector<BUTTON> usbButtons;
QVector<KNOB> usbKnobs;
usbDevMap usbDevices;
QMutex usbMutex;
qint64 lastUsbNotify=0;
#if defined (Q_OS_LINUX)
struct udev* uDev = nullptr;
struct udev_monitor* uDevMonitor = nullptr;
QSocketNotifier* uDevNotifier = nullptr;
#endif
#endif
dxClusterClient* cluster = Q_NULLPTR;
@ -1222,7 +1152,6 @@ private:
QMutex clusterMutex;
QColor clusterColor;
audioDevices* audioDev = Q_NULLPTR;
QImage lcdImage;
};
Q_DECLARE_METATYPE(struct rigCapabilities)
@ -1246,18 +1175,15 @@ Q_DECLARE_METATYPE(QList<radio_cap_packet>)
Q_DECLARE_METATYPE(QList<spotData>)
Q_DECLARE_METATYPE(rigstate*)
Q_DECLARE_METATYPE(QVector <BUTTON>*)
Q_DECLARE_METATYPE(QVector <KNOB>*)
Q_DECLARE_METATYPE(struct BUTTON*)
Q_DECLARE_METATYPE(QVector <COMMAND>*)
Q_DECLARE_METATYPE(const COMMAND*)
Q_DECLARE_METATYPE(const USBDEVICE*)
Q_DECLARE_METATYPE(codecType)
Q_DECLARE_METATYPE(errorType)
Q_DECLARE_METATYPE(enum duplexMode)
Q_DECLARE_METATYPE(enum rptAccessTxRx)
Q_DECLARE_METATYPE(struct rptrTone_t)
Q_DECLARE_METATYPE(struct rptrAccessData_t)
Q_DECLARE_METATYPE(enum usbFeatureType)
Q_DECLARE_METATYPE(enum cmds)
//void (*wfmain::logthistext)(QString text) = NULL;

864
wfmain.ui

Plik diff jest za duży Load Diff

Wyświetl plik

@ -13,7 +13,7 @@ TEMPLATE = app
CONFIG += console
DEFINES += WFVIEW_VERSION=\\\"1.65\\\"
DEFINES += WFVIEW_VERSION=\\\"1.60\\\"
DEFINES += BUILD_WFSERVER

Wyświetl plik

@ -112,7 +112,7 @@
<QtModules>core;network;gui;multimedia;widgets;serialport;printsupport</QtModules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtInstall>msvc2016_64_v640</QtInstall>
<QtInstall>msvc2019_64_v62</QtInstall>
<QtModules>core;network;gui;multimedia;widgets;serialport;printsupport</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -120,7 +120,7 @@
<QtModules>core;network;gui;multimedia;widgets;serialport;printsupport</QtModules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtInstall>msvc2016_64_v640</QtInstall>
<QtInstall>msvc2019_64_v62</QtInstall>
<QtModules>core;network;gui;multimedia;widgets;serialport;printsupport</QtModules>
</PropertyGroup>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">

Wyświetl plik

@ -2,15 +2,15 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:12.9338871Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2022-08-21T18:45:22.2052009Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:11.6802165Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2022-08-21T18:45:22.2052009Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:14.0213664Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2023-01-02T19:56:38.8798452Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:13.5068223Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2022-04-13T11:33:53.0745117Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

0
wfview 100644
Wyświetl plik

Wyświetl plik

@ -12,16 +12,16 @@ QT += core gui serialport network multimedia xml
#Uncomment The following line to enable USB controllers (Shuttle/RC-28 etc.)
DEFINES += USB_CONTROLLER
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
contains(DEFINES,USB_CONTROLLER){
lessThan(QT_MAJOR_VERSION, 6): QT += gamepad
lessThan(QT_MAJOR_VERSION, 6): QT += gamepad printsupport
}
TARGET = wfview
TEMPLATE = app
DEFINES += WFVIEW_VERSION=\\\"1.65\\\"
DEFINES += WFVIEW_VERSION=\\\"1.60\\\"
DEFINES += BUILD_WFVIEW
@ -51,7 +51,7 @@ macx:DEFINES += __MACOSX_CORE__
!linux:HEADERS += ../rtaudio/RTAUdio.h
!linux:INCLUDEPATH += ../rtaudio
linux:LIBS += -lpulse -lpulse-simple -lrtaudio -lpthread -ludev
linux:LIBS += -lpulse -lpulse-simple -lrtaudio -lpthread
win32:INCLUDEPATH += ../portaudio/include
!win32:LIBS += -lportaudio
@ -116,22 +116,17 @@ unix:target.path = $$PREFIX/bin
INSTALLS += target
# Why doesn't this seem to do anything?
unix:DISTFILES += resources/unix_icons/wfview.png \
unix:DISTFILES += resources/wfview.png \
resources/install.sh
unix:DISTFILES += resources/wfview.desktop
unix:DISTFILES += resources/org.wfview.wfview.metainfo.xml
unix:applications.files = resources/wfview.desktop
unix:applications.path = $$PREFIX/share/applications
INSTALLS += applications
unix:icons.files = resources/unix_icons/wfview.png
unix:icons.path = $$PREFIX/share/icons/hicolor/256x256/apps
INSTALLS += icons
unix:metainfo.files = resources/org.wfview.wfview.metainfo.xml
unix:metainfo.path = $$PREFIX/share/metainfo
INSTALLS += metainfo
unix:pixmaps.files = resources/wfview.png
unix:pixmaps.path = $$PREFIX/share/pixmaps
INSTALLS += pixmaps
unix:stylesheets.files = qdarkstyle
unix:stylesheets.path = $$PREFIX/share/wfview
@ -143,11 +138,8 @@ macx:LIBS += -framework CoreAudio -framework CoreFoundation -lpthread -lopus
# CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT
CONFIG(debug, release|debug) {
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlotd.so/ {print \"-lQCustomPlotd\"}'")
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd2.so/ {print \"-lqcustomplotd2\"}'")
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplotd.so/ {print \"-lqcustomplotd\"}'")
macos:LIBS += -lqcustomplotd
win32:LIBS += -lqcustomplotd2
!win32: QCPLIB = qcustomplotd
win32: QCPLIB = qcustomplotd2
win32 {
contains(QMAKE_TARGET.arch, x86_64) {
LIBS += -L../opus/win32/VS2015/x64/DebugDLL/
@ -174,11 +166,8 @@ CONFIG(debug, release|debug) {
}
}
} else {
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libQCustomPlot.so/ {print \"-lQCustomPlot\"}'")
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot2.so/ {print \"-lqcustomplot2\"}'")
linux:LIBS += $$system("/sbin/ldconfig -p | awk '/libqcustomplot.so/ {print \"-lqcustomplot\"}'")
macos:LIBS += -lqcustomplot
win32:LIBS += -lqcustomplot2
!win32: QCPLIB = qcustomplot
win32: QCPLIB = qcustomplot2
win32 {
contains(QMAKE_TARGET.arch, x86_64) {
LIBS += -L../opus/win32/VS2015/x64/ReleaseDLL/
@ -207,13 +196,14 @@ CONFIG(debug, release|debug) {
}
contains(DEFINES,USB_CONTROLLER){
linux:LIBS += -L./ -lhidapi-libusb
linux:LIBS += -L./ -l$$QCPLIB -lhidapi-libusb
macx:LIBS += -lhidapi
win32:INCLUDEPATH += ../hidapi/hidapi
}
!win32:LIBS += -L./ -lopus
win32:LIBS += -lopus -lole32 -luser32
!win32:LIBS += -L./ -l$$QCPLIB -lopus
win32:LIBS += -l$$QCPLIB -lopus -lole32
#macx:SOURCES += ../qcustomplot/qcustomplot.cpp
#macx:HEADERS += ../qcustomplot/qcustomplot.h
@ -228,7 +218,6 @@ INCLUDEPATH += resampler
SOURCES += main.cpp\
cwsender.cpp \
cwsidetone.cpp \
loggingwindow.cpp \
wfmain.cpp \
commhandler.cpp \
@ -267,7 +256,6 @@ HEADERS += wfmain.h \
colorprefs.h \
commhandler.h \
cwsender.h \
cwsidetone.h \
loggingwindow.h \
prefs.h \
printhex.h \

Wyświetl plik

@ -111,7 +111,7 @@
<OutDir>$(SolutionDir)wfview-release\</OutDir>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QtInstall>msvc2016_64_v632</QtInstall>
<QtInstall>msvc2019_64_v62</QtInstall>
<QtModules>core;gui;network;widgets;multimedia;printsupport;serialport;xml</QtModules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="QtSettings">
@ -119,7 +119,7 @@
<QtModules>core;gui;network;widgets;multimedia;printsupport;serialport;xml</QtModules>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QtInstall>msvc2016_64_v632</QtInstall>
<QtInstall>msvc2019_64_v62</QtInstall>
<QtModules>core;gui;network;widgets;multimedia;printsupport;serialport;xml</QtModules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="QtSettings">
@ -131,7 +131,7 @@
</ImportGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.;.\hidapi\hidapi;..\rtaudio;..\portaudio\include;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.;..\rtaudio;..\portaudio\include;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;release;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -utf-8 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>release\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
@ -152,8 +152,8 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<AdditionalDependencies>..\hidapi\windows\x64\Release\hidapi.lib;..\portaudio\msvc\X64\Release\portaudio_x64.lib;..\qcustomplot\x64\qcustomplot2.lib;..\opus\win32\VS2015\x64\Release\opus.lib;$(QTDIR)\lib\Qt6Multimedia.lib;$(QTDIR)\lib\Qt6PrintSupport.lib;$(QTDIR)\lib\Qt6Widgets.lib;$(QTDIR)\lib\Qt6Gui.lib;$(QTDIR)\lib\Qt6SerialPort.lib;$(QTDIR)\lib\Qt6Network.lib;$(QTDIR)\lib\Qt6Core.lib;$(QTDIR)\lib\Qt6EntryPoint.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\hidapi\windows\x64\Release;..\opus\win32\VS2015\x64\Release;..\qcustomplot\x64;..\portaudio\msvc\X64\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>..\portaudio\msvc\X64\Release\portaudio_x64.lib;..\qcustomplot\x64\qcustomplot2.lib;..\opus\win32\VS2015\x64\Release\opus.lib;$(QTDIR)\lib\Qt6Multimedia.lib;$(QTDIR)\lib\Qt6PrintSupport.lib;$(QTDIR)\lib\Qt6Widgets.lib;$(QTDIR)\lib\Qt6Gui.lib;$(QTDIR)\lib\Qt6SerialPort.lib;$(QTDIR)\lib\Qt6Network.lib;$(QTDIR)\lib\Qt6Core.lib;$(QTDIR)\lib\Qt6EntryPoint.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\opus\win32\VS2015\x64\Release;..\qcustomplot\x64;..\portaudio\msvc\X64\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -275,7 +275,7 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Release\portaudio_x86.dll wfview-release\
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>.;.\hidapi\hidapi;..\rtaudio;..\portaudio\include;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;debug;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>.;..\rtaudio;..\portaudio\include;..\qcustomplot;..\opus\include;..\eigen;..\r8brain-free-src;resampler;debug;/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>-Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -permissive- -Zc:__cplusplus -Zc:externConstexpr -utf-8 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions)</AdditionalOptions>
<AssemblerListingLocation>debug\</AssemblerListingLocation>
<BrowseInformation>false</BrowseInformation>
@ -295,8 +295,8 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Release\portaudio_x86.dll wfview-release\
<LanguageStandard_C>stdc17</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>..\hidapi\windows\x64\Debug\hidapi.lib;..\portaudio\msvc\X64\Debug\portaudio_x64.lib;..\qcustomplot\x64\qcustomplotd2.lib;..\opus\win32\VS2015\x64\Debug\opus.lib;$(QTDIR)\lib\Qt6Multimediad.lib;$(QTDIR)\lib\Qt6PrintSupportd.lib;$(QTDIR)\lib\Qt6Widgetsd.lib;$(QTDIR)\lib\Qt6Guid.lib;$(QTDIR)\lib\Qt6SerialPortd.lib;$(QTDIR)\lib\Qt6Networkd.lib;$(QTDIR)\lib\Qt6Cored.lib;$(QTDIR)\lib\Qt6EntryPointd.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\hidapi\windows\x64\Debug;..\opus\win32\VS2015\x64\Debug;..\qcustomplot\x64;..\portaudio\msvc\X64\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>..\portaudio\msvc\X64\Debug\portaudio_x64.lib;..\qcustomplot\x64\qcustomplotd2.lib;..\opus\win32\VS2015\x64\Debug\opus.lib;$(QTDIR)\lib\Qt6Multimediad.lib;$(QTDIR)\lib\Qt6PrintSupportd.lib;$(QTDIR)\lib\Qt6Widgetsd.lib;$(QTDIR)\lib\Qt6Guid.lib;$(QTDIR)\lib\Qt6SerialPortd.lib;$(QTDIR)\lib\Qt6Networkd.lib;$(QTDIR)\lib\Qt6Cored.lib;$(QTDIR)\lib\Qt6EntryPointd.lib;shell32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\opus\win32\VS2015\x64\Debug;..\qcustomplot\x64;..\portaudio\msvc\X64\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<DataExecutionPrevention>true</DataExecutionPrevention>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -415,7 +415,6 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Debug\portaudio_x86.dll wfview-debug</Com
<ClCompile Include="cluster.cpp" />
<ClCompile Include="commhandler.cpp" />
<ClCompile Include="controllersetup.cpp" />
<ClCompile Include="cwsender.cpp" />
<ClCompile Include="freqmemory.cpp" />
<ClCompile Include="logcategories.cpp" />
<ClCompile Include="loggingwindow.cpp" />
@ -444,7 +443,6 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Debug\portaudio_x86.dll wfview-debug</Com
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\rtaudio\RTAUdio.h" />
<ClInclude Include="wfviewtypes.h" />
<QtMoc Include="usbcontroller.h" />
<QtMoc Include="aboutbox.h">
</QtMoc>
@ -452,7 +450,6 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Debug\portaudio_x86.dll wfview-debug</Com
<QtMoc Include="loggingwindow.h" />
<QtMoc Include="cluster.h" />
<QtMoc Include="controllersetup.h" />
<QtMoc Include="cwsender.h" />
<ClInclude Include="resampler\arch.h" />
<QtMoc Include="audioconverter.h">
</QtMoc>
@ -541,7 +538,6 @@ cmd /c copy /y ..\portaudio\msvc\Win32\Debug\portaudio_x86.dll wfview-debug</Com
<QtUic Include="calibrationwindow.ui">
</QtUic>
<QtUic Include="controllersetup.ui" />
<QtUic Include="cwsender.ui" />
<QtUic Include="loggingwindow.ui" />
<QtUic Include="repeatersetup.ui">
</QtUic>

Wyświetl plik

@ -149,9 +149,6 @@
<ClCompile Include="controllersetup.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="cwsender.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\rtaudio\RTAUdio.h">
@ -265,9 +262,6 @@
<QtMoc Include="wfmain.h">
<Filter>Header Files</Filter>
</QtMoc>
<ClInclude Include="wfviewtypes.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="debug\moc_predefs.h.cbt">
@ -305,9 +299,6 @@
<QtUic Include="wfmain.ui">
<Filter>Form Files</Filter>
</QtUic>
<QtUic Include="cwsender.ui">
<Filter>Form Files</Filter>
</QtUic>
</ItemGroup>
<ItemGroup>
<None Include="qdarkstyle\rc\Hmovetoolbar.png">
@ -450,8 +441,5 @@
<QtMoc Include="controllersetup.h">
<Filter>Header Files</Filter>
</QtMoc>
<QtMoc Include="cwsender.h">
<Filter>Header Files</Filter>
</QtMoc>
</ItemGroup>
</Project>

Wyświetl plik

@ -45,10 +45,10 @@
<QtLastBackgroundBuild>2022-08-21T18:58:23.4329764Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:15.5036128Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2023-01-29T11:49:00.1257696Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:14.6701614Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2023-01-29T11:48:59.4191765Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtLastBackgroundBuild>2022-08-22T10:47:49.1255783Z</QtLastBackgroundBuild>
@ -60,9 +60,9 @@
<QtLastBackgroundBuild>2022-08-20T19:06:43.4553894Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:16.6120542Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2023-01-29T11:49:01.5629425Z</QtLastBackgroundBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="QtSettings">
<QtLastBackgroundBuild>2023-02-14T19:04:16.0046827Z</QtLastBackgroundBuild>
<QtLastBackgroundBuild>2023-01-29T11:49:00.7644018Z</QtLastBackgroundBuild>
</PropertyGroup>
</Project>

Wyświetl plik

@ -48,7 +48,6 @@ enum mode_kind {
modeLSB_D=0x80,
modeUSB_D=0x81,
modeDV=0x17,
modeATV=0x23,
modeDD=0x27,
modeWFM,
modeS_AMD,
@ -148,19 +147,16 @@ struct timekind {
};
enum cmds {
cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdGetFreqB, cmdSetFreq, cmdGetMode, cmdSetMode,
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, cmdGetNRLevel, cmdSetNRLevel, cmdGetTPBFInner, cmdSetTPBFInner,
cmdGetTPBFOuter, cmdSetTPBFOuter, cmdGetPassband, cmdSetPassband, cmdGetNBLevel, cmdSetNBLevel,
cmdGetCompLevel, cmdSetCompLevel,
cmdGetMonitorGain, cmdSetMonitorGain, cmdGetVoxGain, cmdSetVoxGain, cmdGetAntiVoxGain, cmdSetAntiVoxGain,
cmdGetSql, cmdSetSql, cmdGetIFShift, cmdSetIFShift, cmdGetTPBFInner, cmdSetTPBFInner,
cmdGetTPBFOuter, cmdSetTPBFOuter, cmdGetPassband, cmdSetPassband,
cmdGetCwPitch, cmdGetPskTone, cmdGetRttyMark, cmdSetCwPitch, cmdSetPskTone, cmdSetRttyMark,
cmdGetVox,cmdSetVox, cmdGetMonitor,cmdSetMonitor, cmdGetComp, cmdSetComp, cmdGetNB, cmdSetNB, cmdGetNR, cmdSetNR,
cmdSetATU, cmdStartATU, cmdGetATUStatus,
cmdGetSpectrumMode, cmdGetSpectrumSpan, cmdScopeCenterMode, cmdScopeFixedMode,
cmdGetPTT, cmdSetPTT,cmdPTTToggle,
cmdGetTxPower, cmdSetTxPower, cmdGetMicGain, cmdSetMicGain, cmdGetModLevel, cmdSetModLevel,
cmdGetTxPower, cmdSetTxPower, cmdGetMicGain, cmdSetMicGain, cmdSetModLevel,
cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
cmdGetCurrentModLevel, cmdStartRegularPolling, cmdStopRegularPolling, cmdQueNormalSpeed,
cmdGetVdMeter, cmdGetIdMeter, cmdGetSMeter, cmdGetCenterMeter, cmdGetPowerMeter,
@ -170,12 +166,10 @@ enum cmds {
cmdSetRptAccessMode, cmdSetRptDuplexOffset, cmdGetRptDuplexOffset,
cmdSelVFO, cmdVFOSwap, cmdVFOEqualAB, cmdVFOEqualMS, cmdSetQuickSplit,
cmdGetPreamp, cmdGetAttenuator, cmdGetAntenna,
cmdGetBandStackReg, cmdGetKeySpeed, cmdSetKeySpeed, cmdGetBreakMode, cmdSetBreakMode, cmdSendCW, cmdStopCW, cmdGetDashRatio, cmdSetDashRatio,
cmdGetBandStackReg, cmdGetKeySpeed, cmdSetKeySpeed, cmdGetBreakMode, cmdSetBreakMode, cmdSendCW, cmdStopCW,
cmdSetTime, cmdSetDate, cmdSetUTCOffset,
// Below Only used for USB Controller at the moment.
cmdSetBandUp, cmdSetBandDown, cmdSetModeUp, cmdSetModeDown, cmdSetStepUp, cmdSetStepDown,
cmdSetSpanUp, cmdSetSpanDown, cmdIFFilterUp, cmdIFFilterDown, cmdPageDown, cmdPageUp,
cmdLCDWaterfall, cmdLCDSpectrum, cmdLCDNothing, cmdSeparator
cmdSetBandUp, cmdSetBandDown, cmdSetModeUp, cmdSetModeDown, cmdSetStepUp, cmdSetStepDown, cmdSetSpanUp, cmdSetSpanDown, cmdIFFilterUp, cmdIFFilterDown
};
struct commandtype {
@ -200,15 +194,6 @@ enum codecType { LPCM, PCMU, OPUS };
enum passbandActions {passbandStatic, pbtInnerMove, pbtOuterMove, pbtMoving, passbandResizing};
enum usbDeviceType { usbNone = 0, shuttleXpress, shuttlePro2,
RC28, xBoxGamepad, unknownGamepad, eCoderPlus, QuickKeys,
StreamDeckMini,StreamDeckMiniV2,StreamDeckOriginal,StreamDeckOriginalV2,
StreamDeckOriginalMK2,StreamDeckXL,StreamDeckXLV2,StreamDeckPedal, StreamDeckPlus,
XKeysXK3
};
enum usbCommandType{ commandButton, commandKnob, commandAny };
enum usbFeatureType { featureReset,featureResetKeys, featureEventsA, featureEventsB, featureFirmware, featureSerial, featureButton, featureSensitivity, featureBrightness,
featureOrientation, featureSpeed, featureColor, featureOverlay, featureTimeout, featureLCD, featureGraph, featureLEDControl };
enum usbDeviceType { usbNone = 0, shuttleXpress, shuttlePro2, RC28, xBoxGamepad, unknownGamepad };
#endif // WFVIEWTYPES_H