kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
b69f5c58ad
commit
f749ee050b
|
@ -246,7 +246,13 @@ void MainWindow::guiInit()
|
||||||
|
|
||||||
//* Clarifier
|
//* Clarifier
|
||||||
rigSet.rit = 1;
|
rigSet.rit = 1;
|
||||||
if (!rig_has_get_func(my_rig, RIG_FUNC_XIT)) ui->radioButton_clarXIT->setCheckable(false);
|
if (!rig_has_set_func(my_rig, RIG_FUNC_XIT)) ui->radioButton_clarXIT->setEnabled(false);
|
||||||
|
|
||||||
|
//* Filter
|
||||||
|
if (!rig_has_set_func(my_rig, RIG_FUNC_NB)) ui->checkBox_NB->setEnabled(false);
|
||||||
|
if (!rig_has_set_func(my_rig, RIG_FUNC_NB2)) ui->checkBox_NB2->setEnabled(false);
|
||||||
|
if (!rig_has_set_func(my_rig, RIG_FUNC_NR)) {ui->checkBox_NR->setEnabled(false); ui->spinBox_NR->setEnabled(false);}
|
||||||
|
if (!rig_has_set_func(my_rig, RIG_FUNC_ANF)) ui->checkBox_NF->setEnabled(false);
|
||||||
|
|
||||||
//* Tone
|
//* Tone
|
||||||
ui->comboBox_toneType->clear();
|
ui->comboBox_toneType->clear();
|
||||||
|
@ -477,6 +483,7 @@ void MainWindow::guiUpdate()
|
||||||
|
|
||||||
//* Filter
|
//* Filter
|
||||||
ui->checkBox_NB->setChecked(rigGet.noiseBlanker);
|
ui->checkBox_NB->setChecked(rigGet.noiseBlanker);
|
||||||
|
ui->checkBox_NB2->setChecked(rigGet.noiseBlanker2);
|
||||||
ui->checkBox_NR->setChecked(rigGet.noiseReduction);
|
ui->checkBox_NR->setChecked(rigGet.noiseReduction);
|
||||||
ui->spinBox_NR->setValue(rigGet.noiseReductionLevel);
|
ui->spinBox_NR->setValue(rigGet.noiseReductionLevel);
|
||||||
ui->checkBox_NF->setChecked(rigGet.notchFilter);
|
ui->checkBox_NF->setChecked(rigGet.notchFilter);
|
||||||
|
@ -823,6 +830,20 @@ void MainWindow::on_checkBox_NB_toggled(bool checked)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_checkBox_NB2_toggled(bool checked)
|
||||||
|
{
|
||||||
|
if (checked && !rigGet.noiseBlanker2)
|
||||||
|
{
|
||||||
|
rigSet.noiseBlanker2 = 1;
|
||||||
|
rigCmd.noiseBlanker2 = 1;
|
||||||
|
}
|
||||||
|
else if (!checked && rigGet.noiseBlanker2)
|
||||||
|
{
|
||||||
|
rigSet.noiseBlanker2 = 0;
|
||||||
|
rigCmd.noiseBlanker2 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_checkBox_NR_toggled(bool checked)
|
void MainWindow::on_checkBox_NR_toggled(bool checked)
|
||||||
{
|
{
|
||||||
if (checked && !rigGet.noiseReduction)
|
if (checked && !rigGet.noiseReduction)
|
||||||
|
|
|
@ -185,6 +185,8 @@ private slots:
|
||||||
|
|
||||||
void on_horizontalSlider_clar_sliderReleased();
|
void on_horizontalSlider_clar_sliderReleased();
|
||||||
|
|
||||||
|
void on_checkBox_NB2_toggled(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
|
|
|
@ -805,7 +805,7 @@
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QCheckBox" name="checkBox_NB2">
|
<widget class="QCheckBox" name="checkBox_NB2">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>NB2</string>
|
<string>NB2</string>
|
||||||
|
|
|
@ -393,6 +393,12 @@ void RigDaemon::rigUpdate()
|
||||||
if (retcode == RIG_OK) rigGet.noiseBlanker = rigSet.noiseBlanker;
|
if (retcode == RIG_OK) rigGet.noiseBlanker = rigSet.noiseBlanker;
|
||||||
rigCmd.noiseBlanker = 0;
|
rigCmd.noiseBlanker = 0;
|
||||||
}
|
}
|
||||||
|
if (rigCmd.noiseBlanker2)
|
||||||
|
{
|
||||||
|
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NB2, rigSet.noiseBlanker2);
|
||||||
|
if (retcode == RIG_OK) rigGet.noiseBlanker2 = rigSet.noiseBlanker2;
|
||||||
|
rigCmd.noiseBlanker2 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//* NR noise reduction
|
//* NR noise reduction
|
||||||
if (rigCmd.noiseReduction)
|
if (rigCmd.noiseReduction)
|
||||||
|
@ -645,24 +651,37 @@ void RigDaemon::rigUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
//* NB noise blanker
|
//* NB noise blanker
|
||||||
if ((commandPriority == 12 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NB, &rigGet.noiseBlanker);
|
if ((commandPriority == 12 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
||||||
|
{
|
||||||
|
if (rig_has_get_func(my_rig, RIG_FUNC_NB)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NB, &rigGet.noiseBlanker);
|
||||||
|
if (rig_has_get_func(my_rig, RIG_FUNC_NB2)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NB2, &rigGet.noiseBlanker2);
|
||||||
|
}
|
||||||
|
|
||||||
//* NR noise reduction
|
//* NR noise reduction
|
||||||
if ((commandPriority == 13 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
if ((commandPriority == 13 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
||||||
{
|
{
|
||||||
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NR, &rigGet.noiseReduction);
|
if (rig_has_get_func(my_rig, RIG_FUNC_NR)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_NR, &rigGet.noiseReduction);
|
||||||
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_NR, &retvalue);
|
if (rig_has_get_level(my_rig, RIG_LEVEL_NR))
|
||||||
rigGet.noiseReductionLevel = retvalue.i;
|
{
|
||||||
|
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_NR, &retvalue);
|
||||||
|
rigGet.noiseReductionLevel = retvalue.i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//* NF notch filter
|
//* NF notch filter
|
||||||
if ((commandPriority == 14 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_ANF, &rigGet.notchFilter);
|
if ((commandPriority == 14 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
||||||
|
{
|
||||||
|
if (rig_has_get_func(my_rig, RIG_FUNC_ANF)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_ANF, &rigGet.notchFilter);
|
||||||
|
}
|
||||||
|
|
||||||
//* IF Shift
|
//* IF Shift
|
||||||
if ((commandPriority == 15 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
if ((commandPriority == 15 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0)
|
||||||
{
|
{
|
||||||
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_IF, &retvalue);
|
if (rig_has_get_level(my_rig, RIG_LEVEL_NR))
|
||||||
rigGet.ifShift = retvalue.i;
|
{
|
||||||
|
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_IF, &retvalue);
|
||||||
|
rigGet.ifShift = retvalue.i;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//* Clarifier
|
//* Clarifier
|
||||||
|
|
|
@ -65,9 +65,9 @@ typedef struct {
|
||||||
int bkin; //CW Break-in
|
int bkin; //CW Break-in
|
||||||
int wpm; //CW Keyer speed WPM
|
int wpm; //CW Keyer speed WPM
|
||||||
int apf; //Audio Peak Filter
|
int apf; //Audio Peak Filter
|
||||||
int noiseBlanker;
|
int noiseBlanker, noiseBlanker2; //NB
|
||||||
int noiseReduction, noiseReductionLevel;
|
int noiseReduction, noiseReductionLevel; //NR
|
||||||
int notchFilter;
|
int notchFilter; //NF
|
||||||
int ifShift;
|
int ifShift;
|
||||||
int clar, rit, xit; //Clarifier Rx or Tx
|
int clar, rit, xit; //Clarifier Rx or Tx
|
||||||
shortfreq_t ritOffset, xitOffset; //Clarifier offset (Hz)
|
shortfreq_t ritOffset, xitOffset; //Clarifier offset (Hz)
|
||||||
|
@ -104,7 +104,7 @@ typedef struct {
|
||||||
int bkin;
|
int bkin;
|
||||||
int wpm;
|
int wpm;
|
||||||
int apf;
|
int apf;
|
||||||
int noiseBlanker;
|
int noiseBlanker, noiseBlanker2;
|
||||||
int noiseReduction, noiseReductionLevel;
|
int noiseReduction, noiseReductionLevel;
|
||||||
int notchFilter;
|
int notchFilter;
|
||||||
int ifShift;
|
int ifShift;
|
||||||
|
|
Ładowanie…
Reference in New Issue