kopia lustrzana https://gitlab.com/eliggett/wfview
Data Mode now sends the currently selected filter.
rodzic
3968cdcbb0
commit
908ec96567
|
@ -680,14 +680,15 @@ void rigCommander::setMode(unsigned char mode, unsigned char modeFilter)
|
|||
}
|
||||
}
|
||||
|
||||
void rigCommander::setDataMode(bool dataOn)
|
||||
void rigCommander::setDataMode(bool dataOn, unsigned char filter)
|
||||
{
|
||||
QByteArray payload;
|
||||
|
||||
payload.setRawData("\x1A\x06", 2);
|
||||
if(dataOn)
|
||||
{
|
||||
payload.append("\x01\x03", 2); // data mode on, wide bandwidth
|
||||
payload.append("\x01", 1); // data mode on, wide bandwidth
|
||||
payload.append(filter);
|
||||
|
||||
} else {
|
||||
payload.append("\x00\x00", 2); // data mode off, bandwidth not defined per ICD.
|
||||
|
|
|
@ -94,7 +94,7 @@ public slots:
|
|||
void getFrequency();
|
||||
void setMode(unsigned char mode, unsigned char modeFilter);
|
||||
void getMode();
|
||||
void setDataMode(bool dataOn);
|
||||
void setDataMode(bool dataOn, unsigned char filter);
|
||||
void getDataMode();
|
||||
void getBandStackReg(char band, char regCode);
|
||||
void getRitEnabled();
|
||||
|
|
14
wfmain.cpp
14
wfmain.cpp
|
@ -370,7 +370,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(this, SIGNAL(getFrequency()), rig, SLOT(getFrequency()));
|
||||
connect(this, SIGNAL(getMode()), rig, SLOT(getMode()));
|
||||
connect(this, SIGNAL(getDataMode()), rig, SLOT(getDataMode()));
|
||||
connect(this, SIGNAL(setDataMode(bool)), rig, SLOT(setDataMode(bool)));
|
||||
connect(this, SIGNAL(setDataMode(bool, unsigned char)), rig, SLOT(setDataMode(bool, unsigned char)));
|
||||
connect(this, SIGNAL(getBandStackReg(char,char)), rig, SLOT(getBandStackReg(char,char)));
|
||||
connect(rig, SIGNAL(havePTTStatus(bool)), this, SLOT(receivePTTstatus(bool)));
|
||||
connect(this, SIGNAL(setPTT(bool)), rig, SLOT(setPTT(bool)));
|
||||
|
@ -1820,10 +1820,10 @@ void wfmain::runPeriodicCommands()
|
|||
emit getDataMode();
|
||||
break;
|
||||
case cmdSetDataModeOff:
|
||||
emit setDataMode(false);
|
||||
emit setDataMode(false, (unsigned char) ui->modeFilterCombo->currentData().toInt());
|
||||
break;
|
||||
case cmdSetDataModeOn:
|
||||
emit setDataMode(true);
|
||||
emit setDataMode(true, (unsigned char) ui->modeFilterCombo->currentData().toInt());
|
||||
break;
|
||||
case cmdGetModInput:
|
||||
emit getModInput(false);
|
||||
|
@ -1943,10 +1943,10 @@ void wfmain::runDelayedCommand()
|
|||
emit setMode(setModeVal, setFilterVal);
|
||||
break;
|
||||
case cmdSetDataModeOff:
|
||||
emit setDataMode(false);
|
||||
emit setDataMode(false, (unsigned char)ui->modeFilterCombo->currentData().toInt());
|
||||
break;
|
||||
case cmdSetDataModeOn:
|
||||
emit setDataMode(true);
|
||||
emit setDataMode(true, (unsigned char)ui->modeFilterCombo->currentData().toInt());
|
||||
break;
|
||||
case cmdGetRitEnabled:
|
||||
emit getRitEnabled();
|
||||
|
@ -2787,7 +2787,7 @@ void wfmain::changeMode(mode_kind mode)
|
|||
void wfmain::changeMode(mode_kind mode, bool dataOn)
|
||||
{
|
||||
int filter = ui->modeFilterCombo->currentData().toInt();
|
||||
emit setMode((unsigned char)mode, filter);
|
||||
emit setMode((unsigned char)mode, (unsigned char)filter);
|
||||
|
||||
currentMode = mode;
|
||||
|
||||
|
@ -3479,7 +3479,7 @@ void wfmain::on_modeFilterCombo_activated(int index)
|
|||
|
||||
void wfmain::on_dataModeBtn_toggled(bool checked)
|
||||
{
|
||||
setDataMode(checked);
|
||||
emit setDataMode(checked, (unsigned char)ui->modeFilterCombo->currentData().toInt());
|
||||
usingDataMode = checked;
|
||||
if(usingDataMode)
|
||||
{
|
||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -52,7 +52,7 @@ signals:
|
|||
void setFrequency(freqt freq);
|
||||
void getMode();
|
||||
void setMode(unsigned char modeIndex, unsigned char modeFilter);
|
||||
void setDataMode(bool dataOn);
|
||||
void setDataMode(bool dataOn, unsigned char filter);
|
||||
void getDataMode();
|
||||
void getModInput(bool dataOn);
|
||||
void setModInput(rigInput input, bool dataOn);
|
||||
|
|
Ładowanie…
Reference in New Issue