Yaesu band stack

#23
1.3.0
PianetaRadio 2022-10-30 16:20:53 +01:00 zatwierdzone przez GitHub
rodzic 10d884a966
commit 846293a019
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
7 zmienionych plików z 314 dodań i 176 usunięć

Wyświetl plik

@ -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-04-11T19:09:53. --> <!-- Written by QtCreator 6.0.2, 2022-10-30T12:38:39. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
@ -94,7 +94,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.4 MinGW 64-bit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.4 MinGW 64-bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.4 MinGW 64-bit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.4 MinGW 64-bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.624.win64_mingw_kit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.624.win64_mingw_kit</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@ -247,7 +247,7 @@
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value> <value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/Johnny/Documents/QT/build-CatRadio-Desktop_Qt_6_2_4_MinGW_64_bit-Debug</value> <value type="QString" key="RunConfiguration.WorkingDirectory.default">C:/Users/Johnny/Documents/QT/build-CatRadio-Desktop_Qt_6_2_4_MinGW_64_bit-Release</value>
</valuemap> </valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value> <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap> </valuemap>

Wyświetl plik

@ -3,6 +3,8 @@ CatRadio
(+ New, * Updated, - Removed) (+ New, * Updated, - Removed)
1.3.0 - 2022-xx-xx 1.3.0 - 2022-xx-xx
+ Band stack for supported Yaesu radios
* Updated to library Hamlib 4.5
+ Save/restore window settings + Save/restore window settings
1.2.0 - 2022-04-13 1.2.0 - 2022-04-13

Wyświetl plik

@ -145,9 +145,11 @@ void MainWindow::guiInit()
{ {
ui->statusbar->showMessage(my_rig->caps->model_name); ui->statusbar->showMessage(my_rig->caps->model_name);
if (my_rig->caps->set_powerstat == NULL) //Power pushbutton //* Power on/off cap
//if (rig_has_set_func(my_rig, RIG_FUNCTION_SET_POWERSTAT)==0)
if (my_rig->caps->set_powerstat == NULL)
{ {
ui->pushButton_Power->setDisabled(true); ui->pushButton_Power->setDisabled(true); //Power pushbutton disabled
rigCap.onoff = 0; rigCap.onoff = 0;
} }
else else
@ -156,9 +158,11 @@ void MainWindow::guiInit()
rigCap.onoff = 1; rigCap.onoff = 1;
} }
if (my_rig->caps->set_ptt == NULL) //PTT pushbutton //* PTT cap
//if (rig_has_set_func(my_rig, RIG_FUNCTION_SET_PTT)==0)
if (my_rig->caps->set_ptt == NULL)
{ {
ui->pushButton_PTT->setDisabled(true); ui->pushButton_PTT->setDisabled(true); //PTT pushbutton disabled
rigCap.ptt = 0; rigCap.ptt = 0;
} }
else else
@ -167,6 +171,10 @@ void MainWindow::guiInit()
rigCap.ptt = 1; rigCap.ptt = 1;
} }
//* Band select cap
if (rig_has_set_level(my_rig, RIG_LEVEL_BAND_SELECT)) rigCap.bandChange = 1;
else rigCap.bandChange = 0;
//* Mode combobox //* Mode combobox
if (my_rig->state.mode_list == RIG_MODE_NONE) if (my_rig->state.mode_list == RIG_MODE_NONE)
{ {

Wyświetl plik

@ -771,156 +771,120 @@
<rect> <rect>
<x>480</x> <x>480</x>
<y>220</y> <y>220</y>
<width>121</width> <width>123</width>
<height>191</height> <height>204</height>
</rect> </rect>
</property> </property>
<property name="title"> <property name="title">
<string>Filter</string> <string>Filter</string>
</property> </property>
<widget class="QCheckBox" name="checkBox_NB"> <layout class="QGridLayout" name="gridLayout_5">
<property name="geometry"> <item row="0" column="0">
<rect> <widget class="QCheckBox" name="checkBox_NB">
<x>10</x> <property name="toolTip">
<y>30</y> <string>Noise Blanking</string>
<width>51</width> </property>
<height>22</height> <property name="text">
</rect> <string>NB</string>
</property> </property>
<property name="toolTip"> </widget>
<string>Noise Blanking</string> </item>
</property> <item row="0" column="1" colspan="2">
<property name="text"> <widget class="QCheckBox" name="checkBox_NB2">
<string>NB</string> <property name="enabled">
</property> <bool>false</bool>
</widget> </property>
<widget class="QCheckBox" name="checkBox_NR"> <property name="text">
<property name="geometry"> <string>NB2</string>
<rect> </property>
<x>10</x> </widget>
<y>60</y> </item>
<width>51</width> <item row="1" column="0">
<height>22</height> <widget class="QCheckBox" name="checkBox_NR">
</rect> <property name="toolTip">
</property> <string>Noise Reduction</string>
<property name="toolTip"> </property>
<string>Noise Reduction</string> <property name="text">
</property> <string>NR</string>
<property name="text"> </property>
<string>NR</string> </widget>
</property> </item>
</widget> <item row="1" column="2">
<widget class="QCheckBox" name="checkBox_NF"> <widget class="QSpinBox" name="spinBox_NR">
<property name="geometry"> <property name="minimum">
<rect> <number>1</number>
<x>10</x> </property>
<y>90</y> <property name="maximum">
<width>51</width> <number>15</number>
<height>22</height> </property>
</rect> </widget>
</property> </item>
<property name="toolTip"> <item row="2" column="0">
<string>Notch Filter</string> <widget class="QCheckBox" name="checkBox_NF">
</property> <property name="toolTip">
<property name="text"> <string>Notch Filter</string>
<string>NF</string> </property>
</property> <property name="text">
</widget> <string>NF</string>
<widget class="QSpinBox" name="spinBox_NR"> </property>
<property name="geometry"> </widget>
<rect> </item>
<x>70</x> <item row="3" column="0" colspan="2">
<y>60</y> <widget class="QCheckBox" name="checkBox_NAR">
<width>46</width> <property name="toolTip">
<height>25</height> <string>BW Narrow</string>
</rect> </property>
</property> <property name="text">
<property name="minimum"> <string>NAR</string>
<number>1</number> </property>
</property> </widget>
<property name="maximum"> </item>
<number>15</number> <item row="4" column="0" colspan="2">
</property> <widget class="QLabel" name="label_IFshift">
</widget> <property name="text">
<widget class="QCheckBox" name="checkBox_NAR"> <string>IF-Shift</string>
<property name="geometry"> </property>
<rect> <property name="buddy">
<x>10</x> <cstring>horizontalSlider_IFshift</cstring>
<y>120</y> </property>
<width>61</width> </widget>
<height>22</height> </item>
</rect> <item row="4" column="2">
</property> <widget class="QLabel" name="label_IFshiftValue">
<property name="toolTip"> <property name="enabled">
<string>BW Narrow</string> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>NAR</string> <string>0</string>
</property> </property>
</widget> <property name="alignment">
<widget class="QSlider" name="horizontalSlider_IFshift"> <set>Qt::AlignCenter</set>
<property name="geometry"> </property>
<rect> </widget>
<x>10</x> </item>
<y>170</y> <item row="5" column="0" colspan="3">
<width>101</width> <widget class="QSlider" name="horizontalSlider_IFshift">
<height>18</height> <property name="minimum">
</rect> <number>-1200</number>
</property> </property>
<property name="minimum"> <property name="maximum">
<number>-1200</number> <number>1200</number>
</property> </property>
<property name="maximum"> <property name="singleStep">
<number>1200</number> <number>10</number>
</property> </property>
<property name="singleStep"> <property name="pageStep">
<number>10</number> <number>100</number>
</property> </property>
<property name="pageStep"> <property name="tracking">
<number>100</number> <bool>false</bool>
</property> </property>
<property name="tracking"> <property name="orientation">
<bool>false</bool> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="orientation"> </widget>
<enum>Qt::Horizontal</enum> </item>
</property> </layout>
</widget>
<widget class="QLabel" name="label_IFshift">
<property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<width>55</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>IF-Shift</string>
</property>
<property name="buddy">
<cstring>horizontalSlider_IFshift</cstring>
</property>
</widget>
<widget class="QLabel" name="label_IFshiftValue">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>70</x>
<y>150</y>
<width>41</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</widget> </widget>
<widget class="QFrame" name="frame_2"> <widget class="QFrame" name="frame_2">
<property name="geometry"> <property name="geometry">
@ -1401,6 +1365,9 @@
</widget> </widget>
</widget> </widget>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>280</x> <x>280</x>
@ -1410,7 +1377,7 @@
</rect> </rect>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="tab_clar"> <widget class="QWidget" name="tab_clar">
<property name="autoFillBackground"> <property name="autoFillBackground">
@ -1660,6 +1627,115 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_mic">
<property name="enabled">
<bool>false</bool>
</property>
<property name="accessibleName">
<string/>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<attribute name="title">
<string>MIC</string>
</attribute>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>13</x>
<y>10</y>
<width>291</width>
<height>81</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="label_micGain">
<property name="text">
<string>Gain</string>
</property>
<property name="buddy">
<cstring>horizontalSlider_micGain</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSlider" name="horizontalSlider_micGain">
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_micGainLevel">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="checkBox_micCompressor">
<property name="text">
<string>Comp</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_micMonitor">
<property name="text">
<string>Monitor</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSlider" name="horizontalSlider_micMonitor">
<property name="maximum">
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="label_micMonitorLevel">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>0</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QCheckBox" name="checkBox_micMonitor">
<property name="text">
<string>Mon</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget> </widget>
<zorder>frame_2</zorder> <zorder>frame_2</zorder>
<zorder>frame</zorder> <zorder>frame</zorder>
@ -1692,10 +1768,11 @@
</property> </property>
<addaction name="action_CatRadioHomepage"/> <addaction name="action_CatRadioHomepage"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="action_RadioInfo"/>
<addaction name="separator"/>
<addaction name="action_AboutCatRadio"/> <addaction name="action_AboutCatRadio"/>
<addaction name="action_AboutHamLib"/> <addaction name="action_AboutHamLib"/>
<addaction name="action_AboutQT"/> <addaction name="action_AboutQT"/>
<addaction name="separator"/>
</widget> </widget>
<addaction name="menu_Config"/> <addaction name="menu_Config"/>
<addaction name="menu_Help"/> <addaction name="menu_Help"/>
@ -1731,6 +1808,11 @@
<string>CatRadio homepage</string> <string>CatRadio homepage</string>
</property> </property>
</action> </action>
<action name="action_RadioInfo">
<property name="text">
<string>Radio Info</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

Wyświetl plik

@ -31,29 +31,57 @@ extern rigCommand rigCap;
void set_band (int band) void set_band (int band)
{ {
freq_t freq; if (rigCap.bandChange==0)
switch (band)
{ {
case 160: freq = 1840000; break; freq_t freq;
case 80: freq = 3600000; break;
case 60: freq = 5355000; break;
case 40: freq = 7100000; break;
case 30: freq = 10130000; break;
case 20: freq = 14100000; break;
case 17: freq = 18120000; break;
case 15: freq = 21150000; break;
case 12: freq = 24940000; break;
case 10: freq = 28320000; break;
case 6: freq = 50150000; break;
case 2: freq = 144300000; break;
case 70: freq = 432200000; break;
default: freq = rigSet.freqMain; break;
}
rigSet.freqMain = freq; switch (band)
rigCmd.freqMain = 1; {
rigCmd.bandChange = 1; case 160: freq = 1840000; break;
case 80: freq = 3600000; break;
case 60: freq = 5355000; break;
case 40: freq = 7100000; break;
case 30: freq = 10130000; break;
case 20: freq = 14100000; break;
case 17: freq = 18120000; break;
case 15: freq = 21150000; break;
case 12: freq = 24940000; break;
case 10: freq = 28320000; break;
case 6: freq = 50150000; break;
case 2: freq = 144300000; break;
case 70: freq = 432200000; break;
case 1: freq = 5000000; break; //General
default: freq = rigSet.freqMain; break;
}
rigSet.freqMain = freq;
rigCmd.freqMain = 1;
}
else
{
int bandt;
switch (band)
{
case 160: bandt = RIG_BAND_160M; break;
case 80: bandt = RIG_BAND_80M; break;
case 60: bandt = RIG_BAND_60M; break;
case 40: bandt = RIG_BAND_40M; break;
case 30: bandt = RIG_BAND_30M; break;
case 20: bandt = RIG_BAND_20M; break;
case 17: bandt = RIG_BAND_17M; break;
case 15: bandt = RIG_BAND_15M; break;
case 12: bandt = RIG_BAND_12M; break;
case 10: bandt = RIG_BAND_10M; break;
case 6: bandt = RIG_BAND_6M; break;
case 2: bandt = RIG_BAND_144MHZ; break;
case 70: bandt = RIG_BAND_430MHZ; break;
case 1: bandt = RIG_BAND_GEN; break;
default: bandt = RIG_BAND_20M; break;
}
rigSet.band = bandt;
rigCmd.bandChange = 1;
}
} }
void quick_split () void quick_split ()

Wyświetl plik

@ -77,6 +77,10 @@ int RigDaemon::rigConnect()
//myport.type.rig = RIG_PORT_SERIAL; //myport.type.rig = RIG_PORT_SERIAL;
strncpy(my_rig->state.rigport.pathname, rigCom.rigPort.toLatin1(), HAMLIB_FILPATHLEN - 1); strncpy(my_rig->state.rigport.pathname, rigCom.rigPort.toLatin1(), HAMLIB_FILPATHLEN - 1);
my_rig->state.rigport.parm.serial.rate = rigCom.serialSpeed; my_rig->state.rigport.parm.serial.rate = rigCom.serialSpeed;
//qDebug() << my_rig->state.rigport.parm.serial.stop_bits << my_rig->caps->serial_stop_bits;
//qDebug() << my_rig->state.rigport.parm.serial.parity << my_rig->caps->serial_parity;
//qDebug() << my_rig->state.rigport.parm.serial.handshake << my_rig->caps->serial_handshake;
if (rigCom.civAddr) //CI-V address Icom if (rigCom.civAddr) //CI-V address Icom
{ {
std::string civaddrS = std::to_string(rigCom.civAddr); //Convert int to string std::string civaddrS = std::to_string(rigCom.civAddr); //Convert int to string
@ -301,8 +305,17 @@ void RigDaemon::rigUpdate()
//* Band change //* Band change
if (rigCmd.bandChange) if (rigCmd.bandChange)
{ {
if (rigCap.bandChange)
{
retvalue.i = rigSet.band;
retcode = rig_set_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_BAND_SELECT, retvalue);
if (retcode == RIG_OK) rigGet.band = rigSet.band;
qDebug() << retcode << rigCap.bandChange << rigSet.band;
}
rigCmd.bandChange = 0;
commandPriority = 0; commandPriority = 0;
guiCmd.bwidthList = 1; //guiCmd.bwidthList = 1;
} }
//* Tune //* Tune

Wyświetl plik

@ -40,6 +40,7 @@ typedef struct {
typedef struct { typedef struct {
powerstat_t onoff; //on/off status powerstat_t onoff; //on/off status
freq_t freqMain, freqSub; //Frequency (Hz) freq_t freqMain, freqSub; //Frequency (Hz)
int band; //Band
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
@ -74,6 +75,8 @@ typedef struct {
shortfreq_t rptOffset; //Repeater offset (Hz) shortfreq_t rptOffset; //Repeater offset (Hz)
int toneType; //0 none, 1 burst 1750, 2 CTCSS, 3 CTCSS SQL, 4 DCS 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
int micComp, micMon; //Flag MIC Compressor, MIC Monitor
float micGain, micMonLevel; //Level MIC Gain, MIC Monitor
} rigSettings; } rigSettings;
typedef struct { typedef struct {
@ -108,4 +111,6 @@ typedef struct {
int clar; int clar;
int rptShift, rptOffset; int rptShift, rptOffset;
int tone; int tone;
int micComp, micMon;
int micGain, micMonLevel;
} rigCommand; } rigCommand;