diff --git a/CHANGELOG b/CHANGELOG index dea2e59..22ac0c0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,124 @@ # CHANGELOG + +- 20211201 + + Another "minor" update for RX only rigs + + Disable certain TX commands for RX only rigs + +- 20211222 + + Add mutex within rigState to protect access + +- 20211119 + + Add more version info + + Add --version command line argument and WFVIEW_VERSION #define + +- 20211118 + + A little less green in our gray. + + Added size rules for audio source combo boxes. + + Fix silly bug in retransmit code + + Remove some extra logging from audio + +- 20211115 + + Add mutex for incoming audio on udp and server + + Force PA to use 48K Sample Rate if default is 44.1K + + Try using slot for audio again + +- 20211110 + + Server only tries mutex lock for 10ms before giving up. + + Check number of samples in opus packet before attempting decode + +- 20211109 + + Small changes to audio handler + +- 20211107 + + Add SSE2 enhancements to resampler + + Update audiohandler.h + + Enable SSE or NEON enhancements for resampler + + Fix resample ratio for input and output (hopefully!) + + Create resampleRatio + + Close PA stream after stopping it! + + Fix Linux rtaudio build + + Pulled out some debug code that isn't needed. + + Fixed manual rig ID issue with uninitialized variable. + +- 20211106 + + Added override allowing the user-specified CI-V address to also be used + as the Rig ID (model). This is useful for older radios that do not reply + to Rig ID queries. For radios using the default CI-V address, it should + "just work". + + Added PTT "snooping" to the commHandler, such that radios needing RTS + set for PTT will work. Includes replying to PTT queries with the RTS + status. There is currently no UI to manually select radios that need + RTS. + + deleted a lingering swapfile from one of my vim sessions + +- 20211105 + + Added RTS PTT support commHandler and rigCommander. RTS is only sent + from rigCommander at this time, the pty is not parsed. + + Added geometry constraints to the transceiver adjustments window, and + disable controls which do not function except for debug builds. + + + Changed IF/TPBF commands to be "unique priority" inserts. Added "more" + button for extended transceiver controls. + + Added an IF Shift-like control for radios with Twin PBF. + + Added support for IF Shift and Twin Pass-Band Filters. Currently + accessable only via the debug button. + +- 20211104 + Added IC-736 FM mode + + Added code to force IC-736 to rigID + +- 20211101 + + Use QT Audio by default + + remove unneeded audio signal handler + + Add portaudio support + + Make switching between audio apis easier (and tidy .pro file) + + Use buffered audio for Linux (was just Mac only) + + Adjust buffer size depending on latency setting + +- 20211031 + + Stuff audio buffer directly rather than signal/slot + - 20211022 Don't block until audio buffer has space diff --git a/WHATSNEW b/WHATSNEW index 33042e3..30289b7 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -10,10 +10,13 @@ The following highlights are in this 1.x-release: rigctl basic split support rigctl prevents switching off civ transceive added 25 kHz step - as a temporary measure sending multiple TX/FREQ change commands to the rig when we use rigctld. - people should use "fake it" in wsjtx as the split code is not reliable. - tidied up udp server function for better reliability + added some IC736 stuff + added portaudio (you need t change wfview.pro to select + and that lowers the latency to maybe less than 50 ms + added PBT and IF-shift + several bugs fixed + RTS as PTT for several radios like the 706/718/736… diff --git a/aboutbox.cpp b/aboutbox.cpp index dadd943..ba8de0f 100644 --- a/aboutbox.cpp +++ b/aboutbox.cpp @@ -19,10 +19,16 @@ aboutbox::aboutbox(QWidget *parent) : QString nacode = QString("

Networking, audio, rigctl server, and much more written by Phil Taylor, M0VSE"); QString doctest = QString("

Testing, documentation, bug fixes, and development mentorship from
Roeland Jansen, PA3MET, and Jim Nijkamp, PA8E."); - +#if defined(Q_OS_LINUX) QString ssCredit = QString("

Stylesheet qdarkstyle used under MIT license, stored in /usr/share/wfview/stylesheets/."); +#else + QString ssCredit = QString("

Stylesheet qdarkstyle used under MIT license."); +#endif QString website = QString("

Please visit https://wfview.org/ for the latest information."); + + QString donate = QString("

Join us on Patreon for a behind-the-scenes look at wfview development, nightly builds, and to support the software you love."); + QString docs = QString("

Be sure to check the User Manual and the Forum if you have any questions."); QString support = QString("

For support, please visit the official wfview support forum."); QString gitcodelink = QString("").arg(GITSHORT); @@ -78,7 +84,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."); // String it all together: QString aboutText = head + copyright + "\n" + nacode + "\n" + doctest + wfviewcommunityack; - aboutText.append(website + "\n"+ docs + support + contact +"\n"); + aboutText.append(website + "\n" + donate + "\n"+ docs + support + contact +"\n"); aboutText.append("\n" + ssCredit + "\n" + rsCredit + "\n"); #if defined(RTAUDIO) diff --git a/rigcommander.cpp b/rigcommander.cpp index ed75bf9..d497c0d 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -22,20 +22,12 @@ rigCommander::rigCommander() { - rigState.mutex = new QMutex(); - QMutexLocker locker(rigState.mutex); - rigState.filter = 0; - rigState.mode = 0; - rigState.ptt = 0; - rigState.currentVfo = 0; - rigState.duplex = dmSplitOff; - + state.set(SCOPEFUNC,true,false); } rigCommander::~rigCommander() { closeComm(); - delete rigState.mutex; } @@ -147,6 +139,7 @@ void rigCommander::commSetup(unsigned char rigCivAddr, udpPreferences prefs, aud connect(this, SIGNAL(discoveredRigID(rigCapabilities)), ptty, SLOT(receiveFoundRigID(rigCapabilities))); emit haveAfGain(rxSetup.localAFgain); + localVolume = rxSetup.localAFgain; } // data from the comm port to the program: @@ -224,6 +217,20 @@ void rigCommander::receiveBaudRate(quint32 baudrate) { emit haveBaudRate(baudrate); } +void rigCommander::setRTSforPTT(bool enabled) +{ + if(!usingNativeLAN) + { + useRTSforPTT_isSet = true; + useRTSforPTT_manual = enabled; + if(comm != NULL) + { + rigCaps.useRTSforPTT=enabled; + comm->setUseRTSforPTT(enabled); + } + } +} + void rigCommander::findRigs() { // This function sends data to 0x00 ("broadcast") to look for any connected rig. @@ -266,7 +273,26 @@ void rigCommander::powerOn() { QByteArray payload; - for(int i=0; i < 150; i++) + int numFE=150; + switch (this->rigBaudRate) { + case 57600: + numFE = 75; + break; + case 38400: + numFE = 50; + break; + case 19200: + numFE = 25; + break; + case 9600: + numFE = 13; + break; + case 4800: + numFE = 7; + break; + } + + for(int i=0; i < numFE; i++) { payload.append("\xFE"); } @@ -572,16 +598,10 @@ void rigCommander::setFrequency(unsigned char vfo, freqt freq) cmdPayload.append(freqPayload); if (vfo == 0) { - rigState.mutex->lock(); - rigState.vfoAFreq = freq; - rigState.mutex->unlock(); cmdPayload.prepend('\x00'); } else { - rigState.mutex->lock(); - rigState.vfoBFreq = freq; - rigState.mutex->unlock(); cmdPayload.prepend(vfo); cmdPayload.prepend('\x25'); } @@ -709,10 +729,6 @@ void rigCommander::setMode(mode_info m) payload.append(m.filter); prepDataAndSend(payload); - - QMutexLocker locker(rigState.mutex); - rigState.mode = m.reg; - rigState.filter = m.filter; } void rigCommander::setMode(unsigned char mode, unsigned char modeFilter) @@ -742,10 +758,6 @@ void rigCommander::setMode(unsigned char mode, unsigned char modeFilter) } prepDataAndSend(payload); - QMutexLocker locker(rigState.mutex); - rigState.mode = mode; - rigState.filter = modeFilter; - } } @@ -763,8 +775,6 @@ void rigCommander::setDataMode(bool dataOn, unsigned char filter) payload.append("\x00\x00", 2); // data mode off, bandwidth not defined per ICD. } prepDataAndSend(payload); - QMutexLocker locker(rigState.mutex); - rigState.datamode = dataOn; } void rigCommander::getFrequency() @@ -1008,9 +1018,9 @@ void rigCommander::getPTT() //{ // emit havePTTStatus(comm->rtsStatus()); //} else { - QByteArray payload; - payload.setRawData("\x1C\x00", 2); - prepDataAndSend(payload); + QByteArray payload; + payload.setRawData("\x1C\x00", 2); + prepDataAndSend(payload); //} } @@ -1031,8 +1041,6 @@ void rigCommander::setPTT(bool pttOn) QByteArray payload("\x1C\x00", 2); payload.append((char)pttOn); prepDataAndSend(payload); - QMutexLocker locker(rigState.mutex); - rigState.ptt = pttOn; } } @@ -1253,22 +1261,16 @@ void rigCommander::parseCommand() break; case '\x0F': emit haveDuplexMode((duplexMode)(unsigned char)payloadIn[1]); - rigState.mutex->lock(); - rigState.duplex = (duplexMode)(unsigned char)payloadIn[1]; - rigState.mutex->unlock(); + state.set(DUPLEX, (duplexMode)(unsigned char)payloadIn[1], false); break; case '\x11': emit haveAttenuator((unsigned char)payloadIn.at(1)); - rigState.mutex->lock(); - rigState.attenuator = (unsigned char)payloadIn.at(1); - rigState.mutex->unlock(); + state.set(ATTENUATOR, (quint8)payloadIn[1], false); break; case '\x12': emit haveAntenna((unsigned char)payloadIn.at(1), (bool)payloadIn.at(2)); - rigState.mutex->lock(); - rigState.antenna = (unsigned char)payloadIn.at(1); - rigState.rxAntenna = (bool)payloadIn.at(2); - rigState.mutex->unlock(); + state.set(ANTENNA, (quint8)payloadIn[1], false); + state.set(RXANTENNA, (bool)payloadIn[2], false); break; case '\x14': // read levels @@ -1372,24 +1374,21 @@ void rigCommander::parseLevels() // AF level - ignore if LAN connection. if (udp == Q_NULLPTR) { emit haveAfGain(level); - rigState.mutex->lock(); - rigState.afGain = level; - rigState.mutex->unlock(); + state.set(AFGAIN, level, false); + } + else { + state.set(AFGAIN, localVolume, false); } break; case '\x02': // RX RF Gain emit haveRfGain(level); - rigState.mutex->lock(); - rigState.rfGain = level; - rigState.mutex->unlock(); + state.set(RFGAIN, level, false); break; case '\x03': // Squelch level - emit haveSql(level); - rigState.mutex->lock(); - rigState.squelch = level; - rigState.mutex->unlock(); + emit haveSql(level); + state.set(SQUELCH, level, false); break; case '\x07': // Twin BPF Inner, or, IF-Shift level @@ -1408,16 +1407,12 @@ void rigCommander::parseLevels() case '\x0A': // TX RF level emit haveTxPower(level); - rigState.mutex->lock(); - rigState.txPower = level; - rigState.mutex->unlock(); + state.set(TXPOWER, level, false); break; case '\x0B': // Mic Gain emit haveMicGain(level); - rigState.mutex->lock(); - rigState.micGain = level; - rigState.mutex->unlock(); + state.set(MICGAIN, level, false); break; case '\x0C': // CW Keying Speed - ignore for now @@ -1428,9 +1423,7 @@ void rigCommander::parseLevels() case '\x0E': // compressor level emit haveCompLevel(level); - rigState.mutex->lock(); - rigState.compLevel = level; - rigState.mutex->unlock(); + state.set(COMPLEVEL, level, false); break; case '\x12': // NB level - ignore for now @@ -1438,23 +1431,17 @@ void rigCommander::parseLevels() case '\x15': // monitor level emit haveMonitorLevel(level); - rigState.mutex->lock(); - rigState.monitorLevel = level; - rigState.mutex->unlock(); + state.set(MONITORLEVEL, level, false); break; case '\x16': // VOX gain emit haveVoxGain(level); - rigState.mutex->lock(); - rigState.voxGain = level; - rigState.mutex->unlock(); + state.set(VOXGAIN, level, false); break; case '\x17': // anti-VOX gain emit haveAntiVoxGain(level); - rigState.mutex->lock(); - rigState.antiVoxGain = level; - rigState.mutex->unlock(); + state.set(ANTIVOXGAIN, level, false); break; default: @@ -1472,58 +1459,42 @@ void rigCommander::parseLevels() case '\x02': // S-Meter emit haveMeter(meterS, level); - rigState.mutex->lock(); - rigState.sMeter = level; - rigState.mutex->unlock(); + state.set(SMETER, level, false); break; case '\x04': // Center (IC-R8600) emit haveMeter(meterCenter, level); - rigState.mutex->lock(); - rigState.sMeter = level; - rigState.mutex->unlock(); + state.set(SMETER, level, false); break; case '\x11': // RF-Power meter emit haveMeter(meterPower, level); - rigState.mutex->lock(); - rigState.powerMeter = level; - rigState.mutex->unlock(); + state.set(POWERMETER, level, false); break; case '\x12': // SWR emit haveMeter(meterSWR, level); - rigState.mutex->lock(); - rigState.swrMeter = level; - rigState.mutex->unlock(); + state.set(SWRMETER, level, false); break; case '\x13': // ALC emit haveMeter(meterALC, level); - rigState.mutex->lock(); - rigState.alcMeter = level; - rigState.mutex->unlock(); + state.set(ALCMETER, level, false); break; case '\x14': // COMP dB reduction emit haveMeter(meterComp, level); - rigState.mutex->lock(); - rigState.compMeter = level; - rigState.mutex->unlock(); + state.set(COMPMETER, level, false); break; case '\x15': // VD (12V) emit haveMeter(meterVoltage, level); - rigState.mutex->lock(); - rigState.voltageMeter = level; - rigState.mutex->unlock(); + state.set(VOLTAGEMETER, level, false); break; case '\x16': // ID emit haveMeter(meterCurrent, level); - rigState.mutex->lock(); - rigState.currentMeter = level; - rigState.mutex->unlock(); + state.set(CURRENTMETER, level, false); break; default: @@ -1747,6 +1718,20 @@ void rigCommander::setModInputLevel(rigInput input, unsigned char level) } } +void rigCommander::setAfMute(bool gainOn) +{ + QByteArray payload("\x1a\x09"); + payload.append((quint8)gainOn); + prepDataAndSend(payload); +} + +void rigCommander::setDialLock(bool lockOn) +{ + QByteArray payload("\x16\x50"); + payload.append((quint8)lockOn); + prepDataAndSend(payload); +} + void rigCommander::getModInputLevel(rigInput input) { switch(input) @@ -1780,6 +1765,18 @@ void rigCommander::getModInputLevel(rigInput input) } } +void rigCommander::getAfMute() +{ + QByteArray payload("\x1a\x09"); + prepDataAndSend(payload); +} + +void rigCommander::getDialLock() +{ + QByteArray payload("\x16\x50"); + prepDataAndSend(payload); +} + QByteArray rigCommander::getUSBAddr() { QByteArray payload; @@ -2154,6 +2151,7 @@ void rigCommander::setAfGain(unsigned char level) } else { emit haveSetVolume(level); + localVolume = level; } } @@ -2390,6 +2388,7 @@ void rigCommander::parseRegister21() break; ritHz = f.Hz*((payloadIn.at(4)=='\x01')?-1:1); emit haveRitFrequency(ritHz); + state.set(RITVALUE, ritHz, false); break; case '\x01': // RIT on/off @@ -2399,6 +2398,7 @@ void rigCommander::parseRegister21() } else { emit haveRitEnabled(false); } + state.set(RITFUNC, (bool)payloadIn.at(02), false); break; case '\x02': // Delta TX setting on/off @@ -2416,6 +2416,8 @@ void rigCommander::parseATU() // [1]: 0x01 // [2]: 0 = off, 0x01 = on, 0x02 = tuning in-progress emit haveATUStatus((unsigned char) payloadIn[2]); + // This is a bool so any non-zero will mean enabled. + state.set(TUNERFUNC, (bool)payloadIn[2], false); } void rigCommander::parsePTT() @@ -2430,9 +2432,7 @@ void rigCommander::parsePTT() // PTT on emit havePTTStatus(true); } - QMutexLocker locker(rigState.mutex); - rigState.ptt = (bool)payloadIn[2]; - + state.set(PTT,(bool)payloadIn[2],false); } void rigCommander::parseRegisters1A() @@ -2450,7 +2450,6 @@ void rigCommander::parseRegisters1A() // "INDEX: 00 01 02 03 04 " // "DATA: 1a 06 01 03 fd " (data mode enabled, filter width 3 selected) - QMutexLocker locker(rigState.mutex); switch(payloadIn[01]) { @@ -2461,6 +2460,9 @@ void rigCommander::parseRegisters1A() // band stacking register parseBandStackReg(); break; + case '\x04': + state.set(AGC, (quint8)payloadIn[2], false); + break; case '\x06': // data mode // emit havedataMode( (bool) payloadIn[somebit]) @@ -2471,11 +2473,13 @@ void rigCommander::parseRegisters1A() // YY: filter selected, 01 through 03.; // if YY is 00 then XX was also set to 00 emit haveDataMode((bool)payloadIn[03]); - rigState.datamode = (bool)payloadIn[03]; + state.set(DATAMODE, (quint8)payloadIn[3], false); break; case '\x07': // IP+ status break; + case '\x09': + state.set(MUTEFUNC, (quint8)payloadIn[2], false); default: break; } @@ -2493,32 +2497,24 @@ void rigCommander::parseRegister1B() // "Repeater tone" tone = decodeTone(payloadIn); emit haveTone(tone); - rigState.mutex->lock(); - rigState.ctcss = tone; - rigState.mutex->unlock(); + state.set(CTCSS, tone, false); break; case '\x01': // "TSQL tone" tone = decodeTone(payloadIn); emit haveTSQL(tone); - rigState.mutex->lock(); - rigState.tsql = tone; - rigState.mutex->unlock(); + state.set(TSQL, tone, false); break; case '\x02': // DTCS (DCS) tone = decodeTone(payloadIn, tinv, rinv); emit haveDTCS(tone, tinv, rinv); - rigState.mutex->lock(); - rigState.dtcs = tone; - rigState.mutex->unlock(); + state.set(DTCS, tone, false); break; case '\x07': // "CSQL code (DV mode)" tone = decodeTone(payloadIn); - rigState.mutex->lock(); - rigState.csql = tone; - rigState.mutex->unlock(); + state.set(CSQL, tone, false); break; default: break; @@ -2539,9 +2535,52 @@ void rigCommander::parseRegister16() case '\x02': // Preamp emit havePreamp((unsigned char)payloadIn.at(2)); - rigState.mutex->lock(); - rigState.preamp = (unsigned char)payloadIn.at(2); - rigState.mutex->unlock(); + state.set(PREAMP, (quint8)payloadIn.at(2), false); + break; + case '\x22': + state.set(NBFUNC, payloadIn.at(2) != 0, false); + break; + case '\x40': + state.set(NRFUNC, payloadIn.at(2) != 0, false); + break; + case '\x41': // Auto notch + state.set(ANFFUNC, payloadIn.at(2) != 0, false); + break; + case '\x42': + state.set(TONEFUNC, payloadIn.at(2) != 0, false); + break; + case '\x43': + state.set(TSQLFUNC, payloadIn.at(2) != 0, false); + break; + case '\x44': + state.set(COMPFUNC, payloadIn.at(2) != 0, false); + break; + case '\x45': + state.set(MONFUNC, payloadIn.at(2) != 0, false); + break; + case '\x46': + state.set(VOXFUNC, payloadIn.at(2) != 0, false); + break; + case '\x47': + if (payloadIn.at(2) == '\00') { + state.set(FBKINFUNC, false, false); + state.set(SBKINFUNC, false, false); + } + else if (payloadIn.at(2) == '\01') { + state.set(FBKINFUNC, false, false); + state.set(SBKINFUNC, true, false); + + } + else if (payloadIn.at(2) == '\02') { + state.set(FBKINFUNC, true, false); + state.set(SBKINFUNC, false, false); + } + break; + case '\x48': // Manual Notch + state.set(MNFUNC, payloadIn.at(2) != 0, false); + break; + case '\x50': // Dial lock + state.set(LOCKFUNC, payloadIn.at(2) != 0, false); break; default: break; @@ -2847,6 +2886,7 @@ void rigCommander::parseWFData() break; case 0x10: // confirming scope is on + state.set(SCOPEFUNC, (bool)payloadIn[2], true); break; case 0x11: // confirming output enabled/disabled of wf data. @@ -3570,8 +3610,13 @@ void rigCommander::determineRigCaps() haveRigCaps = true; if(!usingNativeLAN) + { + if(useRTSforPTT_isSet) + { + rigCaps.useRTSforPTT = useRTSforPTT_manual; + } comm->setUseRTSforPTT(rigCaps.useRTSforPTT); - + } if(lookingForRig) { @@ -3815,49 +3860,52 @@ void rigCommander::parseFrequency() // printHex(payloadIn, false, true); frequencyMhz = 0.0; - if(payloadIn.length() == 7) + if (payloadIn.length() == 7) { // 7300 has these digits too, as zeros. // IC-705 or IC-9700 with higher frequency data available. - frequencyMhz += 100*(payloadIn[05] & 0x0f); - frequencyMhz += (1000*((payloadIn[05] & 0xf0) >> 4)); + frequencyMhz += 100 * (payloadIn[05] & 0x0f); + frequencyMhz += (1000 * ((payloadIn[05] & 0xf0) >> 4)); - freq.Hz += (payloadIn[05] & 0x0f) * 1E6 * 100; - freq.Hz += ((payloadIn[05] & 0xf0) >> 4) * 1E6 * 1000; + freq.Hz += (payloadIn[05] & 0x0f) * 1E6 * 100; + freq.Hz += ((payloadIn[05] & 0xf0) >> 4) * 1E6 * 1000; } freq.Hz += (payloadIn[04] & 0x0f) * 1E6; - freq.Hz += ((payloadIn[04] & 0xf0) >> 4) * 1E6 * 10; + freq.Hz += ((payloadIn[04] & 0xf0) >> 4) * 1E6 * 10; frequencyMhz += payloadIn[04] & 0x0f; - frequencyMhz += 10*((payloadIn[04] & 0xf0) >> 4); + frequencyMhz += 10 * ((payloadIn[04] & 0xf0) >> 4); // KHz land: - frequencyMhz += ((payloadIn[03] & 0xf0) >>4)/10.0 ; + frequencyMhz += ((payloadIn[03] & 0xf0) >> 4) / 10.0; frequencyMhz += (payloadIn[03] & 0x0f) / 100.0; frequencyMhz += ((payloadIn[02] & 0xf0) >> 4) / 1000.0; frequencyMhz += (payloadIn[02] & 0x0f) / 10000.0; - frequencyMhz += ((payloadIn[01] & 0xf0) >> 4) / 100000.0; - frequencyMhz += (payloadIn[01] & 0x0f) / 1000000.0; + frequencyMhz += ((payloadIn[01] & 0xf0) >> 4) / 100000.0; + frequencyMhz += (payloadIn[01] & 0x0f) / 1000000.0; freq.Hz += payloadIn[01] & 0x0f; - freq.Hz += ((payloadIn[01] & 0xf0) >> 4)* 10; + freq.Hz += ((payloadIn[01] & 0xf0) >> 4) * 10; - freq.Hz += (payloadIn[02] & 0x0f) * 100; - freq.Hz += ((payloadIn[02] & 0xf0) >> 4) * 1000; + freq.Hz += (payloadIn[02] & 0x0f) * 100; + freq.Hz += ((payloadIn[02] & 0xf0) >> 4) * 1000; - freq.Hz += (payloadIn[03] & 0x0f) * 10000; - freq.Hz += ((payloadIn[03] & 0xf0) >>4) * 100000; + freq.Hz += (payloadIn[03] & 0x0f) * 10000; + freq.Hz += ((payloadIn[03] & 0xf0) >> 4) * 100000; freq.MHzDouble = frequencyMhz; - - rigState.mutex->lock(); - rigState.vfoAFreq = freq; - rigState.mutex->unlock(); - + + if (state.getChar(CURRENTVFO) == 0) { + state.set(VFOAFREQ, freq.Hz, false); + } + else { + state.set(VFOBFREQ, freq.Hz, false); + } + emit haveFrequency(freq); } @@ -3935,11 +3983,9 @@ void rigCommander::parseMode() } else { filter = 0; } - rigState.mutex->lock(); - rigState.mode = (unsigned char)payloadIn[01]; - rigState.filter = filter; - rigState.mutex->unlock(); emit haveMode((unsigned char)payloadIn[01], filter); + state.set(MODE,(unsigned char)payloadIn[01],false); + state.set(FILTER,filter,false); } @@ -4014,6 +4060,144 @@ void rigCommander::setAntenna(unsigned char ant, bool rx) prepDataAndSend(payload); } +void rigCommander::setNb(bool enabled) { + QByteArray payload("\x16\x22"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getNb() +{ + QByteArray payload; + payload.setRawData("\x16\x22", 2); + prepDataAndSend(payload); +} + +void rigCommander::setNr(bool enabled) { + QByteArray payload("\x16\x40"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getNr() +{ + QByteArray payload; + payload.setRawData("\x16\x40", 2); + prepDataAndSend(payload); +} + +void rigCommander::setAutoNotch(bool enabled) +{ + QByteArray payload("\x16\x41"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getAutoNotch() +{ + QByteArray payload; + payload.setRawData("\x16\x41", 2); + prepDataAndSend(payload); +} + +void rigCommander::setToneEnabled(bool enabled) +{ + QByteArray payload("\x16\x42"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getToneEnabled() +{ + QByteArray payload; + payload.setRawData("\x16\x42", 2); + prepDataAndSend(payload); +} + +void rigCommander::setToneSql(bool enabled) +{ + QByteArray payload("\x16\x43"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getToneSql() +{ + QByteArray payload; + payload.setRawData("\x16\x43", 2); + prepDataAndSend(payload); +} + +void rigCommander::setCompressor(bool enabled) +{ + QByteArray payload("\x16\x44"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getCompressor() +{ + QByteArray payload; + payload.setRawData("\x16\x44", 2); + prepDataAndSend(payload); +} + +void rigCommander::setMonitor(bool enabled) +{ + QByteArray payload("\x16\x45"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getMonitor() +{ + QByteArray payload; + payload.setRawData("\x16\x45", 2); + prepDataAndSend(payload); +} + +void rigCommander::setVox(bool enabled) +{ + QByteArray payload("\x16\x46"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getVox() +{ + QByteArray payload; + payload.setRawData("\x16\x46", 2); + prepDataAndSend(payload); +} + +void rigCommander::setBreakIn(unsigned char type) { + QByteArray payload("\x16\x47"); + payload.append((unsigned char)type); + prepDataAndSend(payload); +} + +void rigCommander::getBreakIn() +{ + QByteArray payload; + payload.setRawData("\x16\x47", 2); + prepDataAndSend(payload); +} + +void rigCommander::setManualNotch(bool enabled) +{ + QByteArray payload("\x16\x48"); + payload.append((unsigned char)enabled); + prepDataAndSend(payload); +} + +void rigCommander::getManualNotch() +{ + QByteArray payload; + payload.setRawData("\x16\x48", 2); + prepDataAndSend(payload); +} + + void rigCommander::getRigID() { QByteArray payload; @@ -4086,7 +4270,345 @@ QByteArray rigCommander::stripData(const QByteArray &data, unsigned char cutPosi void rigCommander::sendState() { - emit stateInfo(&rigState); + emit stateInfo(&state); +} + +void rigCommander::stateUpdated() +{ + // A remote process has updated the rigState + // First we need to find which item(s) have been updated and send the command(s) to the rig. + + QMap::iterator i = state.map.begin(); + while (i != state.map.end()) { + if (!i.value()._valid || i.value()._updated) + { + i.value()._updated = false; + i.value()._valid = true; // Set value to valid as we have requested it (even if we haven't had a response) + qDebug(logRigCtlD()) << "Got new value:" << i.key() << "=" << i.value()._value; + switch (i.key()) { + case VFOAFREQ: + if (i.value()._valid) { + freqt freq; + freq.Hz = state.getInt64(VFOAFREQ); + setFrequency(0, freq); + setFrequency(0, freq); + setFrequency(0, freq); + } + getFrequency(); + break; + case VFOBFREQ: + if (i.value()._valid) { + freqt freq; + freq.Hz = state.getInt64(VFOBFREQ); + setFrequency(1, freq); + setFrequency(1, freq); + setFrequency(1, freq); + } + getFrequency(); + break; + case CURRENTVFO: + // Work on VFOB - how do we do this? + break; + case PTT: + if (i.value()._valid) { + setPTT(state.getBool(PTT)); + setPTT(state.getBool(PTT)); + setPTT(state.getBool(PTT)); + } + getPTT(); + break; + case MODE: + case FILTER: + if (i.value()._valid) { + setMode(state.getChar(MODE), state.getChar(FILTER)); + } + getMode(); + break; + case DUPLEX: + if (i.value()._valid) { + setDuplexMode(state.getDuplex(DUPLEX)); + } + getDuplexMode(); + break; + case DATAMODE: + if (i.value()._valid) { + setDataMode(state.getBool(DATAMODE), state.getChar(FILTER)); + } + getDuplexMode(); + break; + case ANTENNA: + case RXANTENNA: + if (i.value()._valid) { + setAntenna(state.getChar(ANTENNA), state.getBool(RXANTENNA)); + } + getAntenna(); + break; + case CTCSS: + if (i.value()._valid) { + setTone(state.getChar(CTCSS)); + } + getTone(); + break; + case TSQL: + if (i.value()._valid) { + setTSQL(state.getChar(TSQL)); + } + getTSQL(); + break; + case DTCS: + if (i.value()._valid) { + setDTCS(state.getChar(DTCS), false, false); // Not sure about this? + } + getDTCS(); + break; + case CSQL: + if (i.value()._valid) { + setTone(state.getChar(CSQL)); + } + getTone(); + break; + case PREAMP: + if (i.value()._valid) { + setPreamp(state.getChar(PREAMP)); + } + getPreamp(); + break; + case ATTENUATOR: + if (i.value()._valid) { + setAttenuator(state.getChar(ATTENUATOR)); + } + getAttenuator(); + break; + case AFGAIN: + if (i.value()._valid) { + setAfGain(state.getChar(AFGAIN)); + } + getAfGain(); + break; + case RFGAIN: + if (i.value()._valid) { + setRfGain(state.getChar(RFGAIN)); + } + getRfGain(); + break; + case SQUELCH: + if (i.value()._valid) { + setSquelch(state.getChar(SQUELCH)); + } + getSql(); + break; + case TXPOWER: + if (i.value()._valid) { + setTxPower(state.getChar(TXPOWER)); + } + getTxLevel(); + break; + case MICGAIN: + if (i.value()._valid) { + setMicGain(state.getChar(MICGAIN)); + } + getMicGain(); + break; + case COMPLEVEL: + if (i.value()._valid) { + setCompLevel(state.getChar(COMPLEVEL)); + } + getCompLevel(); + break; + case MONITORLEVEL: + if (i.value()._valid) { + setMonitorLevel(state.getChar(MONITORLEVEL)); + } + getMonitorLevel(); + break; + case VOXGAIN: + if (i.value()._valid) { + setVoxGain(state.getChar(VOXGAIN)); + } + getVoxGain(); + break; + case ANTIVOXGAIN: + if (i.value()._valid) { + setAntiVoxGain(state.getChar(ANTIVOXGAIN)); + } + getAntiVoxGain(); + break; + case NBFUNC: + if (i.value()._valid) { + setNb(state.getBool(NBFUNC)); + } + getNb(); + break; + case NRFUNC: + if (i.value()._valid) { + setNr(state.getBool(NRFUNC)); + } + getNr(); + break; + case ANFFUNC: + if (i.value()._valid) { + setAutoNotch(state.getBool(ANFFUNC)); + } + getAutoNotch(); + break; + case TONEFUNC: + if (i.value()._valid) { + setToneEnabled(state.getBool(TONEFUNC)); + } + getToneEnabled(); + break; + case TSQLFUNC: + if (i.value()._valid) { + setToneSql(state.getBool(TSQLFUNC)); + } + getToneSql(); + break; + case COMPFUNC: + if (i.value()._valid) { + setCompressor(state.getBool(COMPFUNC)); + } + getCompressor(); + break; + case MONFUNC: + if (i.value()._valid) { + setMonitor(state.getBool(MONFUNC)); + } + getMonitor(); + break; + case VOXFUNC: + if (i.value()._valid) { + setVox(state.getBool(VOXFUNC)); + } + getVox(); + break; + case SBKINFUNC: + if (i.value()._valid) { + setBreakIn(state.getBool(VOXFUNC)); + } + getVox(); + break; + case FBKINFUNC: + if (i.value()._valid) { + setBreakIn(state.getBool(VOXFUNC) << 1); + } + getBreakIn(); + break; + case MNFUNC: + if (i.value()._valid) { + setManualNotch(state.getBool(MNFUNC)); + } + getManualNotch(); + break; + case SCOPEFUNC: + if (i.value()._valid) { + if (state.getBool(SCOPEFUNC)) { + enableSpectOutput(); + } + else { + disableSpectOutput(); + } + } + break; + case RIGINPUT: + if (i.value()._valid) { + setModInput(state.getInput(RIGINPUT), state.getBool(DATAMODE)); + } + getModInput(state.getBool(DATAMODE)); + break; + case POWERONOFF: + if (i.value()._valid) { + if (state.getBool(POWERONOFF)) { + powerOn(); + } + else { + powerOff(); + } + } + break; + case RITVALUE: + if (i.value()._valid) { + setRitValue(state.getInt32(RITVALUE)); + } + getRitValue(); + break; + case RITFUNC: + if (i.value()._valid) { + setRitEnable(state.getBool(RITFUNC)); + } + getRitEnabled(); + break; + // All meters can only be updated from the rig end. + case SMETER: + case POWERMETER: + case ALCMETER: + case COMPMETER: + case VOLTAGEMETER: + case CURRENTMETER: + break; + case AGC: + break; + case MODINPUT: + break; + case FAGCFUNC: + break; + case AIPFUNC: + break; + case APFFUNC: + break; + case RFFUNC: // Should this set RF output power to 0? + break; + case AROFUNC: + break; + case MUTEFUNC: + if (i.value()._valid) { + setAfMute(state.getBool(MUTEFUNC)); + } + getAfMute(); + break; + case VSCFUNC: + break; + case REVFUNC: + break; + case SQLFUNC: + break; + case ABMFUNC: + break; + case BCFUNC: + break; + case MBCFUNC: + break; + case AFCFUNC: + break; + case SATMODEFUNC: + break; + case NBLEVEL: + break; + case NBDEPTH: + break; + case NBWIDTH: + break; + case NRLEVEL: + break; + case RESUMEFUNC: + break; + case TBURSTFUNC: + break; + case TUNERFUNC: + if (i.value()._valid) { + setATU(state.getBool(TUNERFUNC)); + } + getATUStatus(); + break; + case LOCKFUNC: + if (i.value()._valid) { + setDialLock(state.getBool(LOCKFUNC)); + } + getDialLock(); + break; + } + } + ++i; + } } void rigCommander::getDebug() diff --git a/rigcommander.h b/rigcommander.h index 90550e0..6da1744 100644 --- a/rigcommander.h +++ b/rigcommander.h @@ -2,10 +2,10 @@ #define RIGCOMMANDER_H #include -#include #include #include + #include "commhandler.h" #include "pttyhandler.h" #include "udphandler.h" @@ -13,6 +13,8 @@ #include "repeaterattributes.h" #include "freqmemory.h" +#include "rigstate.h" + // This file figures out what to send to the comm and also // parses returns into useful things. @@ -61,78 +63,6 @@ struct timekind { bool isMinus; }; -struct rigStateStruct { - QMutex *mutex; - freqt vfoAFreq; - freqt vfoBFreq; - unsigned char currentVfo; - bool ptt; - unsigned char mode; - unsigned char filter; - duplexMode duplex; - bool datamode; - unsigned char antenna; - bool rxAntenna; - // Tones - quint16 ctcss; - quint16 tsql; - quint16 dtcs; - quint16 csql; - // Levels - unsigned char preamp; - unsigned char attenuator; - unsigned char modInput; - unsigned char afGain; - unsigned char rfGain; - unsigned char squelch; - unsigned char txPower; - unsigned char micGain; - unsigned char compLevel; - unsigned char monitorLevel; - unsigned char voxGain; - unsigned char antiVoxGain; - // Meters - unsigned char sMeter; - unsigned char powerMeter; - unsigned char swrMeter; - unsigned char alcMeter; - unsigned char compMeter; - unsigned char voltageMeter; - unsigned char currentMeter; - // Functions - bool fagcFunc=false; - bool nbFunc=false; - bool compFunc=false; - bool voxFunc = false; - bool toneFunc = false; - bool tsqlFunc = false; - bool sbkinFunc = false; - bool fbkinFunc = false; - bool anfFunc = false; - bool nrFunc = false; - bool aipFunc = false; - bool apfFunc = false; - bool monFunc = false; - bool mnFunc = false; - bool rfFunc = false; - bool aroFunc = false; - bool muteFunc = false; - bool vscFunc = false; - bool revFunc = false; - bool sqlFunc = false; - bool abmFunc = false; - bool bcFunc = false; - bool mbcFunc = false; - bool ritFunc = false; - bool afcFunc = false; - bool satmodeFunc = false; - bool scopeFunc = false; - bool resumeFunc = false; - bool tburstFunc = false; - bool tunerFunc = false; - bool lockFunc = false; -}; - class rigCommander : public QObject { Q_OBJECT @@ -148,6 +78,8 @@ public slots: void commSetup(unsigned char rigCivAddr, QString rigSerialPort, quint32 rigBaudRate,QString vsp); void commSetup(unsigned char rigCivAddr, udpPreferences prefs, audioSetup rxSetup, audioSetup txSetup, QString vsp); void closeComm(); + void stateUpdated(); + void setRTSforPTT(bool enabled); // Power: void powerOn(); @@ -199,6 +131,26 @@ 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 setAutoNotch(bool enabled); + void getAutoNotch(); + void setToneEnabled(bool enabled); + void getToneEnabled(); + void setToneSql(bool enabled); + void getToneSql(); + void setCompressor(bool enabled); + void getCompressor(); + void setMonitor(bool enabled); + void getMonitor(); + void setVox(bool enabled); + void getVox(); + void setBreakIn(unsigned char type); + void getBreakIn(); + void setManualNotch(bool enabled); + void getManualNotch(); // Repeater: void setDuplexMode(duplexMode dm); @@ -233,6 +185,8 @@ public slots: void getACCGain(unsigned char ab); void getModInput(bool dataOn); void getModInputLevel(rigInput input); + void getAfMute(); + void getDialLock(); // Set Levels: void setSquelch(unsigned char level); @@ -253,6 +207,8 @@ public slots: 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); // NB, NR, IP+: void setIPP(bool enabled); @@ -406,7 +362,7 @@ signals: void haveAntenna(unsigned char ant,bool rx); // Rig State - void stateInfo(rigStateStruct* state); + void stateInfo(rigstate* state); // Housekeeping: void getMoreDebug(); @@ -480,7 +436,7 @@ private: struct rigCapabilities rigCaps; - rigStateStruct rigState; + rigstate state; bool haveRigCaps; model_kind model; @@ -497,6 +453,9 @@ private: unsigned char civAddr; unsigned char incomingCIVAddr; // place to store the incoming CIV. bool pttAllowed; + bool useRTSforPTT_isSet = false; + bool useRTSforPTT_manual = false; + QString rigSerialPort; quint32 rigBaudRate; @@ -509,6 +468,7 @@ private: QString password; QString serialPortError; + unsigned char localVolume=0; }; diff --git a/rigctld.cpp b/rigctld.cpp index c456cbd..daf779d 100644 --- a/rigctld.cpp +++ b/rigctld.cpp @@ -55,13 +55,9 @@ rigCtlD::~rigCtlD() qInfo(logRigCtlD()) << "closing rigctld"; } -//void rigCtlD::receiveFrequency(freqt freq) -//{ -// emit setFrequency(0, freq); -// emit setFrequency(0, freq); -//} -void rigCtlD::receiveStateInfo(rigStateStruct* state) + +void rigCtlD::receiveStateInfo(rigstate* state) { qInfo("Setting rig state"); rigState = state; @@ -79,6 +75,7 @@ int rigCtlD::startServer(qint16 port) { qInfo(logRigCtlD()) << "started on port " << port; } + return 0; } @@ -100,7 +97,7 @@ void rigCtlD::receiveRigCaps(rigCapabilities caps) this->rigCaps = caps; } -rigCtlClient::rigCtlClient(int socketId, rigCapabilities caps, rigStateStruct* state, rigCtlD* parent) : QObject(parent) +rigCtlClient::rigCtlClient(int socketId, rigCapabilities caps, rigstate* state, rigCtlD* parent) : QObject(parent) { commandBuffer.clear(); @@ -118,27 +115,37 @@ rigCtlClient::rigCtlClient(int socketId, rigCapabilities caps, rigStateStruct* s connect(socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()), Qt::DirectConnection); connect(parent, SIGNAL(sendData(QString)), this, SLOT(sendData(QString)), Qt::DirectConnection); qInfo(logRigCtlD()) << " session connected: " << sessionId; + emit parent->stateUpdated(); // Get the current state. + } void rigCtlClient::socketReadyRead() { QByteArray data = socket->readAll(); commandBuffer.append(data); + QStringList commandList(commandBuffer.split('\n')); QString sep = "\n"; static int num = 0; - bool longReply = false; - char responseCode = 0; - QStringList response; - bool setCommand = false; - if (commandBuffer.endsWith('\n')) + + for (QString &commands : commandList) { - qDebug(logRigCtlD()) << sessionId << "command received" << commandBuffer; - commandBuffer.chop(1); // Remove \n character - if (commandBuffer.endsWith('\r')) + bool longReply = false; + char responseCode = 0; + QStringList response; + bool setCommand = false; + //commands.chop(1); // Remove \n character + if (commands.endsWith('\r')) { - commandBuffer.chop(1); // Remove \n character + commands.chop(1); // Remove \n character } + if (commands.isEmpty()) + { + continue; + } + + //qDebug(logRigCtlD()) << sessionId << "command received" << commands; + // We have a full line so process command. if (rigState == Q_NULLPTR) @@ -147,73 +154,87 @@ void rigCtlClient::socketReadyRead() return; } - if (commandBuffer[num] == ";" || commandBuffer[num] == "|" || commandBuffer[num] == ",") + if (commands[num] == ";" || commands[num] == "|" || commands[num] == ",") { - sep = commandBuffer[num].toLatin1(); + sep = commands[num].toLatin1(); num++; } - else if (commandBuffer[num] == "+") + else if (commands[num] == "+") { longReply = true; sep = "\n"; num++; } - else if (commandBuffer[num] == "#") + else if (commands[num] == "#") { - return; + continue; } - else if (commandBuffer[num].toLower() == "q") + else if (commands[num].toLower() == "q") { closeSocket(); return; } - if (commandBuffer[num] == "\\") + if (commands[num] == "\\") { num++; } - QStringList command = commandBuffer.mid(num).split(" "); + QStringList command = commands.mid(num).split(" "); - QMutexLocker locker(rigState->mutex); if (command[0] == 0xf0 || command[0] == "chk_vfo") { + chkVfoEecuted = true; QString resp; if (longReply) { resp.append(QString("ChkVFO: ")); } - resp.append(QString("%1").arg(rigState->currentVfo)); + resp.append(QString("%1").arg(rigState->getChar(CURRENTVFO))); response.append(resp); } else if (command[0] == "dump_state") { // Currently send "fake" state information until I can work out what is required! - response.append("1"); - response.append(QString("%1").arg(rigCaps.rigctlModel)); - response.append("0"); + response.append("1"); // rigctld protocol version + response.append(QString("%1").arg(rigCaps.rigctlModel)); + response.append("0"); // Print something + bandType lastBand; for (bandType band : rigCaps.bands) { - response.append(generateFreqRange(band)); + if (band != lastBand) + response.append(generateFreqRange(band)); + lastBand = band; } response.append("0 0 0 0 0 0 0"); if (rigCaps.hasTransmit) { for (bandType band : rigCaps.bands) - { - response.append(generateFreqRange(band)); + { + if (band != lastBand) + response.append(generateFreqRange(band)); + lastBand = band; } } response.append("0 0 0 0 0 0 0"); - response.append("0x1ff 1"); - response.append("0x1ff 0"); + + response.append(QString("0x%1 1").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 10").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 100").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 1000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 2500").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 5000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 6125").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 8333").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 10000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 12500").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 25000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 100000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 250000").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 1000000").arg(getRadioModes(), 0, 16)); response.append("0 0"); - response.append("0x1e 2400"); - response.append("0x2 500"); - response.append("0x1 8000"); - response.append("0x1 2400"); - response.append("0x20 15000"); - response.append("0x20 8000"); - response.append("0x40 230000"); + response.append(QString("0x%1 1200").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 2400").arg(getRadioModes(), 0, 16)); + response.append(QString("0x%1 3000").arg(getRadioModes(), 0, 16)); response.append("0 0"); response.append("9900"); response.append("9900"); @@ -252,12 +273,21 @@ void rigCtlClient::socketReadyRead() response.append(attens); + response.append("0xffffffffffffffff"); + response.append("0xffffffffffffffff"); + response.append("0xffffffffffffffff"); + response.append("0xffffffffffffffff"); + response.append("0xffffffffffffffff"); + response.append("0xffffffffffffffff"); + + /* response.append("0xffffffffffffffff"); response.append("0xffffffffffffffff"); response.append("0xfffffffff7ffffff"); response.append("0xfffffff083ffffff"); response.append("0xffffffffffffffff"); response.append("0xffffffffffffffbf"); + */ /* response.append("0x3effffff"); @@ -267,7 +297,20 @@ void rigCtlClient::socketReadyRead() response.append("0x7fffffff"); response.append("0x7fffffff"); */ - response.append("done"); + if (chkVfoEecuted) { + response.append(QString("vfo_ops=0x%1").arg(255, 0, 16)); + response.append(QString("ptt_type=0x%1").arg(rigCaps.hasTransmit, 0, 16)); + response.append(QString("has_set_vfo=0x%1").arg(1, 0, 16)); + response.append(QString("has_get_vfo=0x%1").arg(1, 0, 16)); + response.append(QString("has_set_freq=0x%1").arg(1, 0, 16)); + response.append(QString("has_get_freq=0x%1").arg(1, 0, 16)); + response.append(QString("has_set_conf=0x%1").arg(1, 0, 16)); + response.append(QString("has_get_conf=0x%1").arg(1, 0, 16)); + response.append(QString("has_power2mW=0x%1").arg(1, 0, 16)); + response.append(QString("has_mW2power=0x%1").arg(1, 0, 16)); + response.append(QString("timeout=0x%1").arg(1000, 0, 16)); + response.append("done"); + } } else if (command[0] == "f" || command[0] == "get_freq") @@ -276,12 +319,14 @@ void rigCtlClient::socketReadyRead() if (longReply) { resp.append(QString("Frequency: ")); } - if (rigState->currentVfo == 0) { - resp.append(QString("%1").arg(rigState->vfoAFreq.Hz)); + + if (rigState->getChar(CURRENTVFO)==0) { + resp.append(QString("%1").arg(rigState->getInt64(VFOAFREQ))); } else { - resp.append(QString("%1").arg(rigState->vfoBFreq.Hz)); + resp.append(QString("%1").arg(rigState->getInt64(VFOBFREQ))); } + response.append(resp); } else if (command[0] == "F" || command[0] == "set_freq") @@ -307,11 +352,12 @@ void rigCtlClient::socketReadyRead() if (ok) { freq.Hz = static_cast(newFreq); qDebug(logRigCtlD()) << QString("Set frequency: %1 (%2)").arg(freq.Hz).arg(command[1]); - emit parent->setFrequency(vfo, freq); - emit parent->setFrequency(vfo, freq); - emit parent->setFrequency(vfo, freq); - emit parent->setFrequency(vfo, freq); - emit parent->setFrequency(vfo, freq); + if (vfo == 0) { + rigState->set(VFOAFREQ, freq.Hz,true); + } + else { + rigState->set(VFOBFREQ, freq.Hz,true); + } } } else if (command[0] == "1" || command[0] == "dump_caps") @@ -341,7 +387,7 @@ void rigCtlClient::socketReadyRead() if (longReply) { resp.append(QString("PTT: ")); } - resp.append(QString("%1").arg(rigState->ptt)); + resp.append(QString("%1").arg(rigState->getBool(PTT))); response.append(resp); } else @@ -353,30 +399,27 @@ void rigCtlClient::socketReadyRead() { setCommand = true; if (rigCaps.hasPTTCommand) { - emit parent->setPTT(bool(command[1].toInt())); - emit parent->setPTT(bool(command[1].toInt())); - emit parent->setPTT(bool(command[1].toInt())); - emit parent->setPTT(bool(command[1].toInt())); - emit parent->setPTT(bool(command[1].toInt())); + rigState->set(PTT, (bool)command[1].toInt(), true); } else { responseCode = -1; } } - else if (command[0] == "v" || command[0] == "get_vfo") + else if (command[0] == "v" || command[0] == "v\nv" || command[0] == "get_vfo") { QString resp; if (longReply) { resp.append("VFO: "); } - - if (rigState->currentVfo == 0) { + + if (rigState->getChar(CURRENTVFO) == 0) { resp.append("VFOA"); } else { resp.append("VFOB"); } + response.append(resp); } else if (command.length() > 1 && (command[0] == "V" || command[0] == "set_vfo")) @@ -391,73 +434,82 @@ void rigCtlClient::socketReadyRead() response.append("MEM"); } else if (command[1] == "VFOB" || command[1] == "Sub") { - emit parent->setVFO(1); + rigState->set(CURRENTVFO, (quint8)1, true); } else { - emit parent->setVFO(0); + rigState->set(CURRENTVFO, (quint8)0, true); } } else if (command[0] == "s" || command[0] == "get_split_vfo") { + if (longReply) { - response.append(QString("Split: %1").arg(rigState->duplex)); + response.append(QString("Split: %1").arg(rigState->getChar(DUPLEX))); } else { - response.append(QString("%1").arg(rigState->duplex)); + response.append(QString("%1").arg(rigState->getChar(DUPLEX))); } - + QString resp; if (longReply) { resp.append("TX VFO: "); } - if (rigState->currentVfo == 0) + + if (rigState->getChar(CURRENTVFO) == 0) { resp.append(QString("%1").arg("VFOB")); } else { resp.append(QString("%1").arg("VFOA")); } + response.append(resp); } else if (command.length() > 1 && (command[0] == "S" || command[0] == "set_split_vfo")) { setCommand = true; + if (command[1] == "1") { - emit parent->setDuplexMode(dmSplitOn); - rigState->duplex = dmSplitOn; + rigState->set(DUPLEX, dmSplitOn, true); } else { - emit parent->setDuplexMode(dmSplitOff); - rigState->duplex = dmSplitOff; + rigState->set(DUPLEX, dmSplitOff, true); } } else if (command[0] == "\xf3" || command[0] == "get_vfo_info") { if (longReply) { - //response.append(QString("set_vfo: %1").arg(command[1])); - + if (command[1] == "?") { + if (rigState->getChar(CURRENTVFO) == 0) { + response.append(QString("set_vfo: VFOA")); + } + else + { + response.append(QString("set_vfo: VFOB")); + } + } if (command[1] == "VFOB") { - response.append(QString("Freq: %1").arg(rigState->vfoBFreq.Hz)); + response.append(QString("Freq: %1").arg(rigState->getInt64(VFOBFREQ))); } else { - response.append(QString("Freq: %1").arg(rigState->vfoAFreq.Hz)); + response.append(QString("Freq: %1").arg(rigState->getInt64(VFOAFREQ))); } - response.append(QString("Mode: %1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("Width: %1").arg(getFilter(rigState->mode, rigState->filter))); - response.append(QString("Split: %1").arg(rigState->duplex)); + response.append(QString("Mode: %1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("Width: %1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + response.append(QString("Split: %1").arg(rigState->getDuplex(DUPLEX))); response.append(QString("SatMode: %1").arg(0)); // Need to get satmode } else { if (command[1] == "VFOB") { - response.append(QString("%1").arg(rigState->vfoBFreq.Hz)); + response.append(QString("%1").arg(rigState->getInt64(VFOBFREQ))); } else { - response.append(QString("%1").arg(rigState->vfoAFreq.Hz)); + response.append(QString("%1").arg(rigState->getInt64(VFOAFREQ))); } - response.append(QString("%1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("%1").arg(getFilter(rigState->mode, rigState->filter))); + response.append(QString("%1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("%1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); } } else if (command[0] == "i" || command[0] == "get_split_freq") @@ -466,57 +518,54 @@ void rigCtlClient::socketReadyRead() if (longReply) { resp.append("TX VFO: "); } - if (rigState->currentVfo == 0) { - resp.append(QString("%1").arg(rigState->vfoBFreq.Hz)); + + if (rigState->getInt64(CURRENTVFO) == 0) { + resp.append(QString("%1").arg(rigState->getInt64(VFOBFREQ))); } else { - resp.append(QString("%1").arg(rigState->vfoAFreq.Hz)); + resp.append(QString("%1").arg(rigState->getInt64(VFOAFREQ))); } + response.append(resp); } else if (command.length() > 1 && (command[0] == "I" || command[0] == "set_split_freq")) { setCommand = true; - freqt freq; bool ok = false; double newFreq = 0.0f; newFreq = command[1].toDouble(&ok); if (ok) { - freq.Hz = static_cast(newFreq); - qDebug(logRigCtlD()) << QString("set_split_freq: %1 (%2)").arg(freq.Hz).arg(command[1]); - emit parent->setFrequency(1, freq); - emit parent->setFrequency(1, freq); - emit parent->setFrequency(1, freq); - emit parent->setFrequency(1, freq); - emit parent->setFrequency(1, freq); + qDebug(logRigCtlD()) << QString("set_split_freq: %1 (%2)").arg(newFreq).arg(command[1]); + rigState->set(VFOBFREQ, static_cast(newFreq),false); } } else if (command.length() > 2 && (command[0] == "X" || command[0] == "set_split_mode")) { setCommand = true; - } - else if (command.length() > 0 && (command[0] == "x" || command[0] == "get_split_mode")) - { - if (longReply) { - response.append(QString("TX Mode: %1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("TX Passband: %1").arg(getFilter(rigState->mode, rigState->filter))); - } - else { - response.append(QString("%1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("%1").arg(getFilter(rigState->mode, rigState->filter))); - } + } + + else if (command.length() > 0 && (command[0] == "x" || command[0] == "get_split_mode")) + { + if (longReply) { + response.append(QString("TX Mode: %1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("TX Passband: %1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + } + else { + response.append(QString("%1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("%1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + } } else if (command[0] == "m" || command[0] == "get_mode") { - if (longReply) { - response.append(QString("Mode: %1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("Passband: %1").arg(getFilter(rigState->mode, rigState->filter))); - } - else { - response.append(QString("%1").arg(getMode(rigState->mode, rigState->datamode))); - response.append(QString("%1").arg(getFilter(rigState->mode, rigState->filter))); - } + if (longReply) { + response.append(QString("TX Mode: %1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("TX Passband: %1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + } + else { + response.append(QString("%1").arg(getMode(rigState->getChar(MODE), rigState->getBool(DATAMODE)))); + response.append(QString("%1").arg(getFilter(rigState->getChar(MODE), rigState->getChar(FILTER)))); + } } else if (command[0] == "M" || command[0] == "set_mode") { @@ -540,16 +589,16 @@ void rigCtlClient::socketReadyRead() width = 2; else width = 1; - - emit parent->setMode(getMode(mode), width); + + rigState->set(MODE,getMode(mode),true); + rigState->set(FILTER,(quint8)width, true); if (mode.mid(0, 3) == "PKT") { - emit parent->setDataMode(true, width); - emit parent->setDataMode(true, width); + rigState->set(DATAMODE, true, true); } else { - emit parent->setDataMode(false, width); - emit parent->setDataMode(false, width); + rigState->set(DATAMODE, false, true); } + } else if (command[0] == "s" || command[0] == "get_split_vfo") { @@ -570,11 +619,12 @@ void rigCtlClient::socketReadyRead() if (longReply) { resp.append("RIT: "); } - resp.append(QString("%1").arg(0)); + resp.append(QString("%1").arg(rigState->getInt32(RITVALUE))); response.append(resp); - } + } else if (command[0] == "J" || command[0] == "set_rit") { + rigState->set(RITVALUE, command[1].toInt(),true); setCommand = true; } else if (command[0] == "y" || command[0] == "get_ant") @@ -585,34 +635,35 @@ void rigCtlClient::socketReadyRead() if (longReply) { response.append(QString("AntCurr: %1").arg(getAntName((unsigned char)command[1].toInt()))); response.append(QString("Option: %1").arg(0)); - response.append(QString("AntTx: %1").arg(getAntName(rigState->antenna))); - response.append(QString("AntRx: %1").arg(getAntName(rigState->antenna))); + response.append(QString("AntTx: %1").arg(getAntName(rigState->getChar(ANTENNA)))); + response.append(QString("AntRx: %1").arg(getAntName(rigState->getChar(ANTENNA)))); } else { response.append(QString("%1").arg(getAntName((unsigned char)command[1].toInt()))); response.append(QString("%1").arg(0)); - response.append(QString("%1").arg(getAntName(rigState->antenna))); - response.append(QString("%1").arg(getAntName(rigState->antenna))); + response.append(QString("%1").arg(getAntName(rigState->getChar(ANTENNA)))); + response.append(QString("%1").arg(getAntName(rigState->getChar(ANTENNA)))); } } } - else if (command[0] == "Y" || command[0] == "set_ant") + else if (command.length() > 1 && (command[0] == "Y" || command[0] == "set_ant")) { - qInfo(logRigCtlD()) << "set_ant:"; - setCommand = true; + setCommand = true; + qInfo(logRigCtlD()) << "set_ant:" << command[1]; + rigState->set(ANTENNA,antFromName(command[1]),true); } else if (command[0] == "z" || command[0] == "get_xit") { - QString resp; - if (longReply) { - resp.append("XIT: "); - } - resp.append(QString("%1").arg(0)); - response.append(resp); + QString resp; + if (longReply) { + resp.append("XIT: "); + } + resp.append(QString("%1").arg(0)); + response.append(resp); } else if (command[0] == "Z" || command[0] == "set_xit") { - setCommand = true; + setCommand = true; } else if (command.length() > 1 && (command[0] == "l" || command[0] == "get_level")) { @@ -623,52 +674,54 @@ void rigCtlClient::socketReadyRead() } if (command[1] == "STRENGTH") { + if (rigCaps.model == model7610) - value = getCalibratedValue(rigState->sMeter, IC7610_STR_CAL); + value = getCalibratedValue(rigState->getChar(SMETER), IC7610_STR_CAL); else if (rigCaps.model == model7850) - value = getCalibratedValue(rigState->sMeter, IC7850_STR_CAL); + value = getCalibratedValue(rigState->getChar(SMETER), IC7850_STR_CAL); else - value = getCalibratedValue(rigState->sMeter, IC7300_STR_CAL); + value = getCalibratedValue(rigState->getChar(SMETER), IC7300_STR_CAL); //qInfo(logRigCtlD()) << "Calibration IN:" << rigState->sMeter << "OUT" << value; resp.append(QString("%1").arg(value)); } + else if (command[1] == "AF") { - resp.append(QString("%1").arg((float)rigState->afGain / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(AFGAIN) / 255.0)); } else if (command[1] == "RF") { - resp.append(QString("%1").arg((float)rigState->rfGain / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(RFGAIN) / 255.0)); } else if (command[1] == "SQL") { - resp.append(QString("%1").arg((float)rigState->squelch / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(SQUELCH) / 255.0)); } else if (command[1] == "COMP") { - resp.append(QString("%1").arg((float)rigState->compLevel / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(COMPLEVEL) / 255.0)); } else if (command[1] == "MICGAIN") { - resp.append(QString("%1").arg((float)rigState->micGain / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(MICGAIN) / 255.0)); } else if (command[1] == "MON") { - resp.append(QString("%1").arg((float)rigState->monitorLevel / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(MONITORLEVEL) / 255.0)); } else if (command[1] == "VOXGAIN") { - resp.append(QString("%1").arg((float)rigState->voxGain / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(VOXGAIN) / 255.0)); } else if (command[1] == "ANTIVOX") { - resp.append(QString("%1").arg((float)rigState->antiVoxGain / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(ANTIVOXGAIN) / 255.0)); } else if (command[1] == "RFPOWER") { - resp.append(QString("%1").arg((float)rigState->txPower / 255.0)); + resp.append(QString("%1").arg((float)rigState->getChar(TXPOWER) / 255.0)); } else if (command[1] == "PREAMP") { - resp.append(QString("%1").arg((float)rigState->preamp / 255.0)); + resp.append(QString("%1").arg(rigState->getChar(PREAMP)*10)); } else if (command[1] == "ATT") { - resp.append(QString("%1").arg((float)rigState->attenuator / 255.0)); + resp.append(QString("%1").arg(rigState->getChar(ATTENUATOR))); } else { resp.append(QString("%1").arg(value)); } - + response.append(resp); } else if (command.length() > 2 && (command[0] == "L" || command[0] == "set_level")) @@ -677,55 +730,49 @@ void rigCtlClient::socketReadyRead() setCommand = true; if (command[1] == "AF") { value = command[2].toFloat() * 255; - emit parent->setAfGain(value); - rigState->afGain = value; + rigState->set(AFGAIN, value, true); } else if (command[1] == "RF") { value = command[2].toFloat() * 255; - emit parent->setRfGain(value); - rigState->rfGain = value; + rigState->set(RFGAIN, value, true); } else if (command[1] == "SQL") { value = command[2].toFloat() * 255; - emit parent->setSql(value); - rigState->squelch = value; + rigState->set(SQUELCH, value, true); } else if (command[1] == "COMP") { value = command[2].toFloat() * 255; - emit parent->setCompLevel(value); - rigState->compLevel = value; + rigState->set(COMPLEVEL, value, true); } else if (command[1] == "MICGAIN") { value = command[2].toFloat() * 255; - emit parent->setMicGain(value); - rigState->micGain = value; + rigState->set(MICGAIN, value, true); } else if (command[1] == "MON") { value = command[2].toFloat() * 255; - emit parent->setMonitorLevel(value); - rigState->monitorLevel = value; + rigState->set(MONITORLEVEL, value, true); } else if (command[1] == "VOXGAIN") { value = command[2].toFloat() * 255; - emit parent->setVoxGain(value); - rigState->voxGain = value; + rigState->set(VOXGAIN, value, true); } else if (command[1] == "ANTIVOX") { value = command[2].toFloat() * 255; - emit parent->setAntiVoxGain(value); - rigState->antiVoxGain = value; + rigState->set(ANTIVOXGAIN, value, true); } else if (command[1] == "ATT") { - value = command[2].toFloat(); - emit parent->setAttenuator(value); - rigState->attenuator = value; + value = command[2].toInt(); + rigState->set(ATTENUATOR, value, true); } else if (command[1] == "PREAMP") { - value = command[2].toFloat()/10; - emit parent->setPreamp(value); - rigState->preamp = value; + value = command[2].toFloat() / 10; + rigState->set(PREAMP, value, true); } - + else if (command[1] == "AGC") { + value = command[2].toInt();; + rigState->set(AGC, value, true); + } + qInfo(logRigCtlD()) << "Setting:" << command[1] << command[2] << value; } @@ -736,271 +783,272 @@ void rigCtlClient::socketReadyRead() if (longReply) { resp.append(QString("Func Status: ")); } - if (command[1] == "FAGC") { - result=rigState->fagcFunc; + result=rigState->getBool(FAGCFUNC); } else if (command[1] == "NB") { - result=rigState->nbFunc; + result = rigState->getBool(NBFUNC); } else if (command[1] == "COMP") { - result=rigState->compFunc; + result=rigState->getBool(COMPFUNC); } else if (command[1] == "VOX") { - result = rigState->voxFunc; + result = rigState->getBool(VOXFUNC); } else if (command[1] == "TONE") { - result = rigState->toneFunc; + result = rigState->getBool(TONEFUNC); } else if (command[1] == "TSQL") { - result = rigState->tsqlFunc; + result = rigState->getBool(TSQLFUNC); } else if (command[1] == "SBKIN") { - result = rigState->sbkinFunc; + result = rigState->getBool(SBKINFUNC); } else if (command[1] == "FBKIN") { - result = rigState->fbkinFunc; + result = rigState->getBool(FBKINFUNC); } else if (command[1] == "ANF") { - result = rigState->anfFunc; + result = rigState->getBool (ANFFUNC); } else if (command[1] == "NR") { - result = rigState->nrFunc; + result = rigState->getBool(NRFUNC); } else if (command[1] == "AIP") { - result = rigState->aipFunc; + result = rigState->getBool(AIPFUNC); } else if (command[1] == "APF") { - result = rigState->apfFunc; + result = rigState->getBool(APFFUNC); } else if (command[1] == "MON") { - result = rigState->monFunc; + result = rigState->getBool(MONFUNC); } else if (command[1] == "MN") { - result = rigState->mnFunc; + result = rigState->getBool(MNFUNC); } else if (command[1] == "RF") { - result = rigState->rfFunc; + result = rigState->getBool(RFFUNC); } else if (command[1] == "ARO") { - result = rigState->aroFunc; + result = rigState->getBool(AROFUNC); } else if (command[1] == "MUTE") { - result = rigState->muteFunc; + result = rigState->getBool(MUTEFUNC); } else if (command[1] == "VSC") { - result = rigState->vscFunc; + result = rigState->getBool(VSCFUNC); } else if (command[1] == "REV") { - result = rigState->revFunc; + result = rigState->getBool(REVFUNC); } else if (command[1] == "SQL") { - result = rigState->sqlFunc; + result = rigState->getBool(SQLFUNC); } else if (command[1] == "ABM") { - result = rigState->abmFunc; + result = rigState->getBool(ABMFUNC); } else if (command[1] == "BC") { - result = rigState->bcFunc; + result = rigState->getBool(BCFUNC); } else if (command[1] == "MBC") { - result = rigState->mbcFunc; + result = rigState->getBool(MBCFUNC); } else if (command[1] == "RIT") { - result = rigState->ritFunc; + result = rigState->getBool(RITFUNC); } else if (command[1] == "AFC") { - result = rigState->afcFunc; + result = rigState->getBool(AFCFUNC); } else if (command[1] == "SATMODE") { - result = rigState->satmodeFunc; + result = rigState->getBool(SATMODEFUNC); } else if (command[1] == "SCOPE") { - result = rigState->scopeFunc; + result = rigState->getBool(SCOPEFUNC); } else if (command[1] == "RESUME") { - result = rigState->resumeFunc; + result = rigState->getBool(RESUMEFUNC); } else if (command[1] == "TBURST") { - result = rigState->tburstFunc; + result = rigState->getBool(TBURSTFUNC); } else if (command[1] == "TUNER") { - result = rigState->tunerFunc; + result = rigState->getBool(TUNERFUNC); } else if (command[1] == "LOCK") { - result = rigState->lockFunc; + result = rigState->getBool(LOCKFUNC); } else { qInfo(logRigCtlD()) << "Unimplemented func:" << command[0] << command[1]; } - + resp.append(QString("%1").arg(result)); response.append(resp); } else if (command.length() >2 && (command[0] == "U" || command[0] == "set_func")) { setCommand = true; + if (command[1] == "FAGC") { - rigState->fagcFunc = (bool)command[2].toInt(); + rigState->set(FAGCFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "NB") { - rigState->nbFunc = (bool)command[2].toInt(); + rigState->set(NBFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "COMP") { - rigState->compFunc = (bool)command[2].toInt(); + rigState->set(COMPFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "VOX") { - rigState->voxFunc = (bool)command[2].toInt(); + rigState->set(VOXFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "TONE") { - rigState->toneFunc = (bool)command[2].toInt(); + rigState->set(TONEFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "TSQL") { - rigState->tsqlFunc = (bool)command[2].toInt(); + rigState->set(TSQLFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "SBKIN") { - rigState->sbkinFunc = (bool)command[2].toInt(); + rigState->set(SBKINFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "FBKIN") { - rigState->fbkinFunc = (bool)command[2].toInt(); + rigState->set(FBKINFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "ANF") { - rigState->anfFunc = (bool)command[2].toInt(); + rigState->set(ANFFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "NR") { - rigState->nrFunc = (bool)command[2].toInt(); + rigState->set(NRFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "AIP") { - rigState->aipFunc = (bool)command[2].toInt(); + rigState->set(AIPFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "APF") { - rigState->apfFunc = (bool)command[2].toInt(); + rigState->set(APFFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "MON") { - rigState->monFunc = (bool)command[2].toInt(); + rigState->set(MONFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "MN") { - rigState->mnFunc = (bool)command[2].toInt(); + rigState->set(MNFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "RF") { - rigState->rfFunc = (bool)command[2].toInt(); + rigState->set(RFFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "ARO") { - rigState->aroFunc = (bool)command[2].toInt(); + rigState->set(AROFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "MUTE") { - rigState->muteFunc = (bool)command[2].toInt(); + rigState->set(MUTEFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "VSC") { - rigState->vscFunc = (bool)command[2].toInt(); + rigState->set(VSCFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "REV") { - rigState->revFunc = (bool)command[2].toInt(); + rigState->set(REVFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "SQL") { - rigState->sqlFunc = (bool)command[2].toInt(); + rigState->set(SQLFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "ABM") { - rigState->abmFunc = (bool)command[2].toInt(); + rigState->set(ABMFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "BC") { - rigState->bcFunc = (bool)command[2].toInt(); + rigState->set(BCFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "MBC") { - rigState->mbcFunc = (bool)command[2].toInt(); + rigState->set(MBCFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "RIT") { - rigState->ritFunc = (bool)command[2].toInt(); + rigState->set(RITFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "AFC") { - rigState->afcFunc = (bool)command[2].toInt(); + rigState->set(AFCFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "SATMODE") { - rigState->satmodeFunc = (bool)command[2].toInt(); + rigState->set(SATMODEFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "SCOPE") { - rigState->scopeFunc = (bool)command[2].toInt(); + rigState->set(SCOPEFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "RESUME") { - rigState->resumeFunc = (bool)command[2].toInt(); + rigState->set(RESUMEFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "TBURST") { - rigState->tburstFunc = (bool)command[2].toInt(); + rigState->set(TBURSTFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "TUNER") - { - rigState->tunerFunc = (bool)command[2].toInt(); + { + rigState->set(TUNERFUNC, (quint8)command[2].toInt(), true); } else if (command[1] == "LOCK") { - rigState->lockFunc = (bool)command[2].toInt(); + rigState->set(LOCKFUNC, (quint8)command[2].toInt(), true); } else { qInfo(logRigCtlD()) << "Unimplemented func:" << command[0] << command[1] << command[2]; } + qInfo(logRigCtlD()) << "Setting:" << command[1] << command[2]; } - else if (command.length() > 1 && (command[0] == 0x88 || command[0] == "get_powerstat")) + else if (command.length() > 0 && (command[0] == 0x88 || command[0] == "get_powerstat")) { QString resp; @@ -1013,17 +1061,17 @@ void rigCtlClient::socketReadyRead() } else if (command.length() > 1 && (command[0] == 0x87 || command[0] == "set_powerstat")) { - setCommand = true; - if (command[1] == "0") - { - emit parent->sendPowerOff(); + setCommand = true; + if (command[1] == "0") + { + rigState->set(POWERONOFF, false, true); } - else { - emit parent->sendPowerOn(); + else { + rigState->set(POWERONOFF, true, true); } } else { - qInfo(logRigCtlD()) << "Unimplemented command" << commandBuffer; + qInfo(logRigCtlD()) << "Unimplemented command" << commands; } if (longReply) { if (command.length() == 2) @@ -1034,6 +1082,12 @@ void rigCtlClient::socketReadyRead() sendData(QString("%1: %2 %3 %4%5").arg(command[0]).arg(command[1]).arg(command[2]).arg(command[3]).arg(sep)); } + if (setCommand) + { + // This was a set command so state has likely been updated. + emit parent->stateUpdated(); + } + if (setCommand || responseCode != 0 || longReply) { if (responseCode == 0) { response.append(QString("RPRT 0")); @@ -1048,15 +1102,15 @@ void rigCtlClient::socketReadyRead() if (str != "") sendData(QString("%1%2").arg(str).arg(sep)); } - if (sep != "\n") { sendData(QString("\n")); } - commandBuffer.clear(); - sep = " "; + sep = "\n"; num = 0; + } + commandBuffer.clear(); } void rigCtlClient::socketDisconnected() @@ -1073,7 +1127,7 @@ void rigCtlClient::closeSocket() void rigCtlClient::sendData(QString data) { - qDebug(logRigCtlD()) << "Sending:" << data; + //qDebug(logRigCtlD()) << "Sending:" << data; if (socket != Q_NULLPTR && socket->isValid() && socket->isOpen()) { socket->write(data.toLatin1()); @@ -1146,18 +1200,18 @@ QString rigCtlClient::getFilter(unsigned char mode, unsigned char filter) { QString rigCtlClient::getMode(unsigned char mode, bool datamode) { QString ret; - if (datamode) { - ret="PKT"; - } switch (mode) { case 0: + if (datamode) { ret = "PKT"; } ret.append("LSB"); break; case 1: + if (datamode) { ret = "PKT"; } ret.append("USB"); break; case 2: + if (datamode) { ret = "PKT"; } ret.append("AM"); break; case 3: @@ -1167,6 +1221,7 @@ QString rigCtlClient::getMode(unsigned char mode, bool datamode) { ret.append("RTTY"); break; case 5: + if (datamode) { ret = "PKT"; } ret.append("FM"); break; case 6: @@ -1179,12 +1234,15 @@ QString rigCtlClient::getMode(unsigned char mode, bool datamode) { ret.append("RTTYR"); break; case 12: + if (datamode) { ret = "PKT"; } ret.append("USB"); break; case 17: + if (datamode) { ret = "PKT"; } ret.append("LSB"); break; case 22: + if (datamode) { ret = "PKT"; } ret.append("FM"); break; } @@ -1324,7 +1382,7 @@ QString rigCtlClient::generateFreqRange(bandType band) QString ret = ""; if (lowFreq > 0 && highFreq > 0) { - ret = QString("%1 %2 0x%3 %4 %5 0x%6 0x%7").arg(lowFreq).arg(highFreq).arg(getRadioModes(),0,16).arg(-1).arg(-1).arg(0x16000003,0,16).arg(getAntennas(),0,16); + ret = QString("%1.000000 %2.000000 0x%3 %4 %5 0x%6 0x%7").arg(lowFreq).arg(highFreq).arg(getRadioModes(),0,16).arg(-1).arg(-1).arg(0x16000003,0,16).arg(getAntennas(),0,16); } return ret; } @@ -1349,13 +1407,18 @@ quint64 rigCtlClient::getRadioModes() QString curMode = mode.name; if (!strcmp(curMode.toLocal8Bit(), mode_str[i].str)) { + //qDebug(logRigCtlD()) << "Found mode:" << mode.name << mode_str[i].mode; modes |= mode_str[i].mode; } if (rigCaps.hasDataModes) { curMode = "PKT" + mode.name; if (!strcmp(curMode.toLocal8Bit(), mode_str[i].str)) { - modes |= mode_str[i].mode; + if (mode.name == "LSB" || mode.name == "USB" || mode.name == "FM" || mode.name == "AM") + { + // qDebug(logRigCtlD()) << "Found data mode:" << mode.name << mode_str[i].mode; + modes |= mode_str[i].mode; + } } } } @@ -1380,6 +1443,28 @@ QString rigCtlClient::getAntName(unsigned char ant) return ret; } +unsigned char rigCtlClient::antFromName(QString name) { + unsigned char ret; + + if (name == "ANT1") + ret = 0; + else if (name == "ANT2") + ret = 1; + else if (name == "ANT3") + ret = 2; + else if (name == "ANT4") + ret = 3; + else if (name == "ANT5") + ret = 4; + else if (name == "ANT_UNKNOWN") + ret = 30; + else if (name == "ANT_CURR") + ret = 31; + else + ret = 99; + return ret; +} + int rigCtlClient::getCalibratedValue(unsigned char meter,cal_table_t cal) { int interp; diff --git a/rigctld.h b/rigctld.h index 130ae5e..d86818d 100644 --- a/rigctld.h +++ b/rigctld.h @@ -19,6 +19,7 @@ #include #include "rigcommander.h" +#include "rigstate.h" #define CONSTANT_64BIT_FLAG(BIT) (1ull << (BIT)) @@ -343,7 +344,7 @@ signals: void setVFO(unsigned char vfo); void setSplit(unsigned char split); void setDuplexMode(duplexMode dm); - + void stateUpdated(); // Power void sendPowerOn(); void sendPowerOff(); @@ -368,11 +369,11 @@ signals: public slots: virtual void incomingConnection(qintptr socketDescriptor); void receiveRigCaps(rigCapabilities caps); - void receiveStateInfo(rigStateStruct* state); + void receiveStateInfo(rigstate* state); // void receiveFrequency(freqt freq); private: - rigStateStruct* rigState = Q_NULLPTR; + rigstate* rigState = Q_NULLPTR; }; @@ -382,7 +383,7 @@ class rigCtlClient : public QObject public: - explicit rigCtlClient(int socket, rigCapabilities caps, rigStateStruct *state, rigCtlD* parent = Q_NULLPTR); + explicit rigCtlClient(int socket, rigCapabilities caps, rigstate *state, rigCtlD* parent = Q_NULLPTR); int getSocketId(); @@ -399,8 +400,9 @@ protected: private: rigCapabilities rigCaps; - rigStateStruct* rigState = Q_NULLPTR; + rigstate* rigState = Q_NULLPTR; rigCtlD* parent; + bool chkVfoEecuted=false; QString getMode(unsigned char mode, bool datamode); unsigned char getMode(QString modeString); QString getFilter(unsigned char mode, unsigned char filter); @@ -408,6 +410,7 @@ private: unsigned char getAntennas(); quint64 getRadioModes(); QString getAntName(unsigned char ant); + unsigned char antFromName(QString name); int getCalibratedValue(unsigned char meter,cal_table_t cal); }; diff --git a/rigstate.h b/rigstate.h new file mode 100644 index 0000000..8722f9e --- /dev/null +++ b/rigstate.h @@ -0,0 +1,127 @@ +#ifndef RIGSTATEH +#define RIGSTATEH + +#include +#include +#include +#include +#include +#include + +#include "rigcommander.h" +#include "rigidentities.h" + +// Meters at the end as they are ALWAYS updated from the rig! +enum stateTypes { VFOAFREQ, VFOBFREQ, CURRENTVFO, PTT, MODE, FILTER, DUPLEX, DATAMODE, ANTENNA, RXANTENNA, CTCSS, TSQL, DTCS, CSQL, + PREAMP, AGC, ATTENUATOR, MODINPUT, AFGAIN, RFGAIN, SQUELCH, TXPOWER, MICGAIN, COMPLEVEL, MONITORLEVEL, VOXGAIN, ANTIVOXGAIN, + 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, + NBLEVEL, NBDEPTH, NBWIDTH, NRLEVEL, RIGINPUT, POWERONOFF, RITVALUE, + RESUMEFUNC, TBURSTFUNC, TUNERFUNC, LOCKFUNC, SMETER, POWERMETER, SWRMETER, ALCMETER, COMPMETER, VOLTAGEMETER, CURRENTMETER +}; + +struct value { + quint64 _value=0; + bool _valid = false; + bool _updated = false; + QDateTime _dateUpdated; +}; + +class rigstate +{ + +public: + + void invalidate(stateTypes s) { map[s]._valid = false; } + bool isValid(stateTypes s) { return map[s]._valid; } + bool isUpdated(stateTypes s) { return map[s]._updated; } + QDateTime whenUpdated(stateTypes s) { return map[s]._dateUpdated; } + + void set(stateTypes s, quint64 x, bool u) { + if (x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + void set(stateTypes s, qint32 x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + void set(stateTypes s, quint16 x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + void set(stateTypes s, quint8 x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + void set(stateTypes s, bool x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + void set(stateTypes s, duplexMode x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + + void set(stateTypes s, rigInput x, bool u) { + if ((quint64)x != map[s]._value) { + _mutex.lock(); + map[s]._value = (quint64)x; + map[s]._valid = true; + map[s]._updated = u; + map[s]._dateUpdated = QDateTime::currentDateTime(); + _mutex.unlock(); + } + } + + bool getBool(stateTypes s) { return map[s]._value != 0; } + quint8 getChar(stateTypes s) { return (quint8)map[s]._value; } + quint16 getInt16(stateTypes s) { return (qint16)map[s]._value; } + qint32 getInt32(stateTypes s) { return (qint32)map[s]._value; } + quint64 getInt64(stateTypes s) { return map[s]._value; } + duplexMode getDuplex(stateTypes s) { return(duplexMode)map[s]._value; } + rigInput getInput(stateTypes s) { return(rigInput)map[s]._value; } + QMap map; + + +private: + //std::map > values; + QMutex _mutex; +}; + +#endif \ No newline at end of file diff --git a/udpserver.cpp b/udpserver.cpp index 9f6527c..d7dd5c8 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -96,6 +96,8 @@ udpServer::~udpServer() udpAudio->close(); delete udpAudio; } + emit haveNetworkStatus(QString("")); + } diff --git a/udpserver.h b/udpserver.h index 1bfbacd..4da37de 100644 --- a/udpserver.h +++ b/udpserver.h @@ -19,7 +19,6 @@ #include -#include #include "packettypes.h" #include "rigidentities.h" #include "audiohandler.h" @@ -34,6 +33,28 @@ struct SEQBUFENTRY { quint8 retransmitCount; }; + +struct SERVERUSER { + QString username; + QString password; + quint8 userType; +}; + +struct SERVERCONFIG { + bool enabled; + bool lan; + quint16 controlPort; + quint16 civPort; + quint16 audioPort; + int audioOutput; + int audioInput; + quint8 resampleQuality; + quint32 baudRate; + + QList users; +}; + + class udpServer : public QObject { Q_OBJECT diff --git a/udpserversetup.cpp b/udpserversetup.cpp deleted file mode 100644 index 72b5996..0000000 --- a/udpserversetup.cpp +++ /dev/null @@ -1,127 +0,0 @@ -#include "udpserversetup.h" -#include "ui_udpserversetup.h" -#include "logcategories.h" - -extern void passcode(QString in,QByteArray& out); - -udpServerSetup::udpServerSetup(QWidget* parent) : - QDialog(parent), - ui(new Ui::udpServerSetup) -{ - ui->setupUi(this); - addUserLine("", "", 0); // Create a blank row if we never receive config. - - // Get any stored config information from the main form. - SERVERCONFIG config; - emit serverConfig(config,false); // Just send blank server config. -} - -udpServerSetup::~udpServerSetup() -{ - delete ui; -} - -// Slot to receive config. -void udpServerSetup::receiveServerConfig(SERVERCONFIG conf) -{ - qInfo() << "Getting server config"; - - ui->enableCheckbox->setChecked(conf.enabled); - ui->controlPortText->setText(QString::number(conf.controlPort)); - ui->civPortText->setText(QString::number(conf.civPort)); - ui->audioPortText->setText(QString::number(conf.audioPort)); - - int row = 0; - - for (int i = 0; i < ui->usersTable->rowCount(); i++) - { - ui->usersTable->removeRow(i); - } - - foreach (SERVERUSER user, conf.users) - { - if (user.username != "" && user.password != "") - { - addUserLine(user.username, user.password, user.userType); - row++; - } - } - - if (row == 0) { - addUserLine("", "", 0); - } - -} - -void udpServerSetup::accept() -{ - qInfo() << "Server config stored"; - SERVERCONFIG config; - config.enabled = ui->enableCheckbox->isChecked(); - config.controlPort = ui->controlPortText->text().toInt(); - config.civPort = ui->civPortText->text().toInt(); - config.audioPort = ui->audioPortText->text().toInt(); - - config.users.clear(); - - for (int row = 0; row < ui->usersTable->model()->rowCount(); row++) - { - if (ui->usersTable->item(row, 0) != NULL) - { - SERVERUSER user; - user.username = ui->usersTable->item(row, 0)->text(); - QLineEdit* password = (QLineEdit*)ui->usersTable->cellWidget(row, 1); - user.password = password->text(); - QComboBox* comboBox = (QComboBox*)ui->usersTable->cellWidget(row, 2); - user.userType = comboBox->currentIndex(); - config.users.append(user); - - } - else { - ui->usersTable->removeRow(row); - } - } - - emit serverConfig(config,true); - this->hide(); -} - - -void udpServerSetup::on_usersTable_cellClicked(int row, int col) -{ - qInfo() << "Clicked on " << row << "," << col; - if (row == ui->usersTable->model()->rowCount() - 1 && ui->usersTable->item(row, 0) != NULL) { - addUserLine("", "", 0); - } -} - -void udpServerSetup::onPasswordChanged() -{ - int row = sender()->property("row").toInt(); - QLineEdit* password = (QLineEdit*)ui->usersTable->cellWidget(row, 1); - QByteArray pass; - passcode(password->text(), pass); - password->setText(pass); - qInfo() << "password row" << row << "changed"; -} - -void udpServerSetup::addUserLine(const QString& user, const QString& pass, const int& type) -{ - ui->usersTable->insertRow(ui->usersTable->rowCount()); - ui->usersTable->setItem(ui->usersTable->rowCount() - 1, 0, new QTableWidgetItem(user)); - ui->usersTable->setItem(ui->usersTable->rowCount() - 1, 1, new QTableWidgetItem()); - ui->usersTable->setItem(ui->usersTable->rowCount() - 1, 2, new QTableWidgetItem()); - - QLineEdit* password = new QLineEdit(); - password->setProperty("row", (int)ui->usersTable->rowCount() - 1); - password->setEchoMode(QLineEdit::PasswordEchoOnEdit); - password->setText(pass); - connect(password, SIGNAL(editingFinished()), this, SLOT(onPasswordChanged())); - ui->usersTable->setCellWidget(ui->usersTable->rowCount() - 1, 1, password); - - QComboBox* comboBox = new QComboBox(); - comboBox->insertItems(0, { "Full User","Full with no TX","Monitor only" }); - comboBox->setCurrentIndex(type); - ui->usersTable->setCellWidget(ui->usersTable->rowCount() - 1, 2, comboBox); - -} diff --git a/udpserversetup.h b/udpserversetup.h deleted file mode 100644 index 54d47c4..0000000 --- a/udpserversetup.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef UDPSERVERSETUP_H -#define UDPSERVERSETUP_H - -#include -#include -#include - -#include - - -struct SERVERUSER { - QString username; - QString password; - quint8 userType; -}; - -struct SERVERCONFIG { - bool enabled; - bool lan; - quint16 controlPort; - quint16 civPort; - quint16 audioPort; - int audioOutput; - int audioInput; - quint8 resampleQuality; - quint32 baudRate; - - QList users; -}; - -namespace Ui { - class udpServerSetup; -} - -class udpServerSetup : public QDialog -{ - Q_OBJECT - -public: - explicit udpServerSetup(QWidget* parent = 0); - ~udpServerSetup(); - -private slots: - void on_usersTable_cellClicked(int row, int col); - void onPasswordChanged(); - -public slots: - void receiveServerConfig(SERVERCONFIG conf); - -signals: - void serverConfig(SERVERCONFIG conf, bool store); - -private: - Ui::udpServerSetup* ui; - void accept(); - QList userTypes; - void addUserLine(const QString &user, const QString &pass, const int &type); -}; - -#endif // UDPSERVER_H diff --git a/wfmain.ui b/wfmain.ui index f5b6cbd..a938ee3 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -6,8 +6,8 @@ 0 0 - 948 - 554 + 946 + 569 @@ -2038,324 +2038,132 @@ Settings - + - - - - - Draw Peaks - - - - - - - When tuning, set lower digits to zero - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - + + + 10 + - 0 + 10 - - - Use System Theme - - - - - - - Waterfall Dark Theme - - - - - - - Anti-Alias Waterfall - - - - - - - Interpolate Waterfall - - - true - - - - - - - Show full screen - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - <html><head/><body><p>Click here to adjust the frequency reference on the IC-9700.</p></body></html> - - - Adjust Reference - - - - - - - Satellite Ops - - - - - - - Modulation Input: - - - - - - - Modulation Input - - - Transmit modulation source - - - QComboBox::AdjustToContents - - - - - - - Data Mod Input: - - - - - - - Data Modulation Input - - - Transmit Data-mode modulation input source - - - QComboBox::AdjustToContents - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - PTT On - - - Ctrl+S - - - - - - - PTT Off - - - - - - - Enable PTT Controls - - - - - - - Secondary Meter Selection: - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - <html><head/><body><p>Select this option if the rig is pluged into the computer using a USB cable or a serial connection. </p></body></html> - - - Connect over USB (serial) - - - radioConnectionSerialNetworkGrp - - - - - - - Serial Device: - - - - - - - <html><head/><body><p>Select a serial port here. </p><p>Once selected, check &quot;Enable USB(serial), press &quot;Save Settings&quot;, exit, and re-start wfview. </p></body></html> - - - Serial Device Selector - - - - - - - Baud: - - - - - - - <html><head/><body><p>Baud rate selection menu. </p><p>For the IC-7300 select 115200. </p><p>Older rigs may require other settings. </p><p>Be sure to match what baud rate the rig is set to. Using the highese supported baud rate for the radio is recommended. </p><p>Please press &quot;Save Settings&quot; and re-launc wfview for this to take effect.</p></body></html> - - - baud rate - - - baud rate selection menu - - - - - - - <html><head/><body><p>Press here to set up the built-in rig server. The built-in server is intended to allow access over the network to a serial or USB-connected radio. </p></body></html> - - - Server Setup - - - - - - - <html><head/><body><p>If you are using an older (year 2010) radio, you may need to enable this option to manually specify the CI-V address. This option is also useful for radios that do not have CI-V Transceive enabled and thus will not answer our broadcast query for connected rigs on the CI-V bus.</p><p>If you have a modern radio with CI-V Transceive enabled, you should not need to check this box. </p><p>You will need to Save Settings and re-launch wfview for this to take effect. </p></body></html> - - - Manual Radio CI-V Address: - - - - - - - false - + - 50 + 150 0 - 50 + 150 16777215 - - <html><head/><body><p>Enter the address in as hexidecimal, without any prefix, just as the radio presents the address in the menu. </p><p>Here are some common examples:</p> + + + + + + 0 + + + + + + + + + + 140 + 0 + + + + Radio Connection + + + + + + Serial (USB) + + + buttonGroup + + + + + + + Network + + + buttonGroup + + + + + + + + + + + 300 + 0 + + + + + 300 + 16777215 + + + + CI-V and Model + + + + + + <html><head/><body><p>If you are using an older (year 2010) radio, you may need to enable this option to manually specify the CI-V address. This option is also useful for radios that do not have CI-V Transceive enabled and thus will not answer our broadcast query for connected rigs on the CI-V bus.</p><p>If you have a modern radio with CI-V Transceive enabled, you should not need to check this box. </p><p>You will need to Save Settings and re-launch wfview for this to take effect. </p></body></html> + + + Manual Radio CI-V Address: + + + + + + + <html><head/><body><p>Only check for older radios!</p><p>This checkbox forces wfview to trust that the CI-V address is also the model number of the radio. This is only useful for older radios that do not reply to our Rig ID requests (0x19 0x00). Do not check this box unless you have an older radio. </p></body></html> + + + Use CI-V address as Model ID too + + + + + + + false + + + + 50 + 0 + + + + + 50 + 16777215 + + + + <html><head/><body><p>Enter the address in as hexidecimal, without any prefix, just as the radio presents the address in the menu. </p><p>Here are some common examples:</p> <p>IC-706: 58 <br/>IC-756: 50 <br/>IC-756 Pro: 5C @@ -2367,496 +2175,1493 @@ <br/>IC-7300: 94 </p><p>This setting is typically needed for older radios and for radios that do not have CI-V Transceive enabled. </p> <p>After changing, press Save Settings and re-launch wfview.</p></body></html> - - - auto - - - - - - - <html><head/><body><p>Only check for older radios!</p><p>This checkbox forces wfview to trust that the CI-V address is also the model number of the radio. This is only useful for older radios that do not reply to our Rig ID requests (0x19 0x00). Do not check this box unless you have an older radio. </p></body></html> - - - Use as Model too - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - <html><head/><body><p>Connection to the radio is via network. </p><p>This means you are connecting to a radio with native ethernet or wifi, such as the IC-705, IC-7610, IC-7850, IC-R8600, or IC-9700</p><p>You should also select this option if you are connecting to another instance of wfview over a network. </p></body></html> - - - Connect over LAN - - - radioConnectionSerialNetworkGrp - - - - - - - Press here to initiate the network connection to the rig. - - - Connect - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::RightToLeft - - - Enable RigCtld - - - - - - - Port - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Virtual Serial Port - - - - - - - <html><head/><body><p>Use this to define a virtual serial port. </p><p><br/></p><p>On Windows, the virtual serial port can be used to connect to a serial port loopback device, through which other programs can connect to the radio. </p><p><br/></p><p>On Linux and macOS, the port defined here is a pseudo-terminal device, which may be connected to directly by any program designed for a serial connection. </p></body></html> - - - Virtual Serial Port Selector - + + + auto + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Serial Connected Radios + + + + + + Serial Device: + + + + + + + + 180 + 0 + + + + + 180 + 16777215 + + + + + + + + Baud Rate + + + + + + + + 120 + 16777215 + + + + + + + + <html><head/><body><p>This feature is for older radios that respond best to an RTS serial port signal than a PTT command.</p><p><br/>For radios lacking PTT commands, this is automatic and transparent, but for radios which have a PTT command, you can check this box to override and force the PTT to be done using RTS. Do not check this box unless you really need this and have an appropriate adapter with RTS connected to the PTT line of the transceiver. </p></body></html> + + + Send RTS for PTT + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + + + Network Connected Radios + + + + + + 0 + + + 0 + + + 0 + + + + + Hostname + + + + + + + + 256 + 0 + + + + + 256 + 16777215 + + + + + + + + Control Port + + + + + + + + 75 + 16777215 + + + + 50001 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + 0 + + + 0 + + + + + Username + + + + + + + + 256 + 0 + + + + + 256 + 16777215 + + + + + + + + Password + + + + + + + + 180 + 0 + + + + + 180 + 16777215 + + + + QLineEdit::PasswordEchoOnEdit + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + RX Latency (ms) + + + + + + + + 0 + 0 + + + + 30 + + + 500 + + + Qt::Horizontal + + + + + + + 0 + + + + + + + TX Latency (ms) + + + + + + + 30 + + + 500 + + + Qt::Horizontal + + + + + + + 0 + + + + + + + RX Codec + + + + + + + Receive Audio Codec Selector + + + + + + + TX Codec + + + + + + + Transmit Audio Codec Selector + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Sample Rate + + + + + + + Audio Sample Rate Selector + + + + 48000 + + + + + 24000 + + + + + 16000 + + + + + 8000 + + + + + + + + Audio Output + + + + + + + + 300 + 16777215 + + + + Audio Output Selector + + + + + + + Audio Input + + + + + + + + 300 + 16777215 + + + + Audio Input Selector + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + 0 + + + + + Connect + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Draw Peaks + + + + + + + When tuning, set lower digits to zero + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Waterfall Dark Theme + + + + + + + Interpolate Waterfall + + + true + + + + + + + Use System Theme + + + + + + + Anti-Alias Waterfall + + + + + + + Show full screen + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Secondary Meter Selection: + + + + + + + + + + Set up radio polling. The radio's meter is polled every-other interval. + + + Polling + + + + + + Polling + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + 0 + + + + + Enable PTT Controls + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + Modulation Input: + + + + + + + Modulation Input + + + Transmit modulation source + + + QComboBox::AdjustToContents + + + + + + + Data Mod Input: + + + + + + + Data Modulation Input + + + Transmit Data-mode modulation input source + + + QComboBox::AdjustToContents + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Press here to set the clock of the radio. The command will be sent to the radio when the seconds go to zero. + + + Set Clock + + + + + + + Check this box to set the radio's clock to UTC. Otherwise, the clock will be set to the local timezone of this computer. + + + Use UTC + + + + + + + Satellite Ops + + + + + + + <html><head/><body><p>Click here to adjust the frequency reference on the IC-9700.</p></body></html> + + + Adjust Reference + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Manual PTT Toggle + + + + + + + PTT On + + + Ctrl+S + + + + + + + PTT Off + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 279 + + + + + + + + + + QLayout::SetDefaultConstraint + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + Enable + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Server Setup + + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + Contol Port + + + + + + + + 0 + 0 + + + + + 130 + 25 + + + + + 130 + 25 + + + + 99999 + + + 50001 + + + true + + + + + + + + 0 + 0 + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + Civ Port + + + + + + + + 130 + 25 + + + + + 130 + 25 + + + + 99999 + + + 50002 + + + + + + + + 0 + 20 + + + + + 16777215 + 20 + + + + Audio Port + + + + + + + + 130 + 25 + + + + + 130 + 25 + + + + 99999 + + + 50003 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + RX Audio Input + + + + + + + + 100 + 0 + + + + + 300 + 16777215 + + + + + + + + TX Audio Output + + + + + + + + 100 + 0 + + + + + 300 + 16777215 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + + 400 + 160 + + + + + 750 + 330 + + + + QFrame::StyledPanel + + + 1 + + + 0 + + + 3 + + + false + + + 100 + + + false + + + true + + + false + + + true + + + false + + + + Username + + + + + Password + + + + + Admin + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Qt::LeftToRight + + + Enable RigCtld + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + Port + + + + + + + + 75 + 0 + + + + + 75 + 16777215 + + + + + + + + Qt::Horizontal + + + + 422 + 20 + + + + + + + + + + + + Virtual Serial Port + + + + + + + + 250 + 0 + + + + + 250 + 16777215 + + + + <html><head/><body><p>Use this to define a virtual serial port. </p><p><br/></p><p>On Windows, the virtual serial port can be used to connect to a serial port loopback device, through which other programs can connect to the radio. </p><p><br/></p><p>On Linux and macOS, the port defined here is a pseudo-terminal device, which may be connected to directly by any program designed for a serial connection. </p></body></html> + + + Virtual Serial Port Selector + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + This page contains experimental features. Use at your own risk. + + + + + + + + + + + <html><head/><body><p>This button runs debug functions, and is provided as a convenience for programmers. The functions executed are under:</p><p><span style=" color:#ffff55;">void</span><span style=" color:#55ff55;">wfmain</span><span style=" color:#aaaaaa;">::</span><span style=" font-weight:600;">on_debugBtn_clicked</span><span style=" color:#aaaaaa;">()</span></p><p>in wfmain.cpp.</p></body></html> + + + Debug + + + Ctrl+Alt+D + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 320 + + + + + + + - - - - - - Radio IP Address - - - - - - - - - - Radio Control Port - - - - - - - 50001 - - - - - - - - - - - Username - - - - - - - - - - Password - - - - - - - Qt::ImhNoAutoUppercase|Qt::ImhNoPredictiveText|Qt::ImhSensitiveData - - - QLineEdit::PasswordEchoOnEdit - - - - - - - - - - - RX Latency (ms) - - - - - - - - 0 - 0 - - - - 30 - - - 500 - - - Qt::Horizontal - - - - - - - 0 - - - - - - - TX Latency (ms) - - - - - - - 30 - - - 500 - - - Qt::Horizontal - - - - - - - 0 - - - - - - - RX Codec - - - - - - - Receive Audio Codec Selector - - - - - - - TX Codec - - - - - - - Transmit Audio Codec Selector - - - - - - - - - - - Sample Rate - - - - - - - Audio Sample Rate Selector - - - - 48000 - - - - - 24000 - - - - - 16000 - - - - - 8000 - - - - - - - - Audio Output - - - - - - - - 300 - 16777215 - - - - Audio Output Selector - - - - - - - Audio Input - - - - - - - - 300 - 16777215 - - - - Audio Input Selector - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - <html><head/><body><p>This button runs debug functions, and is provided as a convenience for programmers. The functions executed are under:</p><p><span style=" color:#ffff55;">void</span><span style=" color:#55ff55;">wfmain</span><span style=" color:#aaaaaa;">::</span><span style=" font-weight:600;">on_debugBtn_clicked</span><span style=" color:#aaaaaa;">()</span></p><p>in wfmain.cpp.</p></body></html> - - - Debug - - - Ctrl+Alt+D - - - - - - - Set up radio polling. The radio's meter is polled every-other interval. - - - Polling - - - - - - Polling - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - About - - - - - - - Save Settings - - - - - - - - 75 - true - - - - Exit Program - - - - - - - - - 0 - - - - - Please note: Changing the built-in network server requires pressing "Save Settings", closing wfview, and re-opening. - - - - - - - - - 0 - - - - - <html><head></head><body><p>Please see the <a href="https://wfview.org/wfview-user-manual/settings-tab/">User Manual</a> for more information. </p></body></html> - - - Qt::RichText - - - true - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - + + + + 0 + + + 0 + + + 0 + + + + + About + + + + + + + Save Settings + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 50 + false + + + + Exit Program + + + + + @@ -2865,7 +3670,7 @@ 0 0 - 948 + 946 22 @@ -2887,6 +3692,6 @@ - + diff --git a/wfview.pro b/wfview.pro index 95862aa..f105bb3 100644 --- a/wfview.pro +++ b/wfview.pro @@ -152,7 +152,6 @@ SOURCES += main.cpp\ audiohandler.cpp \ calibrationwindow.cpp \ satellitesetup.cpp \ - udpserversetup.cpp \ udpserver.cpp \ meter.cpp \ qledlabel.cpp \ @@ -174,7 +173,6 @@ HEADERS += wfmain.h \ audiohandler.h \ calibrationwindow.h \ satellitesetup.h \ - udpserversetup.h \ udpserver.h \ packettypes.h \ meter.h \ diff --git a/wfview.sln b/wfview.sln index 397c02c..ff4a8cd 100644 --- a/wfview.sln +++ b/wfview.sln @@ -7,33 +7,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wfview", "wfview.vcxproj", EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 Release|x86 = Release|x86 - Template|Win32 = Template|Win32 - Template|x64 = Template|x64 - Template|x86 = Template|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|Win32.ActiveCfg = Debug|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|Win32.Build.0 = Debug|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|x64.ActiveCfg = Debug|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|x64.Build.0 = Debug|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|x86.ActiveCfg = Debug|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|Win32.ActiveCfg = Release|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|Win32.Build.0 = Release|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|x64.ActiveCfg = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|x64.Build.0 = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|x86.ActiveCfg = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|Win32.ActiveCfg = Debug|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|Win32.Build.0 = Debug|Win32 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|x64.ActiveCfg = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|x64.Build.0 = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|x86.ActiveCfg = Release|x64 - {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Template|x86.Build.0 = Release|x64 + {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|x86.ActiveCfg = Debug|Win32 + {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Debug|x86.Build.0 = Debug|Win32 + {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|x86.ActiveCfg = Release|Win32 + {326108AD-FA9D-3AAF-8D3E-062C4DDC34E2}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/wfview.vcxproj b/wfview.vcxproj index 030b9d6..21e1461 100644 --- a/wfview.vcxproj +++ b/wfview.vcxproj @@ -16,7 +16,8 @@ QtVS_v304 10.0.19041.0 10.0.19041.0 - $(MSBuildProjectDirectory)\QtMsBuild + $(MSBuildProjectDirectory)\QtMsBuild + v142 @@ -36,7 +37,10 @@ debug\ wfview - + + + + @@ -44,11 +48,37 @@ - debug\debug\wfviewtruerelease\release\wfviewtruefalsemsvc2019core;network;gui;multimedia;widgets;serialport;printsupportmsvc2019core;network;gui;multimedia;widgets;serialport;printsupport - + + + + + + debug\ + debug\ + wfview + true + + + release\ + release\ + wfview + true + false + + + msvc2019 + core;network;gui;multimedia;widgets;serialport;printsupport + + + msvc2019 + core;network;gui;multimedia;widgets;serialport;printsupport + + + + - .;..\qcustomplot;..\opus\include;resampler;rtaudio;release;/include;%(AdditionalIncludeDirectories) + .;..\qcustomplot;..\opus\include;resampler;release;/include;%(AdditionalIncludeDirectories) -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) release\ false @@ -57,14 +87,16 @@ Sync release\ MaxSpeed - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX="/usr/local";__WINDOWS_WASAPI__;GITSHORT="66912e1";HOST="wfview.org";UNAME="build";NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions) + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2d";QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX="/usr/local";GITSHORT="62771f6";HOST="wfview.org";UNAME="build";NDEBUG;QT_NO_DEBUG;%(PreprocessorDefinitions) false - + + MultiThreadedDLL true true Level3 - true + true + ..\opus\win32\VS2015\Win32\Release\opus.lib;shell32.lib;%(AdditionalDependencies) ..\opus\win32\VS2015\Win32\Release;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) @@ -85,12 +117,31 @@ 0 - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX=\"/usr/local\";__WINDOWS_WASAPI__;GITSHORT=\"66912e1\";HOST=\"wfview.org\";UNAME=\"build\";NDEBUG;QT_NO_DEBUG;QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2d";QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX=\"/usr/local\";GITSHORT=\"62771f6\";HOST=\"wfview.org\";UNAME=\"build\";NDEBUG;QT_NO_DEBUG;QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppdefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cppUic'ing %(Identity)...$(ProjectDir)ui_%(Filename).h + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + Uic'ing %(Identity)... + $(ProjectDir) + ui_%(Filename).h + + - .;..\qcustomplot;..\opus\include;resampler;rtaudio;debug;/include;%(AdditionalIncludeDirectories) + .;..\qcustomplot;..\opus\include;resampler;debug;/include;%(AdditionalIncludeDirectories) -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) debug\ false @@ -99,13 +150,14 @@ Sync debug\ Disabled - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX="/usr/local";__WINDOWS_WASAPI__;GITSHORT="66912e1";HOST="wfview.org";UNAME="build";%(PreprocessorDefinitions) + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2d";QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX="/usr/local";GITSHORT="62771f6";HOST="wfview.org";UNAME="build";%(PreprocessorDefinitions) false MultiThreadedDebugDLL true true Level3 - true + true + ..\opus\win32\VS2015\Win32\Debug\opus.lib;shell32.lib;%(AdditionalDependencies) ..\opus\win32\VS2015\Win32\Debug;C:\opensslx86\lib;C:\Utils\my_sql\mysql-5.7.25-win32\lib;C:\Utils\postgresqlx86\pgsql\lib;%(AdditionalLibraryDirectories) @@ -124,9 +176,28 @@ 0 - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX=\"/usr/local\";__WINDOWS_WASAPI__;GITSHORT=\"66912e1\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) + _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WFVIEW_VERSION="1.2d";QT_DEPRECATED_WARNINGS;QCUSTOMPLOT_COMPILE_LIBRARY;USE_SSE;USE_SSE2;OUTSIDE_SPEEX;RANDOM_PREFIX=wf;PREFIX=\"/usr/local\";GITSHORT=\"62771f6\";HOST=\"wfview.org\";UNAME=\"build\";QT_MULTIMEDIA_LIB;QT_PRINTSUPPORT_LIB;QT_WIDGETS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_NETWORK_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - msvc./$(Configuration)/moc_predefs.hMoc'ing %(Identity)...output$(Configuration)moc_%(Filename).cppdefaultRcc'ing %(Identity)...$(Configuration)qrc_%(Filename).cppUic'ing %(Identity)...$(ProjectDir)ui_%(Filename).h + + msvc + ./$(Configuration)/moc_predefs.h + Moc'ing %(Identity)... + output + $(Configuration) + moc_%(Filename).cpp + + + default + Rcc'ing %(Identity)... + $(Configuration) + qrc_%(Filename).cpp + + + Uic'ing %(Identity)... + $(ProjectDir) + ui_%(Filename).h + + @@ -154,198 +225,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document true @@ -362,119 +288,21 @@ release\moc_predefs.h;%(Outputs) true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -508,30 +336,16 @@ - - - - - - - - - - resourcesresources + resources + resources + - - - - - - - - - - stylestyle + style + style + @@ -550,6 +364,9 @@ - + + + + \ No newline at end of file diff --git a/wfview.vcxproj.filters b/wfview.vcxproj.filters index d78480d..46000f0 100644 --- a/wfview.vcxproj.filters +++ b/wfview.vcxproj.filters @@ -120,9 +120,6 @@ Source Files - - Source Files - Source Files @@ -203,9 +200,6 @@ Header Files - - Header Files - Header Files @@ -260,8 +254,6 @@ - - diff --git a/wfview.vcxproj.user b/wfview.vcxproj.user index dd9de9b..a638198 100644 --- a/wfview.vcxproj.user +++ b/wfview.vcxproj.user @@ -1,11 +1,15 @@  - PATH=$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(PATH) - PATH=$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(QTDIR)\bin%3bC:\QT\5.15.2\MSVC2019\bin%3b$(PATH) + + 2021-11-22T18:24:33.3752914Z + + + 2021-11-22T18:24:41.6960953Z + \ No newline at end of file