kopia lustrzana https://gitlab.com/eliggett/wfview
Added "scope out of range" notification.
rodzic
63a7ec0a21
commit
cb7cf6c218
|
@ -4244,6 +4244,17 @@ void rigCommander::parseSpectrum()
|
|||
return;
|
||||
}
|
||||
|
||||
if(payloadIn.length() >= 15)
|
||||
{
|
||||
bool outOfRange = (bool)payloadIn[16];
|
||||
if(outOfRange != wasOutOfRange)
|
||||
{
|
||||
emit haveScopeOutOfRange(outOfRange);
|
||||
wasOutOfRange = outOfRange;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// unsigned char waveInfo = payloadIn[06]; // really just one byte?
|
||||
//qInfo(logRig()) << "Spectrum Data received: " << sequence << "/" << sequenceMax << " mode: " << scopeMode << " waveInfo: " << waveInfo << " length: " << payloadIn.length();
|
||||
|
||||
|
|
|
@ -291,6 +291,7 @@ signals:
|
|||
void haveSpectrumMode(spectrumMode spectmode);
|
||||
void haveScopeEdge(char edge);
|
||||
void haveSpectrumRefLevel(int level);
|
||||
void haveScopeOutOfRange(bool outOfRange);
|
||||
|
||||
// Rig ID:
|
||||
void haveRigID(rigCapabilities rigCaps);
|
||||
|
@ -457,6 +458,7 @@ private:
|
|||
quint16 spectAmpMax;
|
||||
quint16 spectLenMax;
|
||||
spectrumMode oldScopeMode;
|
||||
bool wasOutOfRange = false;
|
||||
|
||||
bool usingNativeLAN; // indicates using OEM LAN connection (705,7610,9700,7850)
|
||||
bool lookingForRig;
|
||||
|
|
14
wfmain.cpp
14
wfmain.cpp
|
@ -457,6 +457,7 @@ void wfmain::rigConnections()
|
|||
|
||||
connect(rig, SIGNAL(haveSpectrumData(QByteArray, double, double)), this, SLOT(receiveSpectrumData(QByteArray, double, double)));
|
||||
connect(rig, SIGNAL(haveSpectrumMode(spectrumMode)), this, SLOT(receiveSpectrumMode(spectrumMode)));
|
||||
connect(rig, SIGNAL(haveScopeOutOfRange(bool)), this, SLOT(handleScopeOutOfRange(bool)));
|
||||
connect(this, SIGNAL(setScopeMode(spectrumMode)), rig, SLOT(setSpectrumMode(spectrumMode)));
|
||||
connect(this, SIGNAL(getScopeMode()), rig, SLOT(getScopeMode()));
|
||||
|
||||
|
@ -5083,6 +5084,17 @@ void wfmain::receiveSpectrumMode(spectrumMode spectMode)
|
|||
setUISpectrumControlsToMode(spectMode);
|
||||
}
|
||||
|
||||
void wfmain::handleScopeOutOfRange(bool outOfRange)
|
||||
{
|
||||
if(outOfRange)
|
||||
{
|
||||
ui->scopeOutOfRangeLabel->setText("OUT OF RANGE");
|
||||
ui->scopeOutOfRangeLabel->setStyleSheet("QLabel { background-color : red; color : blue; }");
|
||||
} else {
|
||||
ui->scopeOutOfRangeLabel->setText("");
|
||||
ui->scopeOutOfRangeLabel->setStyleSheet("");
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::handlePlotDoubleClick(QMouseEvent *me)
|
||||
{
|
||||
|
@ -9166,4 +9178,4 @@ void wfmain::resetUsbCommands()
|
|||
usbCommands.append(COMMAND(51, "Split On", cmdNone, 0x01));
|
||||
usbCommands.append(COMMAND(52, "Split Off", cmdNone, 0x0));
|
||||
emit sendUsbControllerCommands(&usbCommands);
|
||||
}
|
||||
}
|
||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -281,6 +281,7 @@ private slots:
|
|||
void receiveSpectrumData(QByteArray spectrum, double startFreq, double endFreq);
|
||||
void receiveSpectrumMode(spectrumMode spectMode);
|
||||
void receiveSpectrumSpan(freqt freqspan, bool isSub);
|
||||
void handleScopeOutOfRange(bool outOfRange);
|
||||
void receivePTTstatus(bool pttOn);
|
||||
void receiveDataModeStatus(bool dataOn);
|
||||
void receiveBandStackReg(freqt f, char mode, char filter, bool dataOn); // freq, mode, (filter,) datamode
|
||||
|
|
29
wfmain.ui
29
wfmain.ui
|
@ -6,7 +6,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1012</width>
|
||||
<width>1042</width>
|
||||
<height>660</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -18,7 +18,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mainTab">
|
||||
<attribute name="title">
|
||||
|
@ -117,6 +117,19 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="scopeOutOfRangeLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="customEdgeBtn">
|
||||
<property name="toolTip">
|
||||
|
@ -1808,6 +1821,7 @@
|
|||
<font>
|
||||
<family>DejaVu Sans Mono</family>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -3430,8 +3444,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>790</width>
|
||||
<height>302</height>
|
||||
<width>570</width>
|
||||
<height>224</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
|
@ -5441,6 +5455,7 @@
|
|||
<widget class="QPushButton" name="exitBtn">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -5459,8 +5474,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1012</width>
|
||||
<height>22</height>
|
||||
<width>1042</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -5488,7 +5503,7 @@
|
|||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroup"/>
|
||||
<buttongroup name="pollingButtonGroup"/>
|
||||
<buttongroup name="underlayButtonGroup"/>
|
||||
<buttongroup name="pollingButtonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
Ładowanie…
Reference in New Issue