kopia lustrzana https://github.com/PianetaRadio/CatRadio
rodzic
ef30ab50eb
commit
7c4fad92a5
|
@ -3,6 +3,7 @@ CatRadio
|
||||||
(+ New, * Updated, - Removed)
|
(+ New, * Updated, - Removed)
|
||||||
|
|
||||||
1.4.0 - 2023-mm-dd
|
1.4.0 - 2023-mm-dd
|
||||||
|
+ Auto Power-on option
|
||||||
+ High SWR indicator
|
+ High SWR indicator
|
||||||
+ Meter peak hold indicator
|
+ Meter peak hold indicator
|
||||||
+ Debug mode
|
+ Debug mode
|
||||||
|
|
|
@ -108,6 +108,7 @@ DialogConfig::DialogConfig(QWidget *parent) :
|
||||||
}
|
}
|
||||||
ui->spinBox_RefreshRate->setValue(rigCom.rigRefresh);
|
ui->spinBox_RefreshRate->setValue(rigCom.rigRefresh);
|
||||||
ui->checkBox_fullPoll->setChecked(rigCom.fullPoll);
|
ui->checkBox_fullPoll->setChecked(rigCom.fullPoll);
|
||||||
|
ui->checkBox_autoPowerOn->setChecked(rigCom.autoPowerOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
DialogConfig::~DialogConfig()
|
DialogConfig::~DialogConfig()
|
||||||
|
@ -172,6 +173,7 @@ void DialogConfig::on_buttonBox_accepted()
|
||||||
|
|
||||||
rigCom.rigRefresh = ui->spinBox_RefreshRate->value();
|
rigCom.rigRefresh = ui->spinBox_RefreshRate->value();
|
||||||
rigCom.fullPoll = ui->checkBox_fullPoll->isChecked();
|
rigCom.fullPoll = ui->checkBox_fullPoll->isChecked();
|
||||||
|
rigCom.autoPowerOn = ui->checkBox_autoPowerOn->isChecked();
|
||||||
|
|
||||||
//* Save settings in catradio.ini
|
//* Save settings in catradio.ini
|
||||||
QSettings configFile(QString("catradio.ini"), QSettings::IniFormat);
|
QSettings configFile(QString("catradio.ini"), QSettings::IniFormat);
|
||||||
|
@ -182,6 +184,7 @@ void DialogConfig::on_buttonBox_accepted()
|
||||||
configFile.setValue("netRigctl", ui->checkBox_netRigctl->isChecked());
|
configFile.setValue("netRigctl", ui->checkBox_netRigctl->isChecked());
|
||||||
configFile.setValue("rigRefresh", ui->spinBox_RefreshRate->value());
|
configFile.setValue("rigRefresh", ui->spinBox_RefreshRate->value());
|
||||||
configFile.setValue("fullPolling", ui->checkBox_fullPoll->isChecked());
|
configFile.setValue("fullPolling", ui->checkBox_fullPoll->isChecked());
|
||||||
|
configFile.setValue("autoPowerOn", ui->checkBox_autoPowerOn->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
int printRigList(const struct rig_caps *rigCaps, void *data) //Load rig list from hamlib and save into file rig.lst
|
int printRigList(const struct rig_caps *rigCaps, void *data) //Load rig list from hamlib and save into file rig.lst
|
||||||
|
|
|
@ -158,8 +158,8 @@
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_RefreshRate">
|
<widget class="QLabel" name="label_RefreshRate">
|
||||||
|
@ -202,11 +202,21 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<widget class="QCheckBox" name="checkBox_fullPoll">
|
<widget class="QCheckBox" name="checkBox_fullPoll">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Full polling</string>
|
<string>Full polling</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_autoPowerOn">
|
||||||
|
<property name="text">
|
||||||
|
<string>Auto Power ON</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -230,7 +240,6 @@
|
||||||
<tabstop>comboBox_serialSpeed</tabstop>
|
<tabstop>comboBox_serialSpeed</tabstop>
|
||||||
<tabstop>lineEdit_civAddr</tabstop>
|
<tabstop>lineEdit_civAddr</tabstop>
|
||||||
<tabstop>spinBox_RefreshRate</tabstop>
|
<tabstop>spinBox_RefreshRate</tabstop>
|
||||||
<tabstop>checkBox_fullPoll</tabstop>
|
|
||||||
<tabstop>checkBox_netRigctl</tabstop>
|
<tabstop>checkBox_netRigctl</tabstop>
|
||||||
<tabstop>lineEdit_ip</tabstop>
|
<tabstop>lineEdit_ip</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
|
|
@ -110,6 +110,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
rigCom.netRigctl = configFile.value("netRigctl", false).toBool();
|
rigCom.netRigctl = configFile.value("netRigctl", false).toBool();
|
||||||
rigCom.rigRefresh = configFile.value("rigRefresh", 100).toInt();
|
rigCom.rigRefresh = configFile.value("rigRefresh", 100).toInt();
|
||||||
rigCom.fullPoll = configFile.value("fullPolling", true).toBool();
|
rigCom.fullPoll = configFile.value("fullPolling", true).toBool();
|
||||||
|
rigCom.autoPowerOn = configFile.value("autoPowerOn", false).toBool();
|
||||||
guiConf.vfoDisplayMode = configFile.value("vfoDisplayMode", 0).toInt();
|
guiConf.vfoDisplayMode = configFile.value("vfoDisplayMode", 0).toInt();
|
||||||
guiConf.darkTheme = configFile.value("darkTheme", false).toBool();
|
guiConf.darkTheme = configFile.value("darkTheme", false).toBool();
|
||||||
guiConf.peakHold = configFile.value("peakHold", true).toBool();
|
guiConf.peakHold = configFile.value("peakHold", true).toBool();
|
||||||
|
@ -768,8 +769,8 @@ void MainWindow::on_pushButton_Connect_toggled(bool checked)
|
||||||
if (rigCap.onoff == 0 || rigGet.onoff == RIG_POWER_ON || rigGet.onoff == RIG_POWER_UNKNOWN)
|
if (rigCap.onoff == 0 || rigGet.onoff == RIG_POWER_ON || rigGet.onoff == RIG_POWER_UNKNOWN)
|
||||||
{
|
{
|
||||||
freq_t retfreq;
|
freq_t retfreq;
|
||||||
retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &retfreq); //double check if rig is on by getting the current frequency
|
retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &retfreq); //double check if rig is on, by getting the current frequency
|
||||||
if (retcode == RIG_OK)
|
if (retcode==RIG_OK && retfreq!=0)
|
||||||
{
|
{
|
||||||
rigGet.onoff = RIG_POWER_ON; //force it for rigCap.onoff = 0 || rigGet.onoff = RIG_POWER_UNKNOWN
|
rigGet.onoff = RIG_POWER_ON; //force it for rigCap.onoff = 0 || rigGet.onoff = RIG_POWER_UNKNOWN
|
||||||
timer->start(rigCom.rigRefresh);
|
timer->start(rigCom.rigRefresh);
|
||||||
|
|
|
@ -66,7 +66,6 @@ RIG *RigDaemon::rigConnect(int *retcode)
|
||||||
//myport.type.rig = RIG_PORT_NETWORK;
|
//myport.type.rig = RIG_PORT_NETWORK;
|
||||||
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.vfo_opt = 1;
|
my_rig->state.vfo_opt = 1;
|
||||||
my_rig->state.auto_power_on = 1;
|
|
||||||
//strncpy(my_rig->state.rigport.pathname, RIG_FILE, HAMLIB_FILPATHLEN - 1);
|
//strncpy(my_rig->state.rigport.pathname, RIG_FILE, HAMLIB_FILPATHLEN - 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -86,6 +85,8 @@ RIG *RigDaemon::rigConnect(int *retcode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rigCom.autoPowerOn) my_rig->state.auto_power_on = 1;
|
||||||
|
|
||||||
*retcode = rig_open(my_rig);
|
*retcode = rig_open(my_rig);
|
||||||
|
|
||||||
if (*retcode != RIG_OK) return nullptr; //Rig not connected
|
if (*retcode != RIG_OK) return nullptr; //Rig not connected
|
||||||
|
|
|
@ -35,6 +35,7 @@ typedef struct {
|
||||||
unsigned rigRefresh; //GUI refresh interval (ms)
|
unsigned rigRefresh; //GUI refresh interval (ms)
|
||||||
int connected; //connected flag
|
int connected; //connected flag
|
||||||
bool fullPoll; //full polling flag
|
bool fullPoll; //full polling flag
|
||||||
|
bool autoPowerOn; //Auto Power ON flag
|
||||||
} rigConnect;
|
} rigConnect;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
Ładowanie…
Reference in New Issue