kopia lustrzana https://gitlab.com/eliggett/wfview
Merge remote-tracking branch 'origin/ui-enhance' into lan-alpha
commit
e086966651
173
rigcommander.cpp
173
rigcommander.cpp
|
@ -550,30 +550,29 @@ void rigCommander::getDataMode()
|
|||
void rigCommander::setDuplexMode(duplexMode dm)
|
||||
{
|
||||
QByteArray payload;
|
||||
payload.setRawData("\x0F", 1);
|
||||
payload.append((unsigned char) dm);
|
||||
if(dm==dmDupAutoOff)
|
||||
{
|
||||
payload.setRawData("\x1A\x05\x00\x46\x00", 5);
|
||||
} else if (dm==dmDupAutoOn)
|
||||
{
|
||||
payload.setRawData("\x1A\x05\x00\x46\x01", 5);
|
||||
} else {
|
||||
payload.setRawData("\x0F", 1);
|
||||
payload.append((unsigned char) dm);
|
||||
}
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::getDuplexMode()
|
||||
{
|
||||
QByteArray payload;
|
||||
payload.setRawData("\x0F\x00", 2);
|
||||
|
||||
// Duplex mode:
|
||||
payload.setRawData("\x0F", 1);
|
||||
prepDataAndSend(payload);
|
||||
|
||||
payload.setRawData("\x0F\x01", 2);
|
||||
prepDataAndSend(payload);
|
||||
|
||||
payload.setRawData("\x0F\x10", 2);
|
||||
prepDataAndSend(payload);
|
||||
|
||||
payload.setRawData("\x0F\x11", 2);
|
||||
prepDataAndSend(payload);
|
||||
|
||||
payload.setRawData("\x0F\x12", 2);
|
||||
prepDataAndSend(payload);
|
||||
|
||||
payload.setRawData("\x0F\x13", 2);
|
||||
// Auto Repeater Mode:
|
||||
payload.setRawData("\x1A\x05\x00\x46", 4);
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
@ -804,6 +803,7 @@ void rigCommander::parseCommand()
|
|||
this->parseMode();
|
||||
break;
|
||||
case '\x0F':
|
||||
qDebug() << "Received duplex mode: " << (unsigned char)payloadIn[1];
|
||||
emit haveDuplexMode((duplexMode)(unsigned char)payloadIn[1]);
|
||||
break;
|
||||
case '\x14':
|
||||
|
@ -1121,6 +1121,72 @@ void rigCommander::setModInput(rigInput input, bool dataOn, bool isQuery)
|
|||
|
||||
}
|
||||
|
||||
void rigCommander::setModInputLevel(rigInput input, unsigned char level)
|
||||
{
|
||||
switch(input)
|
||||
{
|
||||
case inputMic:
|
||||
setMicGain(level);
|
||||
break;
|
||||
|
||||
case inputACCA:
|
||||
setACCGain(level, 0);
|
||||
break;
|
||||
|
||||
case inputACCB:
|
||||
setACCGain(level, 1);
|
||||
break;
|
||||
|
||||
case inputACC:
|
||||
setACCGain(level);
|
||||
break;
|
||||
|
||||
case inputUSB:
|
||||
setUSBGain(level);
|
||||
break;
|
||||
|
||||
case inputLAN:
|
||||
setLANGain(level);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void rigCommander::getModInputLevel(rigInput input)
|
||||
{
|
||||
switch(input)
|
||||
{
|
||||
case inputMic:
|
||||
getMicGain();
|
||||
break;
|
||||
|
||||
case inputACCA:
|
||||
getACCGain(0);
|
||||
break;
|
||||
|
||||
case inputACCB:
|
||||
getACCGain(1);
|
||||
break;
|
||||
|
||||
case inputACC:
|
||||
getACCGain();
|
||||
break;
|
||||
|
||||
case inputUSB:
|
||||
getUSBGain();
|
||||
break;
|
||||
|
||||
case inputLAN:
|
||||
getLANGain();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray rigCommander::getUSBAddr()
|
||||
{
|
||||
QByteArray payload;
|
||||
|
@ -1203,12 +1269,15 @@ void rigCommander::setLANGain(unsigned char gain)
|
|||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
QByteArray rigCommander::getACCAddr()
|
||||
QByteArray rigCommander::getACCAddr(unsigned char ab)
|
||||
{
|
||||
QByteArray payload;
|
||||
|
||||
// Note: the manual for the IC-7600 does not call out a
|
||||
// register to adjust the ACC gain.
|
||||
|
||||
// 7850: ACC-A = 0, ACC-B = 1
|
||||
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case model9700:
|
||||
|
@ -1225,7 +1294,14 @@ QByteArray rigCommander::getACCAddr()
|
|||
break;
|
||||
case model7850:
|
||||
// Note: 0x58 = ACC-A, 0x59 = ACC-B
|
||||
payload.setRawData("\x1A\x05\x00\x58", 4);
|
||||
if(ab==0)
|
||||
{
|
||||
// A
|
||||
payload.setRawData("\x1A\x05\x00\x58", 4);
|
||||
} else {
|
||||
// B
|
||||
payload.setRawData("\x1A\x05\x00\x59", 4);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -1236,13 +1312,28 @@ QByteArray rigCommander::getACCAddr()
|
|||
|
||||
void rigCommander::getACCGain()
|
||||
{
|
||||
QByteArray payload = getACCAddr();
|
||||
QByteArray payload = getACCAddr(0);
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
||||
void rigCommander::getACCGain(unsigned char ab)
|
||||
{
|
||||
QByteArray payload = getACCAddr(ab);
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
||||
void rigCommander::setACCGain(unsigned char gain)
|
||||
{
|
||||
QByteArray payload = getACCAddr();
|
||||
QByteArray payload = getACCAddr(0);
|
||||
payload.append(bcdEncodeInt(gain));
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setACCGain(unsigned char gain, unsigned char ab)
|
||||
{
|
||||
QByteArray payload = getACCAddr(ab);
|
||||
payload.append(bcdEncodeInt(gain));
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
@ -1607,9 +1698,9 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
// It is a work in progress.
|
||||
// TODO: inputMod source and gain for models: 7700, and 7600
|
||||
|
||||
int level = bcdHexToUChar(payloadIn[4]) + (10*bcdHexToUChar(payloadIn[5]));
|
||||
int level = (100*bcdHexToUChar(payloadIn[4])) + bcdHexToUChar(payloadIn[5]);
|
||||
|
||||
int subcmd = bcdHexToUChar(payloadIn[3]) + (10*bcdHexToUChar(payloadIn[2]));
|
||||
int subcmd = bcdHexToUChar(payloadIn[3]) + (100*bcdHexToUChar(payloadIn[2]));
|
||||
|
||||
rigInput input;
|
||||
input = (rigInput)bcdHexToUChar(payloadIn[4]);
|
||||
|
@ -1620,6 +1711,7 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
case model9700:
|
||||
switch(subcmd)
|
||||
{
|
||||
|
||||
case 72:
|
||||
// course reference
|
||||
emit haveRefAdjustCourse( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
|
@ -1629,7 +1721,7 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
emit haveRefAdjustFine( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
break;
|
||||
case 112:
|
||||
emit haveACCGain(level, 0);
|
||||
emit haveACCGain(level, 5);
|
||||
break;
|
||||
case 113:
|
||||
emit haveUSBGain(level);
|
||||
|
@ -1721,7 +1813,7 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
emit haveModInput(input, true);
|
||||
break;
|
||||
case 88:
|
||||
emit haveACCGain(level, 0);
|
||||
emit haveACCGain(level, 5);
|
||||
break;
|
||||
case 89:
|
||||
emit haveUSBGain(level);
|
||||
|
@ -1753,7 +1845,7 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
switch(subcmd)
|
||||
{
|
||||
case 64:
|
||||
emit haveACCGain(level, 0);
|
||||
emit haveACCGain(level, 5);
|
||||
break;
|
||||
case 65:
|
||||
emit haveUSBGain(level);
|
||||
|
@ -1772,7 +1864,7 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
switch(subcmd)
|
||||
{
|
||||
case 87:
|
||||
emit haveACCGain(level, 0);
|
||||
emit haveACCGain(level, 5);
|
||||
break;
|
||||
case 89:
|
||||
emit haveUSBGain(level);
|
||||
|
@ -1915,6 +2007,8 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectAmpMax = 0;
|
||||
rigCaps.spectLenMax = 0;
|
||||
|
||||
rigCaps.inputs.append(inputMic);
|
||||
|
||||
|
||||
rigCaps.hasTransmit = true;
|
||||
|
||||
|
@ -1925,6 +2019,8 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 11;
|
||||
rigCaps.spectAmpMax = 160;
|
||||
rigCaps.spectLenMax = 475;
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.inputs.append(inputACC);
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -1936,6 +2032,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 11;
|
||||
rigCaps.spectAmpMax = 160;
|
||||
rigCaps.spectLenMax = 475;
|
||||
rigCaps.inputs.clear();
|
||||
rigCaps.hasLan = true;
|
||||
rigCaps.hasEthernet = true;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -1947,6 +2044,9 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 11;
|
||||
rigCaps.spectAmpMax = 160;
|
||||
rigCaps.spectLenMax = 475;
|
||||
rigCaps.inputs.append(inputLAN);
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.inputs.append(inputACC);
|
||||
rigCaps.hasLan = true;
|
||||
rigCaps.hasEthernet = true;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -1959,6 +2059,9 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 15;
|
||||
rigCaps.spectAmpMax = 200;
|
||||
rigCaps.spectLenMax = 689;
|
||||
rigCaps.inputs.append(inputLAN);
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.inputs.append(inputACC);
|
||||
rigCaps.hasLan = true;
|
||||
rigCaps.hasEthernet = true;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -1969,6 +2072,10 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 15;
|
||||
rigCaps.spectAmpMax = 136;
|
||||
rigCaps.spectLenMax = 689;
|
||||
rigCaps.inputs.append(inputLAN);
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.inputs.append(inputACCA);
|
||||
rigCaps.inputs.append(inputACCB);
|
||||
rigCaps.hasLan = true;
|
||||
rigCaps.hasEthernet = true;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -1980,6 +2087,8 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 11;
|
||||
rigCaps.spectAmpMax = 160;
|
||||
rigCaps.spectLenMax = 475;
|
||||
rigCaps.inputs.append(inputLAN);
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.hasLan = true;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = true;
|
||||
|
@ -1987,9 +2096,20 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.hasDV = true;
|
||||
rigCaps.hasATU = true;
|
||||
break;
|
||||
case model7100:
|
||||
rigCaps.modelName = QString("IC-7100");
|
||||
rigCaps.hasSpectrum = false;
|
||||
rigCaps.inputs.append(inputUSB);
|
||||
rigCaps.inputs.append(inputACC);
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasATU = true;
|
||||
break;
|
||||
case model706:
|
||||
rigCaps.modelName = QString("IC-706");
|
||||
rigCaps.hasSpectrum = false;
|
||||
rigCaps.inputs.clear();
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
@ -2001,6 +2121,7 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.spectSeqMax = 0;
|
||||
rigCaps.spectAmpMax = 0;
|
||||
rigCaps.spectLenMax = 0;
|
||||
rigCaps.inputs.clear();
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
|
|
|
@ -15,22 +15,15 @@
|
|||
// note: using a define because switch case doesn't even work with const unsigned char. Surprised me.
|
||||
#define compCivAddr 0xE1
|
||||
|
||||
enum rigInput{ inputMic=0,
|
||||
inputACC=1,
|
||||
inputUSB=3,
|
||||
inputLAN=5,
|
||||
inputACCA,
|
||||
inputACCB,
|
||||
inputUnknown=0xff
|
||||
};
|
||||
|
||||
enum duplexMode{
|
||||
dmSplitOff=0x00,
|
||||
dmSplitOn=0x01,
|
||||
dmSimplex=0x10,
|
||||
dmDupMinus=0x11,
|
||||
dmDupPlus=0x12,
|
||||
dmDupRPS=0x13
|
||||
dmDupRPS=0x13,
|
||||
dmDupAutoOn=0x26,
|
||||
dmDupAutoOff=0x36
|
||||
};
|
||||
|
||||
class rigCommander : public QObject
|
||||
|
@ -89,6 +82,8 @@ public slots:
|
|||
void getUSBGain();
|
||||
void getLANGain();
|
||||
void getACCGain();
|
||||
void getACCGain(unsigned char ab);
|
||||
|
||||
|
||||
void getSMeter();
|
||||
void getRFPowerMeter();
|
||||
|
@ -108,6 +103,8 @@ public slots:
|
|||
void setUSBGain(unsigned char gain);
|
||||
void setLANGain(unsigned char gain);
|
||||
void setACCGain(unsigned char gain);
|
||||
void setACCGain(unsigned char gain, unsigned char ab);
|
||||
|
||||
void setCompLevel(unsigned char compLevel);
|
||||
void setMonitorLevel(unsigned char monitorLevel);
|
||||
void setVoxGain(unsigned char gain);
|
||||
|
@ -116,6 +113,9 @@ public slots:
|
|||
void getModInput(bool dataOn);
|
||||
void setModInput(rigInput input, bool dataOn);
|
||||
|
||||
void setModInputLevel(rigInput input, unsigned char level);
|
||||
void getModInputLevel(rigInput input);
|
||||
|
||||
void startATU();
|
||||
void setATU(bool enabled);
|
||||
void getATUStatus();
|
||||
|
@ -168,6 +168,7 @@ signals:
|
|||
void haveLANGain(unsigned char gain);
|
||||
void haveUSBGain(unsigned char gain);
|
||||
void haveACCGain(unsigned char gain, unsigned char ab);
|
||||
void haveModSrcGain(rigInput input, unsigned char gain);
|
||||
|
||||
void haveSMeter(unsigned char level);
|
||||
void haveRFMeter(unsigned char level);
|
||||
|
@ -215,7 +216,7 @@ private:
|
|||
void sendLevelCmd(unsigned char levAddr, unsigned char level);
|
||||
QByteArray getLANAddr();
|
||||
QByteArray getUSBAddr();
|
||||
QByteArray getACCAddr();
|
||||
QByteArray getACCAddr(unsigned char ab);
|
||||
void setModInput(rigInput input, bool dataOn, bool isQuery);
|
||||
void sendDataOut();
|
||||
void prepDataAndSend(QByteArray data);
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
#include <QtNumeric>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
// Credit:
|
||||
// Credit for parts of CIV list:
|
||||
// http://www.docksideradio.com/Icom%20Radio%20Hex%20Addresses.htm
|
||||
|
||||
// 7850 and 7851 have the same commands and are essentially identical
|
||||
|
@ -25,6 +26,15 @@ enum model_kind {
|
|||
modelUnknown = 0xFF
|
||||
};
|
||||
|
||||
enum rigInput{ inputMic=0,
|
||||
inputACC=1,
|
||||
inputUSB=3,
|
||||
inputLAN=5,
|
||||
inputACCA,
|
||||
inputACCB,
|
||||
inputNone,
|
||||
inputUnknown=0xff
|
||||
};
|
||||
|
||||
model_kind determineRadioModel(unsigned char rigID);
|
||||
|
||||
|
@ -40,6 +50,8 @@ struct rigCapabilities {
|
|||
bool hasEthernet;
|
||||
bool hasWiFi;
|
||||
|
||||
QVector<rigInput> inputs;
|
||||
|
||||
bool hasSpectrum;
|
||||
quint8 spectSeqMax;
|
||||
quint16 spectAmpMax;
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>15</height>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -167,6 +167,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
|
@ -299,7 +305,7 @@
|
|||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderShowSortIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
|
|
400
wfmain.cpp
400
wfmain.cpp
|
@ -275,6 +275,8 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
openRig();
|
||||
|
||||
qRegisterMetaType<rigCapabilities>();
|
||||
qRegisterMetaType<duplexMode>();
|
||||
qRegisterMetaType<rigInput>();
|
||||
|
||||
connect(rig, SIGNAL(haveFrequency(double)), this, SLOT(receiveFreq(double)));
|
||||
connect(this, SIGNAL(getFrequency()), rig, SLOT(getFrequency()));
|
||||
|
@ -294,6 +296,15 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(this, SIGNAL(scopeDisplayEnable()), rig, SLOT(enableSpectrumDisplay()));
|
||||
connect(rig, SIGNAL(haveMode(unsigned char, unsigned char)), this, SLOT(receiveMode(unsigned char, unsigned char)));
|
||||
connect(rig, SIGNAL(haveDataMode(bool)), this, SLOT(receiveDataModeStatus(bool)));
|
||||
|
||||
connect(this, SIGNAL(getDuplexMode()), rig, SLOT(getDuplexMode()));
|
||||
connect(this, SIGNAL(setDuplexMode(duplexMode)), rig, SLOT(setDuplexMode(duplexMode)));
|
||||
connect(rig, SIGNAL(haveDuplexMode(duplexMode)), this, SLOT(receiveDuplexMode(duplexMode)));
|
||||
|
||||
connect(this, SIGNAL(getModInput(bool)), rig, SLOT(getModInput(bool)));
|
||||
connect(rig, SIGNAL(haveModInput(rigInput,bool)), this, SLOT(receiveModInput(rigInput, bool)));
|
||||
connect(this, SIGNAL(setModInput(rigInput, bool)), rig, SLOT(setModInput(rigInput,bool)));
|
||||
|
||||
connect(rig, SIGNAL(haveSpectrumData(QByteArray, double, double)), this, SLOT(receiveSpectrumData(QByteArray, double, double)));
|
||||
connect(rig, SIGNAL(haveSpectrumFixedMode(bool)), this, SLOT(receiveSpectrumFixedMode(bool)));
|
||||
connect(this, SIGNAL(setFrequency(double)), rig, SLOT(setFrequency(double)));
|
||||
|
@ -316,6 +327,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(this, SIGNAL(getTxPower()), rig, SLOT(getTxLevel()));
|
||||
connect(this, SIGNAL(getMicGain()), rig, SLOT(getMicGain()));
|
||||
connect(this, SIGNAL(getSpectrumRefLevel()), rig, SLOT(getSpectrumRefLevel()));
|
||||
connect(this, SIGNAL(getModInputLevel(rigInput)), rig, SLOT(getModInputLevel(rigInput)));
|
||||
|
||||
// Levels: Set:
|
||||
connect(this, SIGNAL(setRfGain(unsigned char)), rig, SLOT(setRfGain(unsigned char)));
|
||||
|
@ -327,7 +339,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(this, SIGNAL(setVoxGain(unsigned char)), rig, SLOT(setVoxGain(unsigned char)));
|
||||
connect(this, SIGNAL(setAntiVoxGain(unsigned char)), rig, SLOT(setAntiVoxGain(unsigned char)));
|
||||
connect(this, SIGNAL(setSpectrumRefLevel(int)), rig, SLOT(setSpectrumRefLevel(int)));
|
||||
|
||||
connect(this, SIGNAL(setModLevel(rigInput,unsigned char)), rig, SLOT(setModInputLevel(rigInput,unsigned char)));
|
||||
|
||||
// Levels: handle return on query:
|
||||
connect(rig, SIGNAL(haveRfGain(unsigned char)), this, SLOT(receiveRfGain(unsigned char)));
|
||||
|
@ -336,6 +348,9 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(rig, SIGNAL(haveTxPower(unsigned char)), this, SLOT(receiveTxPower(unsigned char)));
|
||||
connect(rig, SIGNAL(haveMicGain(unsigned char)), this, SLOT(receiveMicGain(unsigned char)));
|
||||
connect(rig, SIGNAL(haveSpectrumRefLevel(int)), this, SLOT(receiveSpectrumRefLevel(int)));
|
||||
connect(rig, SIGNAL(haveACCGain(unsigned char,unsigned char)), this, SLOT(receiveACCGain(unsigned char,unsigned char)));
|
||||
connect(rig, SIGNAL(haveUSBGain(unsigned char)), this, SLOT(receiveUSBGain(unsigned char)));
|
||||
connect(rig, SIGNAL(haveLANGain(unsigned char)), this, SLOT(receiveLANGain(unsigned char)));
|
||||
|
||||
connect(this, SIGNAL(startATU()), rig, SLOT(startATU()));
|
||||
connect(this, SIGNAL(setATU(bool)), rig, SLOT(setATU(bool)));
|
||||
|
@ -369,7 +384,6 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
// Metering
|
||||
connect(this, SIGNAL(getMeters(bool)), rig, SLOT(getMeters(bool)));
|
||||
|
||||
|
||||
if (serverConfig.enabled && udp != Q_NULLPTR) {
|
||||
// Server
|
||||
connect(rig, SIGNAL(haveDataForServer(QByteArray)), udp, SLOT(dataForServer(QByteArray)));
|
||||
|
@ -436,6 +450,9 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
ui->useDarkThemeChk->setChecked(prefs.useDarkMode);
|
||||
on_useDarkThemeChk_clicked(prefs.useDarkMode);
|
||||
|
||||
ui->useSystemThemeChk->setChecked(prefs.useSystemTheme);
|
||||
on_useSystemThemeChk_clicked(prefs.useSystemTheme);
|
||||
|
||||
ui->drawPeakChk->setChecked(prefs.drawPeaks);
|
||||
on_drawPeakChk_clicked(prefs.drawPeaks);
|
||||
drawPeaks = prefs.drawPeaks;
|
||||
|
@ -621,30 +638,13 @@ void wfmain::receiveFoundRigID(rigCapabilities rigCaps)
|
|||
//now we know what the rig ID is:
|
||||
//qDebug() << "In wfview, we now have a reply to our request for rig identity sent to CIV BROADCAST.";
|
||||
|
||||
// We have to be careful here:
|
||||
// If we enter this a second time, we will get two sets of DV and DD modes
|
||||
// Also, if ever there is a rig with DV but without DV, we'll be off by one.
|
||||
// A better solution is to translate the combo selection to a shared type
|
||||
// such as an enum or even the actual CIV mode byte.
|
||||
|
||||
/*
|
||||
if(rigCaps.hasDV)
|
||||
{
|
||||
ui->modeSelectCombo->addItem("DV");
|
||||
}
|
||||
if(rigCaps.hasDD)
|
||||
{
|
||||
ui->modeSelectCombo->addItem("DD");
|
||||
}
|
||||
*/
|
||||
|
||||
delayedCommand->setInterval(100); // faster polling is ok now.
|
||||
receiveRigID(rigCaps);
|
||||
getInitialRigState();
|
||||
|
||||
QString message = QString("Found model: ").append(rigCaps.modelName);
|
||||
|
||||
ui->statusBar->showMessage(message, 1500);
|
||||
ui->statusBar->showMessage(message, 0);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -666,6 +666,7 @@ void wfmain::setDefPrefs()
|
|||
{
|
||||
defPrefs.useFullScreen = false;
|
||||
defPrefs.useDarkMode = true;
|
||||
defPrefs.useSystemTheme = false;
|
||||
defPrefs.drawPeaks = true;
|
||||
defPrefs.stylesheetPath = QString("qdarkstyle/style.qss");
|
||||
defPrefs.radioCIVAddr = 0x00; // previously was 0x94 for 7300.
|
||||
|
@ -701,6 +702,7 @@ void wfmain::loadSettings()
|
|||
settings.beginGroup("Interface");
|
||||
prefs.useFullScreen = settings.value("UseFullScreen", defPrefs.useFullScreen).toBool();
|
||||
prefs.useDarkMode = settings.value("UseDarkMode", defPrefs.useDarkMode).toBool();
|
||||
prefs.useSystemTheme = settings.value("UseSystemTheme", defPrefs.useSystemTheme).toBool();
|
||||
prefs.drawPeaks = settings.value("DrawPeaks", defPrefs.drawPeaks).toBool();
|
||||
prefs.stylesheetPath = settings.value("StylesheetPath", defPrefs.stylesheetPath).toString();
|
||||
ui->splitter->restoreState(settings.value("splitter").toByteArray());
|
||||
|
@ -869,6 +871,7 @@ void wfmain::saveSettings()
|
|||
// UI: (full screen, dark theme, draw peaks, colors, etc)
|
||||
settings.beginGroup("Interface");
|
||||
settings.setValue("UseFullScreen", prefs.useFullScreen);
|
||||
settings.setValue("UseSystemTheme", prefs.useSystemTheme);
|
||||
settings.setValue("UseDarkMode", prefs.useDarkMode);
|
||||
settings.setValue("DrawPeaks", prefs.drawPeaks);
|
||||
settings.setValue("StylesheetPath", prefs.stylesheetPath);
|
||||
|
@ -1231,18 +1234,26 @@ void wfmain:: getInitialRigState()
|
|||
cmdOutQue.append(cmdGetFreq);
|
||||
cmdOutQue.append(cmdGetMode);
|
||||
|
||||
// From left to right in the UI:
|
||||
cmdOutQue.append(cmdGetDataMode);
|
||||
cmdOutQue.append(cmdGetModInput);
|
||||
cmdOutQue.append(cmdGetModDataInput);
|
||||
cmdOutQue.append(cmdGetRxGain);
|
||||
cmdOutQue.append(cmdGetAfGain);
|
||||
cmdOutQue.append(cmdGetSql);
|
||||
cmdOutQue.append(cmdGetSpectrumRefLevel);
|
||||
|
||||
cmdOutQue.append(cmdGetTxPower);
|
||||
cmdOutQue.append(cmdGetMicGain);
|
||||
cmdOutQue.append(cmdGetCurrentModLevel); // level for currently selected mod sources
|
||||
cmdOutQue.append(cmdGetSpectrumRefLevel);
|
||||
cmdOutQue.append(cmdGetDuplexMode);
|
||||
|
||||
cmdOutQue.append(cmdDispEnable);
|
||||
cmdOutQue.append(cmdSpecOn);
|
||||
|
||||
cmdOutQue.append(cmdGetModInput);
|
||||
cmdOutQue.append(cmdGetModDataInput);
|
||||
|
||||
cmdOutQue.append(cmdNone);
|
||||
|
||||
if(rigCaps.hasATU)
|
||||
{
|
||||
cmdOutQue.append(cmdGetATUStatus);
|
||||
|
@ -1258,15 +1269,21 @@ void wfmain::showStatusBarText(QString text)
|
|||
|
||||
void wfmain::on_useDarkThemeChk_clicked(bool checked)
|
||||
{
|
||||
setAppTheme(checked);
|
||||
//setAppTheme(checked);
|
||||
setPlotTheme(wf, checked);
|
||||
setPlotTheme(plot, checked);
|
||||
prefs.useDarkMode = checked;
|
||||
}
|
||||
|
||||
void wfmain::setAppTheme(bool isDark)
|
||||
void wfmain::on_useSystemThemeChk_clicked(bool checked)
|
||||
{
|
||||
if(isDark)
|
||||
setAppTheme(!checked);
|
||||
prefs.useSystemTheme = checked;
|
||||
}
|
||||
|
||||
void wfmain::setAppTheme(bool isCustom)
|
||||
{
|
||||
if(isCustom)
|
||||
{
|
||||
// QFile f(":qdarkstyle/style.qss"); // built-in resource
|
||||
QFile f("/usr/share/wfview/stylesheets/" + prefs.stylesheetPath);
|
||||
|
@ -1409,6 +1426,19 @@ void wfmain::runDelayedCommand()
|
|||
case cmdSetDataModeOn:
|
||||
emit setDataMode(true);
|
||||
break;
|
||||
case cmdGetModInput:
|
||||
emit getModInput(false);
|
||||
break;
|
||||
case cmdGetModDataInput:
|
||||
emit getModInput(true);
|
||||
break;
|
||||
case cmdGetCurrentModLevel:
|
||||
emit getModInputLevel(currentModSrc);
|
||||
emit getModInputLevel(currentModDataSrc);
|
||||
break;
|
||||
case cmdGetDuplexMode:
|
||||
emit getDuplexMode();
|
||||
break;
|
||||
case cmdDispEnable:
|
||||
emit scopeDisplayEnable();
|
||||
break;
|
||||
|
@ -1523,6 +1553,42 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
|
|||
ui->satOpsBtn->setDisabled(true);
|
||||
ui->adjRefBtn->setDisabled(true);
|
||||
}
|
||||
QString inName;
|
||||
for(int i=0; i < rigCaps.inputs.length(); i++)
|
||||
{
|
||||
switch(rigCaps.inputs.at(i))
|
||||
{
|
||||
case inputMic:
|
||||
inName = "Mic";
|
||||
break;
|
||||
case inputLAN:
|
||||
inName = "LAN";
|
||||
break;
|
||||
case inputUSB:
|
||||
inName = "USB";
|
||||
break;
|
||||
case inputACC:
|
||||
inName = "ACC";
|
||||
break;
|
||||
case inputACCA:
|
||||
inName = "ACCA";
|
||||
break;
|
||||
case inputACCB:
|
||||
inName = "ACCB";
|
||||
break;
|
||||
default:
|
||||
inName = "Unknown";
|
||||
break;
|
||||
|
||||
}
|
||||
ui->modInputCombo->addItem(inName, rigCaps.inputs.at(i));
|
||||
ui->modInputDataCombo->addItem(inName, rigCaps.inputs.at(i));
|
||||
}
|
||||
if(rigCaps.inputs.length() == 0)
|
||||
{
|
||||
ui->modInputCombo->addItem("None", inputNone);
|
||||
ui->modInputDataCombo->addItem("None", inputNone);
|
||||
}
|
||||
|
||||
ui->tuneEnableChk->setEnabled(rigCaps.hasATU);
|
||||
ui->tuneNowBtn->setEnabled(rigCaps.hasATU);
|
||||
|
@ -1830,6 +1896,8 @@ void wfmain::receiveDataModeStatus(bool dataEnabled)
|
|||
ui->dataModeBtn->blockSignals(true);
|
||||
ui->dataModeBtn->setChecked(dataEnabled);
|
||||
ui->dataModeBtn->blockSignals(false);
|
||||
|
||||
usingDataMode = dataEnabled;
|
||||
}
|
||||
|
||||
void wfmain::on_clearPeakBtn_clicked()
|
||||
|
@ -2619,6 +2687,13 @@ void wfmain::on_modeFilterCombo_activated(int index)
|
|||
void wfmain::on_dataModeBtn_toggled(bool checked)
|
||||
{
|
||||
setDataMode(checked);
|
||||
usingDataMode = checked;
|
||||
if(usingDataMode)
|
||||
{
|
||||
changeModLabelAndSlider(currentModDataSrc);
|
||||
} else {
|
||||
changeModLabelAndSlider(currentModSrc);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::on_transmitBtn_clicked()
|
||||
|
@ -2674,33 +2749,135 @@ void wfmain::receiveTxPower(unsigned char power)
|
|||
|
||||
void wfmain::receiveMicGain(unsigned char gain)
|
||||
{
|
||||
changeSliderQuietly(ui->micGainSlider, gain);
|
||||
processModLevel(inputMic, gain);
|
||||
}
|
||||
|
||||
void wfmain::receiveModInput(rigInput input)
|
||||
void wfmain::processModLevel(rigInput source, unsigned char level)
|
||||
{
|
||||
(void)input;
|
||||
rigInput currentIn;
|
||||
if(usingDataMode)
|
||||
{
|
||||
currentIn = currentModDataSrc;
|
||||
} else {
|
||||
currentIn = currentModSrc;
|
||||
}
|
||||
|
||||
switch(source)
|
||||
{
|
||||
case inputMic:
|
||||
micGain = level;
|
||||
break;
|
||||
case inputACC:
|
||||
accGain = level;
|
||||
break;
|
||||
|
||||
case inputACCA:
|
||||
accAGain = level;
|
||||
break;
|
||||
|
||||
case inputACCB:
|
||||
accBGain = level;
|
||||
break;
|
||||
|
||||
case inputUSB:
|
||||
usbGain = level;
|
||||
break;
|
||||
|
||||
case inputLAN:
|
||||
lanGain = level;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(currentIn == source)
|
||||
{
|
||||
changeSliderQuietly(ui->micGainSlider, level);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void wfmain::receiveModInput(rigInput input, bool dataOn)
|
||||
{
|
||||
QComboBox *box;
|
||||
QString inputName;
|
||||
bool found;
|
||||
bool foundCurrent = false;
|
||||
|
||||
if(dataOn)
|
||||
{
|
||||
box = ui->modInputDataCombo;
|
||||
currentModDataSrc = input;
|
||||
if(usingDataMode)
|
||||
foundCurrent = true;
|
||||
} else {
|
||||
box = ui->modInputCombo;
|
||||
currentModSrc = input;
|
||||
if(!usingDataMode)
|
||||
foundCurrent = true;
|
||||
}
|
||||
|
||||
for(int i=0; i < box->count(); i++)
|
||||
{
|
||||
if(box->itemData(i).toInt() == (int)input)
|
||||
{
|
||||
box->blockSignals(true);
|
||||
box->setCurrentIndex(i);
|
||||
box->blockSignals(false);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(foundCurrent)
|
||||
{
|
||||
changeModLabel(input);
|
||||
}
|
||||
if(!found)
|
||||
qDebug() << "Could not find modulation input: " << (int)input;
|
||||
}
|
||||
|
||||
void wfmain::receiveDuplexMode(duplexMode dm)
|
||||
{
|
||||
switch(dm)
|
||||
{
|
||||
case dmSimplex:
|
||||
ui->rptSimplexBtn->setChecked(true);
|
||||
break;
|
||||
case dmDupPlus:
|
||||
ui->rptDupPlusBtn->setChecked(true);
|
||||
break;
|
||||
case dmDupMinus:
|
||||
ui->rptDupMinusBtn->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
(void)dm;
|
||||
}
|
||||
|
||||
void wfmain::receiveACCGain(unsigned char level, unsigned char ab)
|
||||
{
|
||||
(void)level;
|
||||
(void)ab;
|
||||
if(ab==1)
|
||||
{
|
||||
processModLevel(inputACCB, level);
|
||||
} else {
|
||||
if(rigCaps.model == model7850)
|
||||
{
|
||||
processModLevel(inputACCA, level);
|
||||
} else {
|
||||
processModLevel(inputACC, level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::receiveUSBGain(unsigned char level)
|
||||
{
|
||||
(void)level;
|
||||
processModLevel(inputUSB, level);
|
||||
}
|
||||
|
||||
void wfmain::receiveLANGain(unsigned char level)
|
||||
{
|
||||
(void)level;
|
||||
processModLevel(inputLAN, level);
|
||||
}
|
||||
|
||||
void wfmain::receiveCompLevel(unsigned char compLevel)
|
||||
|
@ -2730,7 +2907,7 @@ void wfmain::on_txPowerSlider_valueChanged(int value)
|
|||
|
||||
void wfmain::on_micGainSlider_valueChanged(int value)
|
||||
{
|
||||
emit setMicGain(value);
|
||||
processChangingCurrentModLevel((unsigned char) value);
|
||||
}
|
||||
|
||||
void wfmain::on_scopeRefLevelSlider_valueChanged(int value)
|
||||
|
@ -2744,23 +2921,6 @@ void wfmain::receiveSpectrumRefLevel(int level)
|
|||
changeSliderQuietly(ui->scopeRefLevelSlider, level);
|
||||
}
|
||||
|
||||
// --- DEBUG FUNCTION ---
|
||||
void wfmain::on_debugBtn_clicked()
|
||||
{
|
||||
qDebug() << "Debug button pressed.";
|
||||
|
||||
// TODO: Why don't these commands work?!
|
||||
//emit getScopeMode();
|
||||
//emit getScopeEdge(); // 1,2,3 only in "fixed" mode
|
||||
//emit getScopeSpan(); // in khz, only in "center" mode
|
||||
|
||||
// emit getLevels();
|
||||
// emit getMeters(amTransmitting);
|
||||
|
||||
emit getSpectrumRefLevel();
|
||||
|
||||
}
|
||||
|
||||
// Slot to send/receive server config.
|
||||
// If store is true then write to config otherwise send current config by signal
|
||||
void wfmain::serverConfigRequested(SERVERCONFIG conf, bool store)
|
||||
|
@ -2777,3 +2937,141 @@ void wfmain::serverConfigRequested(SERVERCONFIG conf, bool store)
|
|||
|
||||
}
|
||||
|
||||
|
||||
void wfmain::on_rptDupPlusBtn_clicked()
|
||||
{
|
||||
// DUP+
|
||||
emit setDuplexMode(dmDupAutoOff);
|
||||
emit setDuplexMode(dmDupPlus);
|
||||
}
|
||||
|
||||
void wfmain::on_rptSimplexBtn_clicked()
|
||||
{
|
||||
// Simplex
|
||||
emit setDuplexMode(dmDupAutoOff);
|
||||
emit setDuplexMode(dmSimplex);
|
||||
}
|
||||
|
||||
void wfmain::on_rptDupMinusBtn_clicked()
|
||||
{
|
||||
// DUP-
|
||||
emit setDuplexMode(dmDupAutoOff);
|
||||
emit setDuplexMode(dmDupMinus);
|
||||
}
|
||||
|
||||
void wfmain::on_rptAutoBtn_clicked()
|
||||
{
|
||||
// Auto Rptr (enable this feature)
|
||||
// TODO: Hide an AutoOff button somewhere for non-US users
|
||||
emit setDuplexMode(dmDupAutoOn);
|
||||
}
|
||||
|
||||
void wfmain::on_modInputCombo_activated(int index)
|
||||
{
|
||||
emit setModInput( (rigInput)ui->modInputCombo->currentData().toInt(), false );
|
||||
currentModSrc = (rigInput)ui->modInputCombo->currentData().toInt();
|
||||
issueDelayedCommand(cmdGetCurrentModLevel);
|
||||
if(!usingDataMode)
|
||||
{
|
||||
changeModLabel(currentModSrc);
|
||||
}
|
||||
(void)index;
|
||||
}
|
||||
|
||||
void wfmain::on_modInputDataCombo_activated(int index)
|
||||
{
|
||||
emit setModInput( (rigInput)ui->modInputDataCombo->currentData().toInt(), true );
|
||||
currentModDataSrc = (rigInput)ui->modInputDataCombo->currentData().toInt();
|
||||
issueDelayedCommand(cmdGetCurrentModLevel);
|
||||
if(usingDataMode)
|
||||
{
|
||||
changeModLabel(currentModDataSrc);
|
||||
}
|
||||
(void)index;
|
||||
}
|
||||
|
||||
|
||||
void wfmain::changeModLabelAndSlider(rigInput source)
|
||||
{
|
||||
changeModLabel(source, true);
|
||||
}
|
||||
|
||||
void wfmain::changeModLabel(rigInput input)
|
||||
{
|
||||
changeModLabel(input, false);
|
||||
}
|
||||
|
||||
|
||||
void wfmain::changeModLabel(rigInput input, bool updateLevel)
|
||||
{
|
||||
QString inputName;
|
||||
unsigned char gain = 0;
|
||||
|
||||
switch(input)
|
||||
{
|
||||
case inputMic:
|
||||
inputName = "Mic";
|
||||
gain = micGain;
|
||||
break;
|
||||
case inputACC:
|
||||
inputName = "ACC";
|
||||
gain = accGain;
|
||||
break;
|
||||
case inputACCA:
|
||||
inputName = "ACCA";
|
||||
gain = accAGain;
|
||||
break;
|
||||
case inputACCB:
|
||||
inputName = "ACCB";
|
||||
gain = accBGain;
|
||||
break;
|
||||
case inputUSB:
|
||||
inputName = "USB";
|
||||
gain = usbGain;
|
||||
break;
|
||||
case inputLAN:
|
||||
inputName = "LAN";
|
||||
gain = lanGain;
|
||||
break;
|
||||
default:
|
||||
inputName = "UNK";
|
||||
gain=0;
|
||||
break;
|
||||
}
|
||||
ui->modSliderLbl->setText(inputName);
|
||||
if(updateLevel)
|
||||
{
|
||||
changeSliderQuietly(ui->micGainSlider, gain);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::processChangingCurrentModLevel(unsigned char level)
|
||||
{
|
||||
// slider moved, so find the current mod and issue the level set command.
|
||||
rigInput currentIn;
|
||||
if(usingDataMode)
|
||||
{
|
||||
currentIn = currentModDataSrc;
|
||||
} else {
|
||||
currentIn = currentModSrc;
|
||||
}
|
||||
qDebug() << __func__ << ": setting current level: " << level;
|
||||
|
||||
emit setModLevel(currentIn, level);
|
||||
}
|
||||
|
||||
// --- DEBUG FUNCTION ---
|
||||
void wfmain::on_debugBtn_clicked()
|
||||
{
|
||||
qDebug() << "Debug button pressed.";
|
||||
|
||||
// TODO: Why don't these commands work?!
|
||||
//emit getScopeMode();
|
||||
//emit getScopeEdge(); // 1,2,3 only in "fixed" mode
|
||||
//emit getScopeSpan(); // in khz, only in "center" mode
|
||||
|
||||
// emit getLevels();
|
||||
// emit getMeters(amTransmitting);
|
||||
|
||||
// emit getTSQL();
|
||||
}
|
||||
|
|
61
wfmain.h
61
wfmain.h
|
@ -46,7 +46,9 @@ signals:
|
|||
void setDataMode(bool dataOn);
|
||||
void getDataMode();
|
||||
void getDuplexMode();
|
||||
void getModInput();
|
||||
void setDuplexMode(duplexMode dm);
|
||||
void getModInput(bool dataOn);
|
||||
void setModInput(rigInput input, bool dataOn);
|
||||
void getPTT();
|
||||
void setPTT(bool pttOn);
|
||||
void getBandStackReg(char band, char regCode);
|
||||
|
@ -60,6 +62,7 @@ signals:
|
|||
void getTxPower();
|
||||
void getMicGain();
|
||||
void getSpectrumRefLevel();
|
||||
void getModInputLevel(rigInput input);
|
||||
|
||||
// Level set:
|
||||
void setRfGain(unsigned char level);
|
||||
|
@ -72,9 +75,18 @@ signals:
|
|||
void setVoxGain(unsigned char);
|
||||
void setAntiVoxGain(unsigned char);
|
||||
void setSpectrumRefLevel(int);
|
||||
|
||||
void setModLevel(rigInput input, unsigned char level);
|
||||
void setACCGain(unsigned char level);
|
||||
void setACCAGain(unsigned char level);
|
||||
void setACCBGain(unsigned char level);
|
||||
void setUSBGain(unsigned char level);
|
||||
void setLANGain(unsigned char level);
|
||||
|
||||
void getMeters(bool isTransmitting);
|
||||
|
||||
|
||||
|
||||
void startATU();
|
||||
void setATU(bool atuEnabled);
|
||||
void getATUStatus();
|
||||
|
@ -148,7 +160,7 @@ private slots:
|
|||
void receivePTTstatus(bool pttOn);
|
||||
void receiveDataModeStatus(bool dataOn);
|
||||
void receiveBandStackReg(float freq, char mode, bool dataOn); // freq, mode, (filter,) datamode
|
||||
void receiveModInput(rigInput input);
|
||||
void receiveModInput(rigInput input, bool dataOn);
|
||||
void receiveDuplexMode(duplexMode dm);
|
||||
|
||||
|
||||
|
@ -345,6 +357,20 @@ private slots:
|
|||
|
||||
void on_scopeRefLevelSlider_valueChanged(int value);
|
||||
|
||||
void on_rptDupPlusBtn_clicked();
|
||||
|
||||
void on_rptSimplexBtn_clicked();
|
||||
|
||||
void on_rptDupMinusBtn_clicked();
|
||||
|
||||
void on_rptAutoBtn_clicked();
|
||||
|
||||
void on_useSystemThemeChk_clicked(bool checked);
|
||||
|
||||
void on_modInputCombo_activated(int index);
|
||||
|
||||
void on_modInputDataCombo_activated(int index);
|
||||
|
||||
private:
|
||||
Ui::wfmain *ui;
|
||||
QSettings settings;
|
||||
|
@ -354,7 +380,7 @@ private:
|
|||
QCustomPlot *wf; // waterfall image
|
||||
QCPItemTracer * tracer; // marker of current frequency
|
||||
//commHandler *comm;
|
||||
void setAppTheme(bool isDark);
|
||||
void setAppTheme(bool isCustom);
|
||||
void setPlotTheme(QCustomPlot *plot, bool isDark);
|
||||
void prepareWf();
|
||||
void getInitialRigState();
|
||||
|
@ -437,7 +463,8 @@ private:
|
|||
enum cmds {cmdNone, cmdGetRigID, cmdGetRigCIV, cmdGetFreq, cmdGetMode, cmdGetDataMode, cmdSetDataModeOn, cmdSetDataModeOff,
|
||||
cmdSpecOn, cmdSpecOff, cmdDispEnable, cmdDispDisable, cmdGetRxGain, cmdGetAfGain,
|
||||
cmdGetSql, cmdGetATUStatus, cmdScopeCenterMode, cmdScopeFixedMode, cmdGetPTT,
|
||||
cmdGetTxPower, cmdGetMicGain, cmdGetSpectrumRefLevel};
|
||||
cmdGetTxPower, cmdGetMicGain, cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
|
||||
cmdGetCurrentModLevel};
|
||||
cmds cmdOut;
|
||||
QVector <cmds> cmdOutQue;
|
||||
freqMemory mem;
|
||||
|
@ -467,6 +494,7 @@ private:
|
|||
struct preferences {
|
||||
bool useFullScreen;
|
||||
bool useDarkMode;
|
||||
bool useSystemTheme;
|
||||
bool drawPeaks;
|
||||
bool drawTracer;
|
||||
QString stylesheetPath;
|
||||
|
@ -503,14 +531,35 @@ private:
|
|||
void issueDelayedCommandPriority(cmds cmd);
|
||||
void changeSliderQuietly(QSlider *slider, int value);
|
||||
|
||||
void processModLevel(rigInput source, unsigned char level);
|
||||
|
||||
void processChangingCurrentModLevel(unsigned char level);
|
||||
|
||||
void changeModLabel(rigInput source);
|
||||
void changeModLabel(rigInput source, bool updateLevel);
|
||||
|
||||
void changeModLabelAndSlider(rigInput source);
|
||||
|
||||
|
||||
void changeMode(mode_kind mode);
|
||||
void changeMode(mode_kind mode, bool dataOn);
|
||||
|
||||
int oldFreqDialVal;
|
||||
|
||||
rigCapabilities rigCaps;
|
||||
rigInput currentModSrc = inputUnknown;
|
||||
rigInput currentModDataSrc = inputUnknown;
|
||||
|
||||
bool haveRigCaps;
|
||||
bool amTransmitting;
|
||||
bool usingDataMode = false;
|
||||
|
||||
unsigned char micGain=0;
|
||||
unsigned char accAGain=0;
|
||||
unsigned char accBGain=0;
|
||||
unsigned char accGain=0;
|
||||
unsigned char usbGain=0;
|
||||
unsigned char lanGain=0;
|
||||
|
||||
calibrationWindow *cal;
|
||||
satelliteSetup *sat;
|
||||
|
@ -528,7 +577,9 @@ private:
|
|||
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(struct rigCapabilities) ;
|
||||
Q_DECLARE_METATYPE(struct rigCapabilities)
|
||||
Q_DECLARE_METATYPE(enum rigInput)
|
||||
Q_DECLARE_METATYPE(enum duplexMode)
|
||||
|
||||
|
||||
#endif // WFMAIN_H
|
||||
|
|
29
wfmain.ui
29
wfmain.ui
|
@ -513,7 +513,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_24">
|
||||
<widget class="QLabel" name="modSliderLbl">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
|
@ -610,6 +610,9 @@
|
|||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">duplexBtnGrp</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -617,6 +620,9 @@
|
|||
<property name="text">
|
||||
<string>Dup+</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">duplexBtnGrp</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -624,6 +630,9 @@
|
|||
<property name="text">
|
||||
<string>Dup-</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">duplexBtnGrp</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -631,6 +640,9 @@
|
|||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">duplexBtnGrp</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -1435,7 +1447,7 @@
|
|||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<widget class="QCheckBox" name="useSystemThemeChk">
|
||||
<property name="text">
|
||||
<string>Use System Theme</string>
|
||||
</property>
|
||||
|
@ -1499,6 +1511,16 @@
|
|||
<item>
|
||||
<widget class="QComboBox" name="modInputCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_29">
|
||||
<property name="text">
|
||||
<string>Data Mod Input:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="modInputDataCombo"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="tuneEnableChk">
|
||||
<property name="text">
|
||||
|
@ -1937,4 +1959,7 @@
|
|||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="duplexBtnGrp"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
Ładowanie…
Reference in New Issue