diff --git a/spectrumscope.cpp b/spectrumscope.cpp index e58e09e..5a83bb8 100644 --- a/spectrumscope.cpp +++ b/spectrumscope.cpp @@ -38,6 +38,15 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent) freqDisplay[i]->setMaximumSize(180,20); displayLayout->addWidget(freqDisplay[i]); } + connect(this->freqDisplay[i], &freqCtrl::newFrequency, this, + [=](const qint64 &freq) { this->newFrequency(freq,i);}); + + + //connect(this->rig, &rigCommander::haveDashRatio, + // [=](const unsigned char& ratio) { cw->handleDashRatio(ratio); }); + + //connect(freqDisplay[i], SIGNAL(newFrequency(qint64)), this, SLOT(newFrequency(qint64,i))); + } @@ -386,7 +395,6 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent) connect(waterfall, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*))); connect(spectrum, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*))); - connect(freqDisplay[0], SIGNAL(newFrequency(qint64)), this, SLOT(newFrequency(qint64))); showHideControls(spectrumMode_t::spectModeCenter); } @@ -1741,14 +1749,21 @@ void spectrumScope::setUnit(FctlUnit unit) } -void spectrumScope::newFrequency(qint64 freq) +void spectrumScope::newFrequency(qint64 freq,uchar vfo) { freqt f; f.Hz = freq; f.MHzDouble = f.Hz / (double)1E6; if (f.Hz > 0) { - queue->add(priorityImmediate,queueItem((receiver?funcSubFreq:funcMainFreq),QVariant::fromValue(f),false,receiver)); + if (vfo > 0) + { + queue->add(priorityImmediate,queueItem((funcUnselectedFreq),QVariant::fromValue(f),false,receiver)); + } + else + { + queue->add(priorityImmediate,queueItem((receiver?funcSubFreq:funcMainFreq),QVariant::fromValue(f),false,receiver)); + } } } diff --git a/spectrumscope.h b/spectrumscope.h index e900a20..9427902 100644 --- a/spectrumscope.h +++ b/spectrumscope.h @@ -133,7 +133,7 @@ private slots: void scroll(QWheelEvent *); void clearPeaks(); - void newFrequency(qint64 freq); + void newFrequency(qint64 freq,uchar i=0); private: void clearPlasma();