kopia lustrzana https://gitlab.com/eliggett/wfview
Get antenna status on start-up and slow poll for it.
rodzic
e40545cf77
commit
e4dea63029
|
@ -1222,6 +1222,9 @@ void rigCommander::parseCommand()
|
|||
case '\x11':
|
||||
emit haveAttenuator((unsigned char)payloadIn.at(1));
|
||||
break;
|
||||
case '\x12':
|
||||
//qInfo(logRig()) << QString("Have Antenna: %1 %2").arg(payloadIn.at(1)).arg(payloadIn.at(2));
|
||||
emit haveAntenna((unsigned char)payloadIn.at(1), (bool)payloadIn.at(2));
|
||||
case '\x14':
|
||||
// read levels
|
||||
parseLevels();
|
||||
|
|
|
@ -344,7 +344,7 @@ signals:
|
|||
void haveATUStatus(unsigned char status);
|
||||
void haveAttenuator(unsigned char att);
|
||||
void havePreamp(unsigned char pre);
|
||||
void haveAntenna(unsigned char ant);
|
||||
void haveAntenna(unsigned char ant,bool rx);
|
||||
|
||||
// Rig State
|
||||
void stateInfo(rigStateStruct* state);
|
||||
|
|
11
wfmain.cpp
11
wfmain.cpp
|
@ -345,7 +345,7 @@ void wfmain::rigConnections()
|
|||
connect(this, SIGNAL(getAttenuator()), rig, SLOT(getAttenuator()));
|
||||
connect(rig, SIGNAL(haveAttenuator(unsigned char)), this, SLOT(receiveAttenuator(unsigned char)));
|
||||
connect(this, SIGNAL(getAntenna()), rig, SLOT(getAntenna()));
|
||||
//connect(rig, SIGNAL(haveAntenna(unsigned char)), this, SLOT(receiveAntennaSel(unsigned char)));
|
||||
connect(rig, SIGNAL(haveAntenna(unsigned char,bool)), this, SLOT(receiveAntennaSel(unsigned char,bool)));
|
||||
|
||||
|
||||
// Speech (emitted from rig speaker)
|
||||
|
@ -2954,6 +2954,9 @@ void wfmain::initPeriodicCommands()
|
|||
insertSlowPeriodicCommand(cmdGetAttenuator, 128);
|
||||
insertSlowPeriodicCommand(cmdGetPTT, 128);
|
||||
insertSlowPeriodicCommand(cmdGetPreamp, 128);
|
||||
if (rigCaps.hasRXAntenna) {
|
||||
insertSlowPeriodicCommand(cmdGetAntenna, 128);
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::insertPeriodicCommand(cmds cmd, unsigned char priority)
|
||||
|
@ -4751,6 +4754,12 @@ void wfmain::receiveAttenuator(unsigned char att)
|
|||
ui->attSelCombo->setCurrentIndex(attindex);
|
||||
}
|
||||
|
||||
void wfmain::receiveAntennaSel(unsigned char ant, bool rx)
|
||||
{
|
||||
ui->antennaSelCombo->setCurrentIndex(ant);
|
||||
ui->rxAntennaCheck->setChecked(rx);
|
||||
}
|
||||
|
||||
void wfmain::receiveSpectrumSpan(freqt freqspan, bool isSub)
|
||||
{
|
||||
if(!isSub)
|
||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -234,7 +234,7 @@ private slots:
|
|||
void receiveATUStatus(unsigned char atustatus);
|
||||
void receivePreamp(unsigned char pre);
|
||||
void receiveAttenuator(unsigned char att);
|
||||
//void receiveAntennaSel(unsigned char ant);
|
||||
void receiveAntennaSel(unsigned char ant, bool rx);
|
||||
void receiveRigID(rigCapabilities rigCaps);
|
||||
void receiveFoundRigID(rigCapabilities rigCaps);
|
||||
void receiveSerialPortError(QString port, QString errorText);
|
||||
|
|
Ładowanie…
Reference in New Issue