Skip to content

Commit

Permalink
CW func
Browse files Browse the repository at this point in the history
  • Loading branch information
PianetaRadio authored Nov 6, 2022
1 parent 600090b commit 664b504
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,22 @@ void MainWindow::guiInit()
ui->comboBox_Preamp->addItem(QString::number(my_rig->state.preamp[i]));
}

//* Clarifier
rigSet.rit = 1;
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
//* Clarifier
rigSet.rit = 1;
if (!rig_has_set_func(my_rig, RIG_FUNC_XIT)) ui->radioButton_clarXIT->setEnabled(false);

//* CW
if (!rig_has_set_func(my_rig, RIG_FUNC_FBKIN)) ui->checkBox_BKIN->setEnabled(false);
if (!rig_has_set_func(my_rig, RIG_FUNC_APF)) ui->checkBox_APF->setEnabled(false);
if (!rig_has_set_level(my_rig, RIG_LEVEL_KEYSPD)) ui->spinBox_WPM->setEnabled(false);

//* FM
ui->comboBox_toneType->clear();
ui->comboBox_toneType->addItem(""); //None
if (rig_has_set_func(my_rig, RIG_FUNC_TBURST)) ui->comboBox_toneType->addItem("1750Hz"); //Burst 1750 Hz
Expand Down
6 changes: 3 additions & 3 deletions rigdaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,9 @@ void RigDaemon::rigUpdate()
//* CW
if ((commandPriority == 17 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0) //&& mode=CW
{
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_FBKIN, &rigGet.bkin); //Break-in
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_APF, &rigGet.apf); //Audio Peak Filter
rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_KEYSPD, &retvalue); //Keyer speed WPM
if (rig_has_get_func(my_rig, RIG_FUNC_FBKIN)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_FBKIN, &rigGet.bkin); //Break-in
if (rig_has_get_func(my_rig, RIG_FUNC_APF)) rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_APF, &rigGet.apf); //Audio Peak Filter
if (rig_has_get_level(my_rig, RIG_LEVEL_KEYSPD)) rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_KEYSPD, &retvalue); //Keyer speed WPM
rigGet.wpm = retvalue.i;
}

Expand Down

0 comments on commit 664b504

Please sign in to comment.