kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
c0d66fba54
commit
25e13f79d4
|
@ -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-26T20:32:42. -->
|
<!-- Written by QtCreator 6.0.2, 2022-03-27T13:55:03. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
|
|
@ -447,6 +447,7 @@ void MainWindow::guiUpdate()
|
||||||
if (rigGet.rptShift == RIG_RPT_SHIFT_MINUS) ui->radioButton_RPTshiftMinus->setChecked(true); //-
|
if (rigGet.rptShift == RIG_RPT_SHIFT_MINUS) ui->radioButton_RPTshiftMinus->setChecked(true); //-
|
||||||
else if (rigGet.rptShift == RIG_RPT_SHIFT_PLUS) ui->radioButton_RPTshiftPlus->setChecked(true); //+
|
else if (rigGet.rptShift == RIG_RPT_SHIFT_PLUS) ui->radioButton_RPTshiftPlus->setChecked(true); //+
|
||||||
else ui->radioButton_RPTshiftSimplex->setChecked(true); //Simplex
|
else ui->radioButton_RPTshiftSimplex->setChecked(true); //Simplex
|
||||||
|
ui->spinBox_RPToffset->setValue(rigGet.rptOffset/1000); //Offset (kHz)
|
||||||
|
|
||||||
ui->comboBox_toneType->setCurrentIndex(rigGet.toneType);
|
ui->comboBox_toneType->setCurrentIndex(rigGet.toneType);
|
||||||
if (rigGet.toneType == 2 || rigGet.toneType ==3) ui->comboBox_toneFreq->setCurrentText(QString::number(rigGet.tone/10.0)); //CTCSS
|
if (rigGet.toneType == 2 || rigGet.toneType ==3) ui->comboBox_toneFreq->setCurrentText(QString::number(rigGet.tone/10.0)); //CTCSS
|
||||||
|
@ -920,6 +921,11 @@ void MainWindow::on_spinBox_WPM_valueChanged(int arg1)
|
||||||
rigCmd.wpm = 1;
|
rigCmd.wpm = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_spinBox_RPToffset_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
rigSet.rptOffset = arg1*1000;
|
||||||
|
rigCmd.rptOffset = 1;
|
||||||
|
}
|
||||||
|
|
||||||
//***** Slider *****
|
//***** Slider *****
|
||||||
|
|
||||||
|
|
|
@ -156,6 +156,8 @@ private slots:
|
||||||
|
|
||||||
void on_comboBox_toneFreq_activated(int index);
|
void on_comboBox_toneFreq_activated(int index);
|
||||||
|
|
||||||
|
void on_spinBox_RPToffset_valueChanged(int arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QTimer *timer;
|
QTimer *timer;
|
||||||
|
|
|
@ -52,6 +52,9 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_Connect">
|
<widget class="QPushButton" name="pushButton_Connect">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1469,7 +1472,7 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="0,0,0,0,1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_RPTshift">
|
<widget class="QLabel" name="label_RPTshift">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1501,10 +1504,17 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinBox_RPToffset">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>10000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0" colspan="2">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1,1,1">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_tone">
|
<widget class="QLabel" name="label_tone">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -1515,11 +1525,24 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBox_toneType"/>
|
<widget class="QComboBox" name="comboBox_toneType"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox_toneFreq"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="comboBox_toneFreq"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -430,6 +430,13 @@ void RigDaemon::rigUpdate()
|
||||||
if (retcode == RIG_OK) rigGet.rptShift = rigSet.rptShift;
|
if (retcode == RIG_OK) rigGet.rptShift = rigSet.rptShift;
|
||||||
rigCmd.rptShift = 0;
|
rigCmd.rptShift = 0;
|
||||||
}
|
}
|
||||||
|
//* Repeater offset
|
||||||
|
if (rigCmd.rptOffset)
|
||||||
|
{
|
||||||
|
retcode = rig_set_rptr_offs(my_rig, RIG_VFO_CURR, rigSet.rptOffset);
|
||||||
|
if (retcode == RIG_OK) rigGet.rptOffset = rigSet.rptOffset;
|
||||||
|
rigCmd.rptOffset = 0;
|
||||||
|
}
|
||||||
//* Tone
|
//* Tone
|
||||||
if (rigCmd.tone)
|
if (rigCmd.tone)
|
||||||
{
|
{
|
||||||
|
@ -597,6 +604,7 @@ void RigDaemon::rigUpdate()
|
||||||
if ((commandPriority == 17 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0) //&& mode=FM
|
if ((commandPriority == 17 && !rigGet.ptt && rigCom.fullPoll) || commandPriority == 0) //&& mode=FM
|
||||||
{
|
{
|
||||||
rig_get_rptr_shift(my_rig, RIG_VFO_CURR, &rigGet.rptShift); //Repeater Shift
|
rig_get_rptr_shift(my_rig, RIG_VFO_CURR, &rigGet.rptShift); //Repeater Shift
|
||||||
|
rig_get_rptr_offs(my_rig, RIG_VFO_CURR, &rigGet.rptOffset); //Repeater Offset
|
||||||
|
|
||||||
int status = false;
|
int status = false;
|
||||||
if (!(my_rig->caps->has_get_func & RIG_FUNC_TONE)) status = 1; //If get cap is not available skip
|
if (!(my_rig->caps->has_get_func & RIG_FUNC_TONE)) status = 1; //If get cap is not available skip
|
||||||
|
|
|
@ -39,7 +39,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
powerstat_t onoff; //on/off status
|
powerstat_t onoff; //on/off status
|
||||||
freq_t freqMain, freqSub; //Frequency
|
freq_t freqMain, freqSub; //Frequency (Hz)
|
||||||
rmode_t mode, modeSub; //Mode
|
rmode_t mode, modeSub; //Mode
|
||||||
pbwidth_t bwidth, bwidthSub; //IF filter bandwidth
|
pbwidth_t bwidth, bwidthSub; //IF filter bandwidth
|
||||||
int bwNarrow; //IF narrow filter
|
int bwNarrow; //IF narrow filter
|
||||||
|
@ -69,7 +69,8 @@ typedef struct {
|
||||||
int notchFilter;
|
int notchFilter;
|
||||||
int ifShift;
|
int ifShift;
|
||||||
rptr_shift_t rptShift; //Repeater shift
|
rptr_shift_t rptShift; //Repeater shift
|
||||||
int toneType; //0 none, 1 burst 1750, 2 CTCSS, 3 CTCSS SQL, 4 DCS, 5 DCS SQL
|
shortfreq_t rptOffset; //Repeater offset (Hz)
|
||||||
|
int toneType; //0 none, 1 burst 1750, 2 CTCSS, 3 CTCSS SQL, 4 DCS
|
||||||
tone_t tone; //CTCSS or DCS tone
|
tone_t tone; //CTCSS or DCS tone
|
||||||
} rigSettings;
|
} rigSettings;
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ typedef struct {
|
||||||
int noiseReduction, noiseReductionLevel;
|
int noiseReduction, noiseReductionLevel;
|
||||||
int notchFilter;
|
int notchFilter;
|
||||||
int ifShift;
|
int ifShift;
|
||||||
int rptShift;
|
int rptShift, rptOffset;
|
||||||
int tone;
|
int tone;
|
||||||
int antList;
|
int antList;
|
||||||
int rangeList;
|
int rangeList;
|
||||||
|
|
Ładowanie…
Reference in New Issue