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;
|
lookingForRig = false;
|
||||||
foundRig = false;
|
foundRig = false;
|
||||||
|
oldScopeMode = 3;
|
||||||
|
|
||||||
// TODO: list full contents of /dev/serial, grep for IC-7300
|
// TODO: list full contents of /dev/serial, grep for IC-7300
|
||||||
// /dev/serial/by-path$ ls
|
// /dev/serial/by-path$ ls
|
||||||
|
@ -96,6 +97,7 @@ rigCommander::rigCommander(unsigned char rigCivAddr, QHostAddress ip, int cport,
|
||||||
|
|
||||||
lookingForRig = false;
|
lookingForRig = false;
|
||||||
foundRig = false;
|
foundRig = false;
|
||||||
|
oldScopeMode = 3;
|
||||||
|
|
||||||
payloadSuffix = QByteArray("\xFD");
|
payloadSuffix = QByteArray("\xFD");
|
||||||
// TODO: list full contents of /dev/serial, grep for IC-7300
|
// 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 sequence = bcdHexToDecimal(payloadIn[03]);
|
||||||
//unsigned char sequenceMax = bcdHexToDecimal(payloadIn[04]);
|
//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)
|
if(scopeMode != oldScopeMode)
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO: Figure out if this is the first spectrum, and if so, always emit.
|
||||||
// emit haveNewScopeMode(scopeMode);
|
emit haveSpectrumFixedMode(scopeMode==1);
|
||||||
oldScopeMode = scopeMode;
|
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(haveMode(QString)), this, SLOT(receiveMode(QString)));
|
||||||
connect(rig, SIGNAL(haveDataMode(bool)), this, SLOT(receiveDataModeStatus(bool)));
|
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(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(setFrequency(double)), rig, SLOT(setFrequency(double)));
|
||||||
connect(this, SIGNAL(setScopeCenterMode(bool)), rig, SLOT(setSpectrumCenteredMode(bool)));
|
connect(this, SIGNAL(setScopeCenterMode(bool)), rig, SLOT(setSpectrumCenteredMode(bool)));
|
||||||
connect(this, SIGNAL(setScopeEdge(char)), rig, SLOT(setScopeEdge(char)));
|
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)
|
void wfmain::handlePlotDoubleClick(QMouseEvent *me)
|
||||||
{
|
{
|
||||||
double x;
|
double x;
|
||||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -110,6 +110,7 @@ private slots:
|
||||||
void receiveFreq(double);
|
void receiveFreq(double);
|
||||||
void receiveMode(QString);
|
void receiveMode(QString);
|
||||||
void receiveSpectrumData(QByteArray spectrum, double startFreq, double endFreq);
|
void receiveSpectrumData(QByteArray spectrum, double startFreq, double endFreq);
|
||||||
|
void receiveSpectrumFixedMode(bool isFixed);
|
||||||
void receivePTTstatus(bool pttOn);
|
void receivePTTstatus(bool pttOn);
|
||||||
void receiveDataModeStatus(bool dataOn);
|
void receiveDataModeStatus(bool dataOn);
|
||||||
void receiveBandStackReg(float freq, char mode, bool dataOn); // freq, mode, (filter,) datamode
|
void receiveBandStackReg(float freq, char mode, bool dataOn); // freq, mode, (filter,) datamode
|
||||||
|
|
Ładowanie…
Reference in New Issue