kopia lustrzana https://gitlab.com/eliggett/wfview
Merge remote-tracking branch 'origin/ui-enhance' into lan-alpha
commit
ba60181c69
22
freqmemory.h
22
freqmemory.h
|
@ -9,16 +9,18 @@
|
|||
// modes << "FM" << "CW-R" << "RTTY-R" << "LSB-D" << "USB-D";
|
||||
|
||||
enum mode_kind {
|
||||
modeLSB=0,
|
||||
modeUSB,
|
||||
modeAM,
|
||||
modeCW,
|
||||
modeRTTY,
|
||||
modeFM,
|
||||
modeCW_R,
|
||||
modeRTTY_R,
|
||||
modeLSB_D,
|
||||
modeUSB_D
|
||||
modeLSB=0x00,
|
||||
modeUSB=0x01,
|
||||
modeAM=0x02,
|
||||
modeCW=0x03,
|
||||
modeRTTY=0x04,
|
||||
modeFM=0x05,
|
||||
modeCW_R=0x07,
|
||||
modeRTTY_R=0x08,
|
||||
modeLSB_D=0x80,
|
||||
modeUSB_D=0x81,
|
||||
modeDV=0x17,
|
||||
modeDD=0x27
|
||||
};
|
||||
|
||||
struct preset_kind {
|
||||
|
|
496
rigcommander.cpp
496
rigcommander.cpp
|
@ -547,6 +547,39 @@ void rigCommander::getDataMode()
|
|||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setDuplexMode(duplexMode dm)
|
||||
{
|
||||
QByteArray payload;
|
||||
payload.setRawData("\x0F", 1);
|
||||
payload.append((unsigned char) dm);
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::getDuplexMode()
|
||||
{
|
||||
QByteArray payload;
|
||||
payload.setRawData("\x0F\x00", 2);
|
||||
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);
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void rigCommander::getPTT()
|
||||
{
|
||||
QByteArray payload;
|
||||
|
@ -770,6 +803,9 @@ void rigCommander::parseCommand()
|
|||
//qDebug() << "Have mode data";
|
||||
this->parseMode();
|
||||
break;
|
||||
case '\x0F':
|
||||
emit haveDuplexMode((duplexMode)(unsigned char)payloadIn[1]);
|
||||
break;
|
||||
case '\x14':
|
||||
// read levels
|
||||
parseLevels();
|
||||
|
@ -964,12 +1000,136 @@ void rigCommander::setMicGain(unsigned char gain)
|
|||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setUSBGain(unsigned char gain)
|
||||
void rigCommander::getModInput(bool dataOn)
|
||||
{
|
||||
setModInput(inputMic, dataOn, true);
|
||||
}
|
||||
|
||||
void rigCommander::setModInput(rigInput input, bool dataOn)
|
||||
{
|
||||
setModInput(input, dataOn, false);
|
||||
}
|
||||
|
||||
void rigCommander::setModInput(rigInput input, bool dataOn, bool isQuery)
|
||||
{
|
||||
// The input enum is as follows:
|
||||
|
||||
// inputMic=0,
|
||||
// inputACC=1,
|
||||
// inputUSB=3,
|
||||
// inputLAN=5,
|
||||
// inputACCA,
|
||||
// inputACCB};
|
||||
|
||||
QByteArray payload;
|
||||
QByteArray inAsByte;
|
||||
|
||||
if(isQuery)
|
||||
input = inputMic;
|
||||
|
||||
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case model9700:
|
||||
payload.setRawData("\x1A\x05\x01\x15", 4);
|
||||
payload.append((unsigned char)input);
|
||||
break;
|
||||
case model7610:
|
||||
payload.setRawData("\x1A\x05\x00\x91", 4);
|
||||
payload.append((unsigned char)input);
|
||||
break;
|
||||
case model7300:
|
||||
payload.setRawData("\x1A\x05\x00\x66", 4);
|
||||
payload.append((unsigned char)input);
|
||||
break;
|
||||
case model7850:
|
||||
payload.setRawData("\x1A\x05\x00\x63", 4);
|
||||
switch(input)
|
||||
{
|
||||
case inputMic:
|
||||
inAsByte.setRawData("\x00", 1);
|
||||
break;
|
||||
case inputACCA:
|
||||
inAsByte.setRawData("\x01", 1);
|
||||
break;
|
||||
case inputACCB:
|
||||
inAsByte.setRawData("\x02", 1);
|
||||
break;
|
||||
case inputUSB:
|
||||
inAsByte.setRawData("\x08", 1);
|
||||
break;
|
||||
case inputLAN:
|
||||
inAsByte.setRawData("\x09", 1);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
}
|
||||
payload.append(inAsByte);
|
||||
break;
|
||||
case model705:
|
||||
payload.setRawData("\x1A\x05\x01\x18", 4);
|
||||
switch(input)
|
||||
{
|
||||
case inputMic:
|
||||
inAsByte.setRawData("\x00", 1);
|
||||
break;
|
||||
case inputUSB:
|
||||
inAsByte.setRawData("\x01", 1);
|
||||
break;
|
||||
case inputLAN: // WLAN
|
||||
inAsByte.setRawData("\x03", 1);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
payload.append(inAsByte);
|
||||
break;
|
||||
case model7700:
|
||||
payload.setRawData("\x1A\x05\x00\x32", 4);
|
||||
if(input==inputLAN)
|
||||
{
|
||||
// NOTE: CIV manual says data may range from 0 to 3
|
||||
// But data 0x04 does correspond to LAN.
|
||||
payload.append("\x04");
|
||||
} else {
|
||||
payload.append((unsigned char)input);
|
||||
}
|
||||
break;
|
||||
case model7600:
|
||||
payload.setRawData("\x1A\x05\x00\x30", 4);
|
||||
payload.append((unsigned char)input);
|
||||
break;
|
||||
case model7100:
|
||||
payload.setRawData("\x1A\x05\x00\x90", 4);
|
||||
payload.append((unsigned char)input);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(dataOn)
|
||||
{
|
||||
payload[3] = payload[3] + 1;
|
||||
}
|
||||
|
||||
if(isQuery)
|
||||
{
|
||||
payload.truncate(4);
|
||||
}
|
||||
|
||||
prepDataAndSend(payload);
|
||||
|
||||
}
|
||||
|
||||
QByteArray rigCommander::getUSBAddr()
|
||||
{
|
||||
QByteArray payload;
|
||||
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case model705:
|
||||
payload.setRawData("\x1A\x05\x01\x16", 4);
|
||||
break;
|
||||
case model9700:
|
||||
payload.setRawData("\x1A\x05\x01\x13", 4);
|
||||
break;
|
||||
|
@ -987,24 +1147,102 @@ void rigCommander::setUSBGain(unsigned char gain)
|
|||
payload.setRawData("\x1A\x05\x00\x29", 4);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
break;
|
||||
}
|
||||
return payload;
|
||||
}
|
||||
|
||||
void rigCommander::getUSBGain()
|
||||
{
|
||||
QByteArray payload = getUSBAddr();
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
||||
void rigCommander::setUSBGain(unsigned char gain)
|
||||
{
|
||||
QByteArray payload = getUSBAddr();
|
||||
payload.append(bcdEncodeInt(gain));
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
QByteArray rigCommander::getLANAddr()
|
||||
{
|
||||
QByteArray payload;
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case model705:
|
||||
payload.setRawData("\x1A\x05\x01\x17", 4);
|
||||
break;
|
||||
case model9700:
|
||||
payload.setRawData("\x1A\x05\x01\x14", 4);
|
||||
break;
|
||||
case model7610:
|
||||
payload.setRawData("\x1A\x05\x00\x90", 4);
|
||||
break;
|
||||
case model7850:
|
||||
payload.setRawData("\x1A\x05\x00\x62", 4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return payload;
|
||||
}
|
||||
|
||||
void rigCommander::getLANGain()
|
||||
{
|
||||
QByteArray payload = getLANAddr();
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setLANGain(unsigned char gain)
|
||||
{
|
||||
QByteArray payload("\x1A\x05\x01\x14");
|
||||
|
||||
|
||||
QByteArray payload = getLANAddr();
|
||||
payload.append(bcdEncodeInt(gain));
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
QByteArray rigCommander::getACCAddr()
|
||||
{
|
||||
QByteArray payload;
|
||||
|
||||
// Note: the manual for the IC-7600 does not call out a
|
||||
// register to adjust the ACC gain.
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case model9700:
|
||||
payload.setRawData("\x1A\x05\x01\x12", 4);
|
||||
break;
|
||||
case model7100:
|
||||
payload.setRawData("\x1A\x05\x00\x87", 4);
|
||||
break;
|
||||
case model7610:
|
||||
payload.setRawData("\x1A\x05\x00\x88", 4);
|
||||
break;
|
||||
case model7300:
|
||||
payload.setRawData("\x1A\x05\x00\x64", 4);
|
||||
break;
|
||||
case model7850:
|
||||
// Note: 0x58 = ACC-A, 0x59 = ACC-B
|
||||
payload.setRawData("\x1A\x05\x00\x58", 4);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return payload;
|
||||
}
|
||||
|
||||
void rigCommander::getACCGain()
|
||||
{
|
||||
QByteArray payload = getACCAddr();
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
void rigCommander::setACCGain(unsigned char gain)
|
||||
{
|
||||
QByteArray payload("\x1A\x05\x01\x12");
|
||||
QByteArray payload = getACCAddr();
|
||||
payload.append(bcdEncodeInt(gain));
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
@ -1272,9 +1510,6 @@ void rigCommander::parsePTT()
|
|||
{
|
||||
// read after payloadIn[02]
|
||||
|
||||
// Because I'm not sure about this:
|
||||
qDebug() << "PTT status received, here is the hex dump:";
|
||||
printHex(payloadIn, false, true);
|
||||
if(payloadIn[2] == (char)0)
|
||||
{
|
||||
// PTT off
|
||||
|
@ -1365,18 +1600,238 @@ void rigCommander::parseDetailedRegisters1A05()
|
|||
// 02 and 03 make up a BCD'd number:
|
||||
// 0001, 0002, 0003, ... 0101, 0102, 0103...
|
||||
|
||||
// 04 is a typical single byte response
|
||||
// 04 05 is a typical 0-255 response
|
||||
|
||||
// This file processes the registers which are radically different in each model.
|
||||
// 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 subcmd = bcdHexToUChar(payloadIn[3]) + (10*bcdHexToUChar(payloadIn[2]));
|
||||
|
||||
switch(subcmd)
|
||||
rigInput input;
|
||||
input = (rigInput)bcdHexToUChar(payloadIn[4]);
|
||||
int inputRaw = bcdHexToUChar(payloadIn[4]);
|
||||
|
||||
switch(rigCaps.model)
|
||||
{
|
||||
case 72:
|
||||
// course reference
|
||||
emit haveRefAdjustCourse( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
break;
|
||||
case 73:
|
||||
// fine reference
|
||||
emit haveRefAdjustFine( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
case model9700:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 72:
|
||||
// course reference
|
||||
emit haveRefAdjustCourse( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
break;
|
||||
case 73:
|
||||
// fine reference
|
||||
emit haveRefAdjustFine( bcdHexToUChar(payloadIn[5]) + (100*bcdHexToUChar(payloadIn[4])) );
|
||||
break;
|
||||
case 112:
|
||||
emit haveACCGain(level, 0);
|
||||
break;
|
||||
case 113:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 114:
|
||||
emit haveLANGain(level);
|
||||
break;
|
||||
case 115:
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 116:
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case model7850:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 63:
|
||||
switch(inputRaw)
|
||||
{
|
||||
case 0:
|
||||
input = inputMic;
|
||||
break;
|
||||
case 1:
|
||||
input = inputACCA;
|
||||
break;
|
||||
case 2:
|
||||
input = inputACCB;
|
||||
break;
|
||||
case 8:
|
||||
input = inputUSB;
|
||||
break;
|
||||
case 9:
|
||||
input = inputLAN;
|
||||
break;
|
||||
default:
|
||||
input = inputUnknown;
|
||||
break;
|
||||
}
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 64:
|
||||
switch(inputRaw)
|
||||
{
|
||||
case 0:
|
||||
input = inputMic;
|
||||
break;
|
||||
case 1:
|
||||
input = inputACCA;
|
||||
break;
|
||||
case 2:
|
||||
input = inputACCB;
|
||||
break;
|
||||
case 8:
|
||||
input = inputUSB;
|
||||
break;
|
||||
case 9:
|
||||
input = inputLAN;
|
||||
break;
|
||||
default:
|
||||
input = inputUnknown;
|
||||
break;
|
||||
}
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
case 58:
|
||||
emit haveACCGain(level, 0);
|
||||
break;
|
||||
case 59:
|
||||
emit haveACCGain(level, 1);
|
||||
break;
|
||||
case 61:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 62:
|
||||
emit haveLANGain(level);
|
||||
break;
|
||||
}
|
||||
case model7610:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 91:
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 92:
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
case 88:
|
||||
emit haveACCGain(level, 0);
|
||||
break;
|
||||
case 89:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 90:
|
||||
emit haveLANGain(level);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case model7600:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 30:
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 31:
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
case 29:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case model7300:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 64:
|
||||
emit haveACCGain(level, 0);
|
||||
break;
|
||||
case 65:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 66:
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 67:
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
case model7100:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 87:
|
||||
emit haveACCGain(level, 0);
|
||||
break;
|
||||
case 89:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 90:
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 91:
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
}
|
||||
case model705:
|
||||
switch(subcmd)
|
||||
{
|
||||
case 116:
|
||||
emit haveUSBGain(level);
|
||||
break;
|
||||
case 117:
|
||||
emit haveLANGain(level);
|
||||
break;
|
||||
case 118:
|
||||
switch(inputRaw)
|
||||
{
|
||||
case 0:
|
||||
input = inputMic;
|
||||
break;
|
||||
case 1:
|
||||
input = inputUSB;
|
||||
break;
|
||||
case 3:
|
||||
input = inputLAN;
|
||||
break;
|
||||
default:
|
||||
input = inputUnknown;
|
||||
break;
|
||||
}
|
||||
emit haveModInput(input, false);
|
||||
break;
|
||||
case 119:
|
||||
switch(inputRaw)
|
||||
{
|
||||
case 0:
|
||||
input = inputMic;
|
||||
break;
|
||||
case 1:
|
||||
input = inputUSB;
|
||||
break;
|
||||
case 3:
|
||||
input = inputLAN;
|
||||
break;
|
||||
default:
|
||||
input = inputUnknown;
|
||||
break;
|
||||
}
|
||||
emit haveModInput(input, true);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1445,8 +1900,6 @@ void rigCommander::parseWFData()
|
|||
|
||||
void rigCommander::determineRigCaps()
|
||||
{
|
||||
//TODO: Add if(usingNativeLAN) condition
|
||||
//TODO: Add "hasDD", "hasDV" for d-star (705 and 9700)
|
||||
//TODO: Determine available bands (low priority, rig will reject out of band requests anyway)
|
||||
|
||||
|
||||
|
@ -1929,6 +2382,11 @@ void rigCommander::getDebug()
|
|||
emit getMoreDebug();
|
||||
}
|
||||
|
||||
void rigCommander::printHex(const QByteArray &pdata)
|
||||
{
|
||||
printHex(pdata, false, true);
|
||||
}
|
||||
|
||||
void rigCommander::printHex(const QByteArray &pdata, bool printVert, bool printHoriz)
|
||||
{
|
||||
qDebug() << "---- Begin hex dump -----:";
|
||||
|
|
|
@ -15,6 +15,23 @@
|
|||
// 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
|
||||
};
|
||||
|
||||
class rigCommander : public QObject
|
||||
{
|
||||
|
@ -55,6 +72,8 @@ public slots:
|
|||
void setPTT(bool pttOn);
|
||||
void setDataMode(bool dataOn);
|
||||
void getDataMode();
|
||||
void setDuplexMode(duplexMode dm);
|
||||
void getDuplexMode();
|
||||
|
||||
void getLevels(); // all supported levels
|
||||
|
||||
|
@ -67,6 +86,9 @@ public slots:
|
|||
void getMonitorLevel();
|
||||
void getVoxGain();
|
||||
void getAntiVoxGain();
|
||||
void getUSBGain();
|
||||
void getLANGain();
|
||||
void getACCGain();
|
||||
|
||||
void getSMeter();
|
||||
void getRFPowerMeter();
|
||||
|
@ -91,6 +113,9 @@ public slots:
|
|||
void setVoxGain(unsigned char gain);
|
||||
void setAntiVoxGain(unsigned char gain);
|
||||
|
||||
void getModInput(bool dataOn);
|
||||
void setModInput(rigInput input, bool dataOn);
|
||||
|
||||
void startATU();
|
||||
void setATU(bool enabled);
|
||||
void getATUStatus();
|
||||
|
@ -121,6 +146,7 @@ signals:
|
|||
void haveFrequency(double frequencyMhz);
|
||||
void haveMode(unsigned char mode, unsigned char filter);
|
||||
void haveDataMode(bool dataModeEnabled);
|
||||
void haveDuplexMode(duplexMode);
|
||||
void haveBandStackReg(float freq, char mode, bool dataOn);
|
||||
void haveSpectrumBounds();
|
||||
void haveScopeSpan(char span);
|
||||
|
@ -138,6 +164,11 @@ signals:
|
|||
void haveVoxGain(unsigned char gain);
|
||||
void haveAntiVoxGain(unsigned char gain);
|
||||
|
||||
void haveModInput(rigInput input, bool isData);
|
||||
void haveLANGain(unsigned char gain);
|
||||
void haveUSBGain(unsigned char gain);
|
||||
void haveACCGain(unsigned char gain, unsigned char ab);
|
||||
|
||||
void haveSMeter(unsigned char level);
|
||||
void haveRFMeter(unsigned char level);
|
||||
void haveSWRMeter(unsigned char);
|
||||
|
@ -182,10 +213,16 @@ private:
|
|||
void parseATU();
|
||||
void parseLevels(); // register 0x14
|
||||
void sendLevelCmd(unsigned char levAddr, unsigned char level);
|
||||
QByteArray getLANAddr();
|
||||
QByteArray getUSBAddr();
|
||||
QByteArray getACCAddr();
|
||||
void setModInput(rigInput input, bool dataOn, bool isQuery);
|
||||
void sendDataOut();
|
||||
void prepDataAndSend(QByteArray data);
|
||||
void debugMe();
|
||||
void printHex(const QByteArray &pdata);
|
||||
void printHex(const QByteArray &pdata, bool printVert, bool printHoriz);
|
||||
|
||||
commHandler * comm=Q_NULLPTR;
|
||||
udpHandler* udp=Q_NULLPTR;
|
||||
void determineRigCaps();
|
||||
|
|
|
@ -6,10 +6,28 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>368</width>
|
||||
<height>341</height>
|
||||
<width>440</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>440</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>440</width>
|
||||
<height>480</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Server Setup</string>
|
||||
</property>
|
||||
|
@ -36,6 +54,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Server Setup</string>
|
||||
</property>
|
||||
|
@ -60,6 +90,18 @@
|
|||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="enableCheckbox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enable</string>
|
||||
</property>
|
||||
|
@ -84,6 +126,18 @@
|
|||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Contol Port</string>
|
||||
</property>
|
||||
|
@ -91,6 +145,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="controlPortText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>99999</string>
|
||||
</property>
|
||||
|
@ -101,6 +167,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Civ Port</string>
|
||||
</property>
|
||||
|
@ -108,6 +186,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="civPortText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>99999</string>
|
||||
</property>
|
||||
|
@ -118,6 +208,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Audio Port</string>
|
||||
</property>
|
||||
|
@ -125,6 +227,18 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="audioPortText">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="inputMask">
|
||||
<string>99999</string>
|
||||
</property>
|
||||
|
@ -150,14 +264,14 @@
|
|||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
<width>400</width>
|
||||
<height>160</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>190</height>
|
||||
<width>750</width>
|
||||
<height>330</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
|
|
79
wfmain.cpp
79
wfmain.cpp
|
@ -1073,43 +1073,37 @@ void wfmain::shortcutF4()
|
|||
void wfmain::shortcutF5()
|
||||
{
|
||||
// LSB
|
||||
ui->modeSelectCombo->setCurrentIndex(0);
|
||||
on_modeSelectCombo_activated(0);
|
||||
changeMode(modeLSB, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF6()
|
||||
{
|
||||
// USB
|
||||
ui->modeSelectCombo->setCurrentIndex(1);
|
||||
on_modeSelectCombo_activated(1);
|
||||
changeMode(modeUSB, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF7()
|
||||
{
|
||||
// AM
|
||||
ui->modeSelectCombo->setCurrentIndex(2);
|
||||
on_modeSelectCombo_activated(2);
|
||||
changeMode(modeAM, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF8()
|
||||
{
|
||||
// CW
|
||||
ui->modeSelectCombo->setCurrentIndex(3);
|
||||
on_modeSelectCombo_activated(3);
|
||||
changeMode(modeCW, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF9()
|
||||
{
|
||||
// USB-D
|
||||
ui->modeSelectCombo->setCurrentIndex(9);
|
||||
on_modeSelectCombo_activated(9);
|
||||
changeMode(modeUSB, true);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF10()
|
||||
{
|
||||
// Build information, debug, whatever you wish
|
||||
QString buildInfo = QString("Build " + QString(GITSHORT) + " on " + QString(__DATE__) + " at " + __TIME__ + " by " + UNAME + "@" + HOST);
|
||||
showStatusBarText(buildInfo);
|
||||
// FM
|
||||
changeMode(modeFM, false);
|
||||
}
|
||||
|
||||
void wfmain::shortcutF12()
|
||||
|
@ -2006,6 +2000,37 @@ void wfmain::on_scopeEdgeCombo_currentIndexChanged(int index)
|
|||
emit setScopeEdge((char)index+1);
|
||||
}
|
||||
|
||||
void wfmain::changeMode(mode_kind mode)
|
||||
{
|
||||
bool dataOn = false;
|
||||
if(((unsigned char) mode >> 4) == 0x08)
|
||||
{
|
||||
dataOn = true;
|
||||
mode = (mode_kind)((int)mode & 0x0f);
|
||||
}
|
||||
|
||||
changeMode(mode, dataOn);
|
||||
}
|
||||
|
||||
void wfmain::changeMode(mode_kind mode, bool dataOn)
|
||||
{
|
||||
int filter = ui->modeFilterCombo->currentData().toInt();
|
||||
emit setMode((unsigned char)mode, filter);
|
||||
if(dataOn)
|
||||
{
|
||||
issueDelayedCommand(cmdSetDataModeOn);
|
||||
ui->dataModeBtn->blockSignals(true);
|
||||
ui->dataModeBtn->setChecked(true);
|
||||
ui->dataModeBtn->blockSignals(false);
|
||||
} else {
|
||||
issueDelayedCommand(cmdSetDataModeOff);
|
||||
ui->dataModeBtn->blockSignals(true);
|
||||
ui->dataModeBtn->setChecked(false);
|
||||
ui->dataModeBtn->blockSignals(false);
|
||||
}
|
||||
issueDelayedCommand(cmdGetMode);
|
||||
}
|
||||
|
||||
void wfmain::on_modeSelectCombo_activated(int index)
|
||||
{
|
||||
// The "acticvated" signal means the user initiated a mode change.
|
||||
|
@ -2410,6 +2435,7 @@ void wfmain::handlePttLimit()
|
|||
// transmission time exceeded!
|
||||
showStatusBarText("Transmit timeout at 3 minutes. Sending PTT OFF command now.");
|
||||
emit setPTT(false);
|
||||
issueDelayedCommand(cmdGetPTT);
|
||||
}
|
||||
|
||||
void wfmain::on_saveSettingsBtn_clicked()
|
||||
|
@ -2617,6 +2643,7 @@ void wfmain::on_transmitBtn_clicked()
|
|||
} else {
|
||||
// Currently transmitting
|
||||
emit setPTT(false);
|
||||
pttTimer->stop();
|
||||
issueDelayedCommand(cmdGetPTT);
|
||||
}
|
||||
}
|
||||
|
@ -2649,6 +2676,32 @@ void wfmain::receiveMicGain(unsigned char gain)
|
|||
changeSliderQuietly(ui->micGainSlider, gain);
|
||||
}
|
||||
|
||||
void wfmain::receiveModInput(rigInput input)
|
||||
{
|
||||
(void)input;
|
||||
}
|
||||
|
||||
void wfmain::receiveDuplexMode(duplexMode dm)
|
||||
{
|
||||
(void)dm;
|
||||
}
|
||||
|
||||
void wfmain::receiveACCGain(unsigned char level, unsigned char ab)
|
||||
{
|
||||
(void)level;
|
||||
(void)ab;
|
||||
}
|
||||
|
||||
void wfmain::receiveUSBGain(unsigned char level)
|
||||
{
|
||||
(void)level;
|
||||
}
|
||||
|
||||
void wfmain::receiveLANGain(unsigned char level)
|
||||
{
|
||||
(void)level;
|
||||
}
|
||||
|
||||
void wfmain::receiveCompLevel(unsigned char compLevel)
|
||||
{
|
||||
(void)compLevel;
|
||||
|
|
12
wfmain.h
12
wfmain.h
|
@ -45,6 +45,8 @@ signals:
|
|||
void setMode(unsigned char modeIndex, unsigned char modeFilter);
|
||||
void setDataMode(bool dataOn);
|
||||
void getDataMode();
|
||||
void getDuplexMode();
|
||||
void getModInput();
|
||||
void getPTT();
|
||||
void setPTT(bool pttOn);
|
||||
void getBandStackReg(char band, char regCode);
|
||||
|
@ -146,6 +148,10 @@ 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 receiveDuplexMode(duplexMode dm);
|
||||
|
||||
|
||||
|
||||
// Levels:
|
||||
void receiveRfGain(unsigned char level);
|
||||
|
@ -158,6 +164,9 @@ private slots:
|
|||
void receiveVoxGain(unsigned char voxGain);
|
||||
void receiveAntiVoxGain(unsigned char antiVoxGain);
|
||||
void receiveSpectrumRefLevel(int level);
|
||||
void receiveACCGain(unsigned char level, unsigned char ab);
|
||||
void receiveUSBGain(unsigned char level);
|
||||
void receiveLANGain(unsigned char level);
|
||||
|
||||
// Meters:
|
||||
|
||||
|
@ -494,6 +503,9 @@ private:
|
|||
void issueDelayedCommandPriority(cmds cmd);
|
||||
void changeSliderQuietly(QSlider *slider, int value);
|
||||
|
||||
void changeMode(mode_kind mode);
|
||||
void changeMode(mode_kind mode, bool dataOn);
|
||||
|
||||
int oldFreqDialVal;
|
||||
|
||||
rigCapabilities rigCaps;
|
||||
|
|
Ładowanie…
Reference in New Issue