kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
25e13f79d4
commit
7b640fffb4
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 6.0.2, 2022-03-27T13:55:03. -->
|
<!-- Written by QtCreator 6.0.2, 2022-03-28T21:06:02. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|
|
@ -222,10 +222,10 @@ void MainWindow::guiInit()
|
||||||
//* Tone
|
//* Tone
|
||||||
ui->comboBox_toneType->clear();
|
ui->comboBox_toneType->clear();
|
||||||
ui->comboBox_toneType->addItem(""); //None
|
ui->comboBox_toneType->addItem(""); //None
|
||||||
ui->comboBox_toneType->addItem("1750Hz"); //Burst 1750 Hz
|
if (rig_has_set_func(my_rig, RIG_FUNC_TBURST)) ui->comboBox_toneType->addItem("1750Hz"); //Burst 1750 Hz
|
||||||
ui->comboBox_toneType->addItem("TONE"); //CTCSS Tx
|
if (rig_has_set_func(my_rig, RIG_FUNC_TONE)) ui->comboBox_toneType->addItem("TONE"); //CTCSS Tx
|
||||||
if (my_rig->caps->set_ctcss_sql) ui->comboBox_toneType->addItem("TSQL"); //CTCSS Tx + Rx squelch
|
if (rig_has_set_func(my_rig, RIG_FUNC_TSQL)) ui->comboBox_toneType->addItem("TSQL"); //CTCSS Tx + Rx squelch
|
||||||
if (my_rig->caps->set_dcs_sql) ui->comboBox_toneType->addItem("DCS"); //DCS
|
if (rig_has_set_func(my_rig, RIG_FUNC_CSQL)) ui->comboBox_toneType->addItem("DCS"); //DCS
|
||||||
|
|
||||||
//check for targetable sub VFO
|
//check for targetable sub VFO
|
||||||
if (my_rig->caps->rig_model != 2) //Hamlib 4.4 has bug for rigctld and targetable_vfo, skip check
|
if (my_rig->caps->rig_model != 2) //Hamlib 4.4 has bug for rigctld and targetable_vfo, skip check
|
||||||
|
@ -589,6 +589,17 @@ void MainWindow::on_pushButton_Fast_toggled(bool checked)
|
||||||
else fastDial = 0;
|
else fastDial = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_left_clicked()
|
||||||
|
{
|
||||||
|
rigCmd.vfoDown = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_right_clicked()
|
||||||
|
{
|
||||||
|
rigCmd.vfoUp = 1;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_pushButton_Tune_clicked()
|
void MainWindow::on_pushButton_Tune_clicked()
|
||||||
{
|
{
|
||||||
rigCmd.tune = 1;
|
rigCmd.tune = 1;
|
||||||
|
@ -887,7 +898,13 @@ void MainWindow::on_comboBox_Meter_activated(int index)
|
||||||
|
|
||||||
void MainWindow::on_comboBox_toneType_activated(int index)
|
void MainWindow::on_comboBox_toneType_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.toneType = index;
|
QString toneType = ui->comboBox_toneType->itemText(index);
|
||||||
|
if (toneType == "1750Hz") rigSet.toneType = 1;
|
||||||
|
else if (toneType == "TONE") rigSet.toneType = 2;
|
||||||
|
else if (toneType == "TSQL") rigSet.toneType = 3;
|
||||||
|
else if (toneType == "DCS") rigSet.toneType = 4;
|
||||||
|
else rigSet.toneType = 0;
|
||||||
|
|
||||||
rigCmd.toneList = 1; //update tone list
|
rigCmd.toneList = 1; //update tone list
|
||||||
rigCmd.tone = 1;
|
rigCmd.tone = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,6 +158,10 @@ private slots:
|
||||||
|
|
||||||
void on_spinBox_RPToffset_valueChanged(int arg1);
|
void on_spinBox_RPToffset_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_pushButton_left_clicked();
|
||||||
|
|
||||||
|
void on_pushButton_right_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
|
|
|
@ -1058,6 +1058,32 @@
|
||||||
<string>Sub</string>
|
<string>Sub</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_left">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>140</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>21</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string><</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_right">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>160</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>21</width>
|
||||||
|
<height>25</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QFrame" name="frame_3">
|
<widget class="QFrame" name="frame_3">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
|
|
@ -252,6 +252,20 @@ void RigDaemon::rigUpdate()
|
||||||
rigCmd.vfoCopy = 0;
|
rigCmd.vfoCopy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//* VFO Down
|
||||||
|
if (rigCmd.vfoDown)
|
||||||
|
{
|
||||||
|
rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_DOWN);
|
||||||
|
rigCmd.vfoDown = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//* VFO Up
|
||||||
|
if (rigCmd.vfoUp)
|
||||||
|
{
|
||||||
|
rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_UP);
|
||||||
|
rigCmd.vfoUp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//* Band Up
|
//* Band Up
|
||||||
if (rigCmd.bandUp)
|
if (rigCmd.bandUp)
|
||||||
{
|
{
|
||||||
|
@ -290,9 +304,9 @@ void RigDaemon::rigUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
//* Tune
|
//* Tune
|
||||||
if (rigCmd.tune && (my_rig->caps->vfo_ops & RIG_OP_TUNE))
|
if (rigCmd.tune)
|
||||||
{
|
{
|
||||||
rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_TUNE);
|
if (my_rig->caps->vfo_ops & RIG_OP_TUNE) rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_TUNE);
|
||||||
rigCmd.tune = 0;
|
rigCmd.tune = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -426,15 +440,21 @@ void RigDaemon::rigUpdate()
|
||||||
//* Repeater shift
|
//* Repeater shift
|
||||||
if (rigCmd.rptShift)
|
if (rigCmd.rptShift)
|
||||||
{
|
{
|
||||||
retcode = rig_set_rptr_shift(my_rig, RIG_VFO_CURR, rigSet.rptShift);
|
if (my_rig->caps->set_rptr_shift)
|
||||||
if (retcode == RIG_OK) rigGet.rptShift = rigSet.rptShift;
|
{
|
||||||
|
retcode = rig_set_rptr_shift(my_rig, RIG_VFO_CURR, rigSet.rptShift);
|
||||||
|
if (retcode == RIG_OK) rigGet.rptShift = rigSet.rptShift;
|
||||||
|
}
|
||||||
rigCmd.rptShift = 0;
|
rigCmd.rptShift = 0;
|
||||||
}
|
}
|
||||||
//* Repeater offset
|
//* Repeater offset
|
||||||
if (rigCmd.rptOffset)
|
if (rigCmd.rptOffset)
|
||||||
{
|
{
|
||||||
retcode = rig_set_rptr_offs(my_rig, RIG_VFO_CURR, rigSet.rptOffset);
|
if (my_rig->caps->set_rptr_offs)
|
||||||
if (retcode == RIG_OK) rigGet.rptOffset = rigSet.rptOffset;
|
{
|
||||||
|
retcode = rig_set_rptr_offs(my_rig, RIG_VFO_CURR, rigSet.rptOffset);
|
||||||
|
if (retcode == RIG_OK) rigGet.rptOffset = rigSet.rptOffset;
|
||||||
|
}
|
||||||
rigCmd.rptOffset = 0;
|
rigCmd.rptOffset = 0;
|
||||||
}
|
}
|
||||||
//* Tone
|
//* Tone
|
||||||
|
|
|
@ -82,8 +82,8 @@ typedef struct {
|
||||||
int bwidthList;
|
int bwidthList;
|
||||||
int vfo;
|
int vfo;
|
||||||
int split;
|
int split;
|
||||||
int vfoXchange;
|
int vfoXchange, vfoCopy;
|
||||||
int vfoCopy;
|
int vfoDown, vfoUp;
|
||||||
int ptt;
|
int ptt;
|
||||||
int rfPower;
|
int rfPower;
|
||||||
int rfGain;
|
int rfGain;
|
||||||
|
@ -95,8 +95,7 @@ typedef struct {
|
||||||
int ant;
|
int ant;
|
||||||
int tuner;
|
int tuner;
|
||||||
int tune;
|
int tune;
|
||||||
int bandUp;
|
int bandUp, bandDown;
|
||||||
int bandDown;
|
|
||||||
int bandChange;
|
int bandChange;
|
||||||
int bkin;
|
int bkin;
|
||||||
int wpm;
|
int wpm;
|
||||||
|
|
Ładowanie…
Reference in New Issue