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