kopia lustrzana https://gitlab.com/eliggett/wfview
Adjusting signals and slots for repeater duplex.
rodzic
69e302feba
commit
8bf45ac5b2
|
@ -15,6 +15,7 @@ repeaterSetup::~repeaterSetup()
|
||||||
|
|
||||||
void repeaterSetup::receiveDuplexMode(duplexMode dm)
|
void repeaterSetup::receiveDuplexMode(duplexMode dm)
|
||||||
{
|
{
|
||||||
|
currentdm = dm;
|
||||||
switch(dm)
|
switch(dm)
|
||||||
{
|
{
|
||||||
case dmSimplex:
|
case dmSimplex:
|
||||||
|
@ -58,3 +59,8 @@ void repeaterSetup::on_rptAutoBtn_clicked()
|
||||||
// TODO: Hide an AutoOff button somewhere for non-US users
|
// TODO: Hide an AutoOff button somewhere for non-US users
|
||||||
emit setDuplexMode(dmDupAutoOn);
|
emit setDuplexMode(dmDupAutoOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void repeaterSetup::on_rptReadRigBtn_clicked()
|
||||||
|
{
|
||||||
|
emit getDuplexMode();
|
||||||
|
}
|
||||||
|
|
|
@ -21,9 +21,11 @@ signals:
|
||||||
void getDuplexMode();
|
void getDuplexMode();
|
||||||
void setDuplexMode(duplexMode dm);
|
void setDuplexMode(duplexMode dm);
|
||||||
|
|
||||||
private slots:
|
public slots:
|
||||||
void receiveDuplexMode(duplexMode dm);
|
void receiveDuplexMode(duplexMode dm);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
|
||||||
|
|
||||||
void on_rptSimplexBtn_clicked();
|
void on_rptSimplexBtn_clicked();
|
||||||
|
|
||||||
|
@ -33,8 +35,12 @@ private slots:
|
||||||
|
|
||||||
void on_rptAutoBtn_clicked();
|
void on_rptAutoBtn_clicked();
|
||||||
|
|
||||||
|
void on_rptReadRigBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::repeaterSetup *ui;
|
Ui::repeaterSetup *ui;
|
||||||
|
|
||||||
|
duplexMode currentdm;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // REPEATERSETUP_H
|
#endif // REPEATERSETUP_H
|
||||||
|
|
50
wfmain.cpp
50
wfmain.cpp
|
@ -396,7 +396,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
||||||
connect(rpt, SIGNAL(setDuplexMode(duplexMode)), rig, SLOT(setDuplexMode(duplexMode)));
|
connect(rpt, SIGNAL(setDuplexMode(duplexMode)), rig, SLOT(setDuplexMode(duplexMode)));
|
||||||
connect(rig, SIGNAL(haveDuplexMode(duplexMode)), rpt, SLOT(receiveDuplexMode(duplexMode)));
|
connect(rig, SIGNAL(haveDuplexMode(duplexMode)), rpt, SLOT(receiveDuplexMode(duplexMode)));
|
||||||
|
|
||||||
//connect(this, SIGNAL(getDuplexMode()), rig, SLOT(getDuplexMode()));
|
connect(this, SIGNAL(getDuplexMode()), rig, SLOT(getDuplexMode()));
|
||||||
//connect(this, SIGNAL(setDuplexMode(duplexMode)), rig, SLOT(setDuplexMode(duplexMode)));
|
//connect(this, SIGNAL(setDuplexMode(duplexMode)), rig, SLOT(setDuplexMode(duplexMode)));
|
||||||
//connect(rig, SIGNAL(haveDuplexMode(duplexMode)), this, SLOT(receiveDuplexMode(duplexMode)));
|
//connect(rig, SIGNAL(haveDuplexMode(duplexMode)), this, SLOT(receiveDuplexMode(duplexMode)));
|
||||||
|
|
||||||
|
@ -3306,25 +3306,6 @@ void wfmain::receiveModInput(rigInput input, bool dataOn)
|
||||||
qDebug(logSystem()) << "Could not find modulation input: " << (int)input;
|
qDebug(logSystem()) << "Could not find modulation input: " << (int)input;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wfmain::receiveDuplexMode(duplexMode dm)
|
|
||||||
{
|
|
||||||
switch(dm)
|
|
||||||
{
|
|
||||||
case dmSimplex:
|
|
||||||
ui->rptSimplexBtn->setChecked(true);
|
|
||||||
break;
|
|
||||||
case dmDupPlus:
|
|
||||||
ui->rptDupPlusBtn->setChecked(true);
|
|
||||||
break;
|
|
||||||
case dmDupMinus:
|
|
||||||
ui->rptDupMinusBtn->setChecked(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
(void)dm;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::receiveACCGain(unsigned char level, unsigned char ab)
|
void wfmain::receiveACCGain(unsigned char level, unsigned char ab)
|
||||||
{
|
{
|
||||||
if(ab==1)
|
if(ab==1)
|
||||||
|
@ -3464,35 +3445,6 @@ void wfmain::serverConfigRequested(SERVERCONFIG conf, bool store)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wfmain::on_rptDupPlusBtn_clicked()
|
|
||||||
{
|
|
||||||
// DUP+
|
|
||||||
emit setDuplexMode(dmDupAutoOff);
|
|
||||||
emit setDuplexMode(dmDupPlus);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_rptSimplexBtn_clicked()
|
|
||||||
{
|
|
||||||
// Simplex
|
|
||||||
emit setDuplexMode(dmDupAutoOff);
|
|
||||||
emit setDuplexMode(dmSimplex);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_rptDupMinusBtn_clicked()
|
|
||||||
{
|
|
||||||
// DUP-
|
|
||||||
emit setDuplexMode(dmDupAutoOff);
|
|
||||||
emit setDuplexMode(dmDupMinus);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_rptAutoBtn_clicked()
|
|
||||||
{
|
|
||||||
// Auto Rptr (enable this feature)
|
|
||||||
// TODO: Hide an AutoOff button somewhere for non-US users
|
|
||||||
emit setDuplexMode(dmDupAutoOn);
|
|
||||||
}
|
|
||||||
|
|
||||||
void wfmain::on_modInputCombo_activated(int index)
|
void wfmain::on_modInputCombo_activated(int index)
|
||||||
{
|
{
|
||||||
emit setModInput( (rigInput)ui->modInputCombo->currentData().toInt(), false );
|
emit setModInput( (rigInput)ui->modInputCombo->currentData().toInt(), false );
|
||||||
|
|
12
wfmain.h
12
wfmain.h
|
@ -49,7 +49,7 @@ signals:
|
||||||
void setDataMode(bool dataOn);
|
void setDataMode(bool dataOn);
|
||||||
void getDataMode();
|
void getDataMode();
|
||||||
void getDuplexMode();
|
void getDuplexMode();
|
||||||
void setDuplexMode(duplexMode dm);
|
//void setDuplexMode(duplexMode dm);
|
||||||
void getModInput(bool dataOn);
|
void getModInput(bool dataOn);
|
||||||
void setModInput(rigInput input, bool dataOn);
|
void setModInput(rigInput input, bool dataOn);
|
||||||
void getPTT();
|
void getPTT();
|
||||||
|
@ -163,7 +163,7 @@ private slots:
|
||||||
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
|
||||||
void receiveModInput(rigInput input, bool dataOn);
|
void receiveModInput(rigInput input, bool dataOn);
|
||||||
void receiveDuplexMode(duplexMode dm);
|
//void receiveDuplexMode(duplexMode dm);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -357,14 +357,6 @@ private slots:
|
||||||
|
|
||||||
void on_scopeRefLevelSlider_valueChanged(int value);
|
void on_scopeRefLevelSlider_valueChanged(int value);
|
||||||
|
|
||||||
void on_rptDupPlusBtn_clicked();
|
|
||||||
|
|
||||||
void on_rptSimplexBtn_clicked();
|
|
||||||
|
|
||||||
void on_rptDupMinusBtn_clicked();
|
|
||||||
|
|
||||||
void on_rptAutoBtn_clicked();
|
|
||||||
|
|
||||||
void on_useSystemThemeChk_clicked(bool checked);
|
void on_useSystemThemeChk_clicked(bool checked);
|
||||||
|
|
||||||
void on_modInputCombo_activated(int index);
|
void on_modInputCombo_activated(int index);
|
||||||
|
|
43
wfmain.ui
43
wfmain.ui
|
@ -620,49 +620,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rptSimplexBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Simplex</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">duplexBtnGrp</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rptDupPlusBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Dup+</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">duplexBtnGrp</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rptDupMinusBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Dup-</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">duplexBtnGrp</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="rptAutoBtn">
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="buttonGroup">
|
|
||||||
<string notr="true">duplexBtnGrp</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="rptSetupBtn">
|
<widget class="QPushButton" name="rptSetupBtn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Ładowanie…
Reference in New Issue