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