kopia lustrzana https://gitlab.com/eliggett/wfview
Add some preliminary parts of getting the attenuator, preamp, and
antenna selection on startup. UI not updated yet but getting there.merge-requests/2/head
rodzic
ec1e43ddc1
commit
5cc2aa0efe
28
wfmain.cpp
28
wfmain.cpp
|
@ -449,7 +449,9 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
connect(this, SIGNAL(setAttenuator(unsigned char)), rig, SLOT(setAttenuator(unsigned char)));
|
||||
connect(this, SIGNAL(setPreamp(unsigned char)), rig, SLOT(setPreamp(unsigned char)));
|
||||
connect(this, SIGNAL(setAntenna(unsigned char)), rig, SLOT(setAntenna(unsigned char)));
|
||||
|
||||
connect(this, SIGNAL(getPreamp()), rig, SLOT(getPreamp()));
|
||||
connect(this, SIGNAL(getAttenuator()), rig, SLOT(getAttenuator()));
|
||||
connect(this, SIGNAL(getAntenna()), rig, SLOT(getAntenna));
|
||||
|
||||
// Speech (emitted from rig speaker)
|
||||
connect(this, SIGNAL(sayAll()), rig, SLOT(sayAll()));
|
||||
|
@ -1474,6 +1476,18 @@ void wfmain:: getInitialRigState()
|
|||
}
|
||||
cmdOutQue.append(cmdGetRptAccessMode);
|
||||
|
||||
if(rigCaps.hasAntennaSel)
|
||||
{
|
||||
cmdOutQue.append(cmdGetAntenna);
|
||||
}
|
||||
if(rigCaps.hasAttenuator)
|
||||
{
|
||||
cmdOutQue.append(cmdGetAttenuator);
|
||||
}
|
||||
if(rigCaps.hasPreamp)
|
||||
{
|
||||
cmdOutQue.append(cmdGetPreamp);
|
||||
}
|
||||
|
||||
cmdOutQue.append(cmdNone);
|
||||
cmdOutQue.append(cmdStartRegularPolling);
|
||||
|
@ -1815,6 +1829,9 @@ void wfmain::runDelayedCommand()
|
|||
case cmdGetTSQL:
|
||||
emit getTSQL();
|
||||
break;
|
||||
case cmdGetDTCS:
|
||||
emit getDTCS();
|
||||
break;
|
||||
case cmdGetRptAccessMode:
|
||||
emit getRptAccessMode();
|
||||
break;
|
||||
|
@ -1854,6 +1871,15 @@ void wfmain::runDelayedCommand()
|
|||
case cmdGetATUStatus:
|
||||
emit getATUStatus();
|
||||
break;
|
||||
case cmdGetAttenuator:
|
||||
emit getAttenuator();
|
||||
break;
|
||||
case cmdGetPreamp:
|
||||
emit getPreamp();
|
||||
break;
|
||||
case cmdGetAntenna:
|
||||
emit getAntenna();
|
||||
break;
|
||||
case cmdScopeCenterMode:
|
||||
emit setScopeMode(spectModeCenter);
|
||||
break;
|
||||
|
|
3
wfmain.h
3
wfmain.h
|
@ -501,7 +501,8 @@ private:
|
|||
cmdGetTxPower, cmdGetMicGain, cmdGetSpectrumRefLevel, cmdGetDuplexMode, cmdGetModInput, cmdGetModDataInput,
|
||||
cmdGetCurrentModLevel, cmdStartRegularPolling, cmdStopRegularPolling, cmdGetVdMeter, cmdGetIdMeter,
|
||||
cmdGetSMeter, cmdGetPowerMeter, cmdGetALCMeter, cmdGetCompMeter,
|
||||
cmdGetTone, cmdGetTSQL, cmdGetDTCS, cmdGetRptAccessMode};
|
||||
cmdGetTone, cmdGetTSQL, cmdGetDTCS, cmdGetRptAccessMode, cmdGetPreamp, cmdGetAttenuator, cmdGetAntenna};
|
||||
|
||||
cmds cmdOut;
|
||||
QVector <cmds> cmdOutQue;
|
||||
QVector <cmds> periodicCmdQueue;
|
||||
|
|
Ładowanie…
Reference in New Issue