kopia lustrzana https://gitlab.com/eliggett/wfview
Added fixed/center data from spectrum waterfall data.
rodzic
1a1b7d0673
commit
88edba70be
|
@ -51,6 +51,7 @@ rigCommander::rigCommander(unsigned char rigCivAddr, QString rigSerialPort, quin
|
|||
|
||||
lookingForRig = false;
|
||||
foundRig = false;
|
||||
oldScopeMode = 3;
|
||||
|
||||
// TODO: list full contents of /dev/serial, grep for IC-7300
|
||||
// /dev/serial/by-path$ ls
|
||||
|
@ -96,6 +97,7 @@ rigCommander::rigCommander(unsigned char rigCivAddr, QHostAddress ip, int cport,
|
|||
|
||||
lookingForRig = false;
|
||||
foundRig = false;
|
||||
oldScopeMode = 3;
|
||||
|
||||
payloadSuffix = QByteArray("\xFD");
|
||||
// TODO: list full contents of /dev/serial, grep for IC-7300
|
||||
|
@ -1103,12 +1105,12 @@ void rigCommander::parseSpectrum()
|
|||
|
||||
unsigned char sequence = bcdHexToDecimal(payloadIn[03]);
|
||||
//unsigned char sequenceMax = bcdHexToDecimal(payloadIn[04]);
|
||||
unsigned char scopeMode = bcdHexToDecimal(payloadIn[05]);
|
||||
unsigned char scopeMode = bcdHexToDecimal(payloadIn[05]); // 0=center, 1=fixed
|
||||
|
||||
if(scopeMode != oldScopeMode)
|
||||
{
|
||||
//TODO:
|
||||
// emit haveNewScopeMode(scopeMode);
|
||||
//TODO: Figure out if this is the first spectrum, and if so, always emit.
|
||||
emit haveSpectrumFixedMode(scopeMode==1);
|
||||
oldScopeMode = scopeMode;
|
||||
}
|
||||
|
||||
|
|
|
@ -252,6 +252,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(rig, SIGNAL(haveMode(QString)), this, SLOT(receiveMode(QString)));
|
||||
connect(rig, SIGNAL(haveDataMode(bool)), this, SLOT(receiveDataModeStatus(bool)));
|
||||
connect(rig, SIGNAL(haveSpectrumData(QByteArray, double, double)), this, SLOT(receiveSpectrumData(QByteArray, double, double)));
|
||||
connect(rig, SIGNAL(haveSpectrumFixedMode(bool)), this, SLOT(receiveSpectrumFixedMode(bool)));
|
||||
connect(this, SIGNAL(setFrequency(double)), rig, SLOT(setFrequency(double)));
|
||||
connect(this, SIGNAL(setScopeCenterMode(bool)), rig, SLOT(setSpectrumCenteredMode(bool)));
|
||||
connect(this, SIGNAL(setScopeEdge(char)), rig, SLOT(setScopeEdge(char)));
|
||||
|
@ -1365,6 +1366,11 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
|
|||
}
|
||||
}
|
||||
|
||||
void wfmain::receiveSpectrumFixedMode(bool isFixed)
|
||||
{
|
||||
ui->scopeCenterModeChk->setChecked(!isFixed);
|
||||
}
|
||||
|
||||
void wfmain::handlePlotDoubleClick(QMouseEvent *me)
|
||||
{
|
||||
double x;
|
||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -110,6 +110,7 @@ private slots:
|
|||
void receiveFreq(double);
|
||||
void receiveMode(QString);
|
||||
void receiveSpectrumData(QByteArray spectrum, double startFreq, double endFreq);
|
||||
void receiveSpectrumFixedMode(bool isFixed);
|
||||
void receivePTTstatus(bool pttOn);
|
||||
void receiveDataModeStatus(bool dataOn);
|
||||
void receiveBandStackReg(float freq, char mode, bool dataOn); // freq, mode, (filter,) datamode
|
||||
|
|
Ładowanie…
Reference in New Issue