kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
a6aa5c4787
commit
9baf4c7a2f
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 6.0.2, 2022-03-23T19:55:48. -->
|
||||
<!-- Written by QtCreator 6.0.2, 2022-03-26T20:32:42. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
|
|
@ -3,6 +3,7 @@ CatRadio
|
|||
(+ New, * Updated, - Removed)
|
||||
|
||||
1.2.0 -
|
||||
+ DCS code and squelch
|
||||
+ COM port list in the communication config dialog
|
||||
|
||||
1.1.1 - 2022-03-19
|
||||
|
|
|
@ -221,11 +221,11 @@ void MainWindow::guiInit()
|
|||
|
||||
//* Tone
|
||||
ui->comboBox_toneType->clear();
|
||||
ui->comboBox_toneType->addItem(" "); //None
|
||||
ui->comboBox_toneType->addItem(""); //None
|
||||
ui->comboBox_toneType->addItem("1750Hz"); //Burst 1750 Hz
|
||||
ui->comboBox_toneType->addItem("TONE"); //CTCSS Tx
|
||||
ui->comboBox_toneType->addItem("TSQL"); //CTCSS Tx + Rx squelch
|
||||
//ui->comboBox_toneType->addItem("DCS"); //DCS
|
||||
if (my_rig->caps->set_ctcss_sql) ui->comboBox_toneType->addItem("TSQL"); //CTCSS Tx + Rx squelch
|
||||
if (my_rig->caps->set_dcs_sql) ui->comboBox_toneType->addItem("DCS"); //DCS
|
||||
|
||||
//check for targetable sub VFO
|
||||
if (my_rig->caps->rig_model != 2) //Hamlib 4.4 has bug for rigctld and targetable_vfo, skip check
|
||||
|
@ -365,11 +365,14 @@ void MainWindow::guiUpdate()
|
|||
}
|
||||
}
|
||||
|
||||
//for (i = 0; i < DCS_LIST_SIZE; i++) //DCS tone
|
||||
//{
|
||||
// if (my_rig->caps->dcs_list[i] == 0) break;
|
||||
// ui->comboBox_toneFreq->addItem(QString::number(my_rig->caps->dcs_list[i]));
|
||||
//}
|
||||
if (rigGet.toneType == 4)
|
||||
{
|
||||
for (i = 0; i < DCS_LIST_SIZE; i++) //DCS code
|
||||
{
|
||||
if (my_rig->caps->dcs_list[i] == 0) break;
|
||||
ui->comboBox_toneFreq->addItem(QString::number(my_rig->caps->dcs_list[i]));
|
||||
}
|
||||
}
|
||||
|
||||
rigCmd.toneList = 0;
|
||||
}
|
||||
|
@ -890,10 +893,15 @@ void MainWindow::on_comboBox_toneType_activated(int index)
|
|||
|
||||
void MainWindow::on_comboBox_toneFreq_activated(int index)
|
||||
{
|
||||
QString arg = ui->comboBox_toneFreq->itemText(index);
|
||||
arg = arg.remove("."); //Remove '.' from CTCSS (as for hamlib CTCSS tone list)
|
||||
if (rigGet.toneType == 2 || rigGet.toneType == 3) //CTCSS
|
||||
{
|
||||
QString arg = ui->comboBox_toneFreq->itemText(index);
|
||||
arg = arg.remove("."); //Remove '.' from CTCSS (as for hamlib CTCSS tone list)
|
||||
rigSet.tone = arg.toUInt();
|
||||
}
|
||||
else if (rigGet.toneType == 4) rigSet.tone = ui->comboBox_toneFreq->itemText(index).toInt(); //DCS
|
||||
else return;
|
||||
|
||||
if (rigGet.toneType == 2 || rigGet.toneType == 3) rigSet.tone = arg.toUInt();
|
||||
rigCmd.tone = 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -435,23 +435,29 @@ void RigDaemon::rigUpdate()
|
|||
{
|
||||
switch (rigSet.toneType)
|
||||
{
|
||||
case 1:
|
||||
case 1: //Burst 1750 Hz
|
||||
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TBURST, true);
|
||||
break;
|
||||
case 2:
|
||||
case 2: //CTCSS tone
|
||||
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TONE, true);
|
||||
if (rigSet.tone) rig_set_ctcss_tone(my_rig, RIG_VFO_CURR, rigSet.tone);
|
||||
else rig_get_ctcss_tone(my_rig, RIG_VFO_CURR, &rigSet.tone);
|
||||
break;
|
||||
case 3:
|
||||
case 3: //CTCSS tone + squelch
|
||||
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TSQL, true);
|
||||
if (rigSet.tone) rig_set_ctcss_tone(my_rig, RIG_VFO_CURR, rigSet.tone);
|
||||
else rig_get_ctcss_tone(my_rig, RIG_VFO_CURR, &rigSet.tone);
|
||||
break;
|
||||
case 4: //DCS tone + squelch
|
||||
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_CSQL, true);
|
||||
if (rigSet.tone) rig_set_dcs_code(my_rig, RIG_VFO_CURR, rigSet.tone);
|
||||
else rig_get_dcs_code(my_rig, RIG_VFO_CURR, &rigSet.tone);
|
||||
break;
|
||||
default:
|
||||
rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TBURST, false);
|
||||
rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TONE, false);
|
||||
rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TSQL, false);
|
||||
rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_CSQL, false);
|
||||
retcode = RIG_OK;
|
||||
break;
|
||||
}
|
||||
|
@ -593,6 +599,7 @@ void RigDaemon::rigUpdate()
|
|||
rig_get_rptr_shift(my_rig, RIG_VFO_CURR, &rigGet.rptShift); //Repeater Shift
|
||||
|
||||
int status = false;
|
||||
if (!my_rig->caps->get_ctcss_sql) status = 1; //If get cap is not available skip
|
||||
if (!status)
|
||||
{
|
||||
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TBURST, &status); //1750 Hz Tone burst
|
||||
|
@ -608,21 +615,23 @@ void RigDaemon::rigUpdate()
|
|||
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_TSQL, &status); //CTCSS Tone Tx and Rx Squelch
|
||||
if (status) rigGet.toneType = 3;
|
||||
}
|
||||
if (!status)
|
||||
{
|
||||
rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_CSQL, &status); //DCS Code
|
||||
if (status) rigGet.toneType = 4;
|
||||
}
|
||||
if (!status) rigGet.toneType = 0;
|
||||
|
||||
if (rigGet.toneType == 2 || rigGet.toneType == 3) rig_get_ctcss_tone(my_rig, RIG_VFO_CURR, &rigGet.tone);
|
||||
else if (rigGet.toneType == 4 || rigGet.toneType == 5) rig_get_dcs_code(my_rig, RIG_VFO_CURR, &rigGet.tone);
|
||||
if ((rigGet.toneType == 2 || rigGet.toneType == 3) && my_rig->caps->get_ctcss_tone) rig_get_ctcss_tone(my_rig, RIG_VFO_CURR, &rigGet.tone);
|
||||
else if (rigGet.toneType == 4 && my_rig->caps->get_dcs_code) rig_get_dcs_code(my_rig, RIG_VFO_CURR, &rigGet.tone);
|
||||
|
||||
if (rigGet.toneType && rigGet.tone == 0)
|
||||
/*if (rigGet.toneType && rigGet.tone == 0)
|
||||
{
|
||||
rigSet.toneType = 0;
|
||||
rigCmd.tone = 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (rigGet.toneType != rigSet.toneType) rigCmd.toneList = 1; //update tone list
|
||||
|
||||
//rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_CSQL, &status);
|
||||
//rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_DSQL, &status);
|
||||
}
|
||||
|
||||
commandPriority ++;
|
||||
|
|
Ładowanie…
Reference in New Issue