From 8024893a62483e06f5d0945e2c60aa67710a01ac Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Fri, 18 Jun 2021 15:57:21 -0700 Subject: [PATCH 1/3] If no rig caps, then don't mess with the window! --- wfmain.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wfmain.cpp b/wfmain.cpp index b22a855..0346266 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -702,6 +702,8 @@ void wfmain::setupMainUI() void wfmain::updateSizes(int tabIndex) { + if(!haveRigCaps) + return; // This function does nothing unless you are using a rig without spectrum. // This is a hack. It is not great, but it seems to work ok. if(!rigCaps.hasSpectrum) From ee54e76c5f7454bea9f5a332f9e01eefebb069ee Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Fri, 18 Jun 2021 21:56:11 -0700 Subject: [PATCH 2/3] Minor change to remove some old debug code that snuck in. --- wfmain.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/wfmain.cpp b/wfmain.cpp index 0346266..ab565d5 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -407,9 +407,6 @@ void wfmain::findSerialPort() QDirIterator it705("/dev/serial", QStringList() << "*IC-705*A", QDir::Files, QDirIterator::Subdirectories); QDirIterator it7610("/dev/serial", QStringList() << "*IC-7610*A", QDir::Files, QDirIterator::Subdirectories); QDirIterator itR8600("/dev/serial", QStringList() << "*IC-R8600*A", QDir::Files, QDirIterator::Subdirectories); - QDirIterator itTest("/tmp/test", QStringList() << "*radio*", QDir::NoFilter, QDirIterator::Subdirectories); - - qDebug() << "test iterator isEmpty: " << itTest.filePath().isEmpty(); if(!it73.filePath().isEmpty()) { From 2508b4d71cd45041538637657f7913ceee012902 Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Fri, 18 Jun 2021 22:45:12 -0700 Subject: [PATCH 3/3] Additional support for the IC-R8600, including wider scope spans. --- rigcommander.cpp | 27 ++++++++++++++++++++++++++- rigcommander.h | 1 + rigidentities.cpp | 7 +++++-- rigidentities.h | 19 +++++++++++++++++++ wfmain.cpp | 15 +++++++++++++++ 5 files changed, 66 insertions(+), 3 deletions(-) diff --git a/rigcommander.cpp b/rigcommander.cpp index b83e87a..81c160a 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -362,6 +362,10 @@ void rigCommander::setSpectrumBounds(double startFreq, double endFreq, unsigned if(startFreq > 400.0) freqRange++; break; + case modelR8600: + freqRange = 1; + edgeNumber = 1; + break; default: return; break; @@ -429,7 +433,7 @@ void rigCommander::setScopeSpan(char span) // See ICD, page 165, "19-12". // 2.5k = 0 // 5k = 2, etc. - if((span <0 ) || (span >7)) + if((span <0 ) || (span >9)) return; QByteArray payload; @@ -464,6 +468,12 @@ void rigCommander::setScopeSpan(char span) case 7: freq = 500.0E-3; break; + case 8: + freq = 1000.0E-3; + break; + case 9: + freq = 2500.0E-3; + break; default: return; break; @@ -2561,6 +2571,14 @@ mode_info rigCommander::createMode(mode_kind m, unsigned char reg, QString name) return mode; } +centerSpanData rigCommander::createScopeCenter(centerSpansType s, QString name) +{ + centerSpanData csd; + csd.cstype = s; + csd.name = name; + return csd; +} + void rigCommander::determineRigCaps() { //TODO: Determine available bands (low priority, rig will reject out of band requests anyway) @@ -2597,6 +2615,12 @@ void rigCommander::determineRigCaps() rigCaps.spectSeqMax = 0; rigCaps.spectAmpMax = 0; rigCaps.spectLenMax = 0; + rigCaps.scopeCenterSpans = { createScopeCenter(cs2p5k, "±2.5k"), createScopeCenter(cs5k, "±5k"), + createScopeCenter(cs10k, "±10k"), createScopeCenter(cs25k, "±25k"), + createScopeCenter(cs50k, "±50k"), createScopeCenter(cs100k, "±100k"), + createScopeCenter(cs250k, "±250k"), createScopeCenter(cs500k, "±500k") + }; + rigCaps.hasFDcomms = true; // false for older radios @@ -2696,6 +2720,7 @@ void rigCommander::determineRigCaps() createMode(modeP25, 0x16, "P25"), createMode(modedPMR, 0x18, "dPMR"), createMode(modeNXDN_VN, 0x19, "NXDN-VN"), createMode(modeNXDN_N, 0x20, "NXDN-N"), createMode(modeDCR, 0x21, "DCR")}); + rigCaps.scopeCenterSpans.insert(rigCaps.scopeCenterSpans.end(), {createScopeCenter(cs1M, "±1M"), createScopeCenter(cs2p5M, "±2.5M")}); break; case model9700: rigCaps.modelName = QString("IC-9700"); diff --git a/rigcommander.h b/rigcommander.h index c3c292c..ef01a54 100644 --- a/rigcommander.h +++ b/rigcommander.h @@ -377,6 +377,7 @@ private: void printHex(const QByteArray &pdata); void printHex(const QByteArray &pdata, bool printVert, bool printHoriz); mode_info createMode(mode_kind m, unsigned char reg, QString name); + centerSpanData createScopeCenter(centerSpansType s, QString name); commHandler* comm = Q_NULLPTR; pttyHandler* ptty = Q_NULLPTR; diff --git a/rigidentities.cpp b/rigidentities.cpp index c2322fd..7b113f7 100644 --- a/rigidentities.cpp +++ b/rigidentities.cpp @@ -55,8 +55,8 @@ model_kind determineRadioModel(unsigned char rigID) case model718: rig = model718; break; - case model756proiii: - rig = model756proiii; + case model910h: + rig = model910h; break; case model756pro: rig = model756pro; @@ -64,6 +64,9 @@ model_kind determineRadioModel(unsigned char rigID) case model756proii: rig = model756proii; break; + case model756proiii: + rig = model756proiii; + break; default: rig = modelUnknown; break; diff --git a/rigidentities.h b/rigidentities.h index 8e5f1c8..bffe842 100644 --- a/rigidentities.h +++ b/rigidentities.h @@ -68,6 +68,24 @@ enum bandType { band23cm=0, bandGen }; +enum centerSpansType { + cs2p5k = 0, + cs5k = 1, + cs10k = 2, + cs25k = 3, + cs50k = 4, + cs100k = 5, + cs250k = 6, + cs500k = 7, + cs1M = 8, + cs2p5M = 9 +}; + +struct centerSpanData { + centerSpansType cstype; + QString name; +}; + model_kind determineRadioModel(unsigned char rigID); struct rigCapabilities { @@ -105,6 +123,7 @@ struct rigCapabilities { std::vector attenuators; std::vector preamps; std::vector antennas; + std::vector scopeCenterSpans; std::vector bands; unsigned char bsr[20] = {0}; diff --git a/wfmain.cpp b/wfmain.cpp index ab565d5..da3722e 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -2643,6 +2643,21 @@ void wfmain::receiveRigID(rigCapabilities rigCaps) ui->antennaSelCombo->setDisabled(true); } + ui->scopeBWCombo->blockSignals(true); + ui->scopeBWCombo->clear(); + if(rigCaps.hasSpectrum) + { + ui->scopeBWCombo->setHidden(false); + for(unsigned int i=0; i < rigCaps.scopeCenterSpans.size(); i++) + { + ui->scopeBWCombo->addItem(rigCaps.scopeCenterSpans.at(i).name, (int)rigCaps.scopeCenterSpans.at(i).cstype); + } + } else { + ui->scopeBWCombo->setHidden(true); + } + ui->scopeBWCombo->blockSignals(false); + + setBandButtons(); ui->tuneEnableChk->setEnabled(rigCaps.hasATU);