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