kopia lustrzana https://github.com/PianetaRadio/CatRadio
Porównaj commity
2 Commity
f4ea500269
...
b8bead15f3
Autor | SHA1 | Data |
---|---|---|
PianetaRadio | b8bead15f3 | |
PianetaRadio | 69d3995653 |
|
@ -8,6 +8,7 @@ CatRadio
|
|||
+ High SWR indicator
|
||||
+ Meter peak hold indicator
|
||||
+ Debug mode
|
||||
* Updated serial port configuration
|
||||
* Bug fix: NR level
|
||||
* Bug fix: Repeater shift
|
||||
* Bug fix: Power status
|
||||
|
|
108
dialogconfig.cpp
108
dialogconfig.cpp
|
@ -105,6 +105,7 @@ DialogConfig::DialogConfig(QWidget *parent) :
|
|||
ui->comboBox_comPort->setCurrentText(rigCom.rigPort);
|
||||
ui->comboBox_serialSpeed->setCurrentText(QString::number(rigCom.serialSpeed));
|
||||
if (rigCom.civAddr) ui->lineEdit_civAddr->setText(QString::number(rigCom.civAddr,16));
|
||||
setDialogSerialConfig(rigCom.serialDataBits, rigCom.serialParity, rigCom.serialStopBits, rigCom.serialHandshake);
|
||||
}
|
||||
ui->spinBox_RefreshRate->setValue(rigCom.rigRefresh);
|
||||
ui->checkBox_fullPoll->setChecked(rigCom.fullPoll);
|
||||
|
@ -117,6 +118,63 @@ DialogConfig::~DialogConfig()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
int DialogConfig::findRigModel(QString rigModel)
|
||||
{
|
||||
QRegularExpression regexp("[0-9]+");
|
||||
QRegularExpressionMatch rigNumber = regexp.match(rigModel);
|
||||
return rigNumber.captured(0).toInt();
|
||||
}
|
||||
|
||||
|
||||
void DialogConfig::setDialogSerialConfig(int dataBits, int parity, int stopBits, int handshake)
|
||||
{
|
||||
switch (dataBits)
|
||||
{
|
||||
case 7: ui->radioButton_dataBits7->setChecked(true); break;
|
||||
case 8: ui->radioButton_dataBits8->setChecked(true); break;
|
||||
}
|
||||
|
||||
switch (parity)
|
||||
{
|
||||
case 0: ui->radioButton_parityNone->setChecked(true); break;
|
||||
case 1: ui->radioButton_parityOdd->setChecked(true); break;
|
||||
case 2: ui->radioButton_parityEven->setChecked(true); break;
|
||||
}
|
||||
|
||||
switch (stopBits)
|
||||
{
|
||||
case 1: ui->radioButton_stopBits1->setChecked(true); break;
|
||||
case 2: ui->radioButton_stopBits2->setChecked(true); break;
|
||||
}
|
||||
|
||||
switch (handshake)
|
||||
{
|
||||
case 0: ui->radioButton_handshakeNone->setChecked(true); break;
|
||||
case 1: ui->radioButton_handshakeXonXoff->setChecked(true); break;
|
||||
case 2: ui->radioButton_handshakeHardware->setChecked(true); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DialogConfig::setRigSerialConfigFromDialog()
|
||||
{
|
||||
if (ui->radioButton_dataBits7->isChecked()) rigCom.serialDataBits = 7;
|
||||
else rigCom.serialDataBits = 8;
|
||||
|
||||
if (ui->radioButton_parityOdd->isChecked()) rigCom.serialParity = RIG_PARITY_ODD;
|
||||
else if (ui->radioButton_parityEven->isChecked()) rigCom.serialParity = RIG_PARITY_EVEN;
|
||||
else rigCom.serialParity = RIG_PARITY_NONE;
|
||||
|
||||
if (ui->radioButton_stopBits1->isChecked()) rigCom.serialStopBits = 1;
|
||||
else rigCom.serialStopBits = 2;
|
||||
|
||||
if (ui->radioButton_handshakeXonXoff->isChecked()) rigCom.serialHandshake = RIG_HANDSHAKE_XONXOFF;
|
||||
else if (ui->radioButton_handshakeHardware->isChecked()) rigCom.serialHandshake = RIG_HANDSHAKE_HARDWARE;
|
||||
else rigCom.serialHandshake = RIG_HANDSHAKE_NONE;
|
||||
}
|
||||
|
||||
|
||||
void DialogConfig::on_buttonBox_accepted()
|
||||
{
|
||||
bool civAddrConv;
|
||||
|
@ -134,9 +192,10 @@ void DialogConfig::on_buttonBox_accepted()
|
|||
else
|
||||
{
|
||||
QString rigModel = ui->comboBox_rigModel->currentText();
|
||||
QRegularExpression regexp("[0-9]+");
|
||||
QRegularExpressionMatch rigNumber = regexp.match(rigModel);
|
||||
rigCom.rigModel = rigNumber.captured(0).toInt();
|
||||
//QRegularExpression regexp("[0-9]+");
|
||||
//QRegularExpressionMatch rigNumber = regexp.match(rigModel);
|
||||
//rigCom.rigModel = rigNumber.captured(0).toInt();
|
||||
rigCom.rigModel = findRigModel(rigModel);
|
||||
|
||||
if (ui->checkBox_netRigctl->isChecked()) //TCP port
|
||||
{
|
||||
|
@ -159,6 +218,7 @@ void DialogConfig::on_buttonBox_accepted()
|
|||
rigCom.rigPort = ui->comboBox_comPort->currentText();
|
||||
rigCom.serialSpeed = ui->comboBox_serialSpeed->currentText().toInt();
|
||||
rigCom.civAddr = ui->lineEdit_civAddr->text().toInt(&civAddrConv,16);
|
||||
setRigSerialConfigFromDialog();
|
||||
|
||||
if (rigCom.rigPort == "" && rigCom.rigModel != 1 && rigCom.rigModel != 6)
|
||||
{
|
||||
|
@ -183,6 +243,10 @@ void DialogConfig::on_buttonBox_accepted()
|
|||
configFile.setValue("rigPort", rigCom.rigPort);
|
||||
configFile.setValue("serialSpeed", ui->comboBox_serialSpeed->currentText());
|
||||
configFile.setValue("civAddress", ui->lineEdit_civAddr->text().toInt(&civAddrConv,16));
|
||||
configFile.setValue("serialDataBits", rigCom.serialDataBits);
|
||||
configFile.setValue("serialParity", rigCom.serialParity);
|
||||
configFile.setValue("serialStopBits", rigCom.serialStopBits);
|
||||
configFile.setValue("serialHandshake", rigCom.serialHandshake);
|
||||
configFile.setValue("netRigctl", ui->checkBox_netRigctl->isChecked());
|
||||
configFile.setValue("rigRefresh", ui->spinBox_RefreshRate->value());
|
||||
configFile.setValue("fullPolling", ui->checkBox_fullPoll->isChecked());
|
||||
|
@ -232,11 +296,43 @@ void DialogConfig::on_checkBox_netRigctl_toggled(bool checked)
|
|||
|
||||
void DialogConfig::on_comboBox_rigModel_currentIndexChanged(int index)
|
||||
{
|
||||
if (index == 2 || index == 3 || index == 4)
|
||||
int currentRig = 0;
|
||||
RIG *rig;
|
||||
|
||||
if (index)
|
||||
{
|
||||
ui->checkBox_netRigctl->setChecked(true);
|
||||
ui->tabWidget_Config->setCurrentIndex(1);
|
||||
QString rigModel = ui->comboBox_rigModel->currentText();
|
||||
currentRig = findRigModel(rigModel);
|
||||
}
|
||||
|
||||
if (currentRig)
|
||||
{
|
||||
rig = rig_init(currentRig);
|
||||
if (rig->caps->port_type == RIG_PORT_SERIAL)
|
||||
{
|
||||
ui->checkBox_netRigctl->setChecked(false);
|
||||
ui->tabWidget_Config->setCurrentIndex(0);
|
||||
setDialogSerialConfig(rig->caps->serial_data_bits, rig->caps->serial_parity, rig->caps->serial_stop_bits, rig->caps->serial_handshake);
|
||||
//qDebug() << rig->caps->serial_data_bits << rig->caps->serial_parity << rig->caps->serial_stop_bits << rig->caps->serial_handshake;
|
||||
}
|
||||
else if (rig->caps->port_type == RIG_PORT_NETWORK)
|
||||
{
|
||||
ui->checkBox_netRigctl->setChecked(true);
|
||||
ui->tabWidget_Config->setCurrentIndex(1);
|
||||
}
|
||||
else if (rig->caps->port_type == RIG_PORT_NONE)
|
||||
{
|
||||
ui->checkBox_netRigctl->setChecked(false);
|
||||
ui->tabWidget_Config->setCurrentIndex(0);
|
||||
ui->comboBox_comPort->clear();
|
||||
}
|
||||
}
|
||||
|
||||
//if (index == 2 || index == 3 || index == 4)
|
||||
//{
|
||||
// ui->checkBox_netRigctl->setChecked(true);
|
||||
// ui->tabWidget_Config->setCurrentIndex(1);
|
||||
//}
|
||||
}
|
||||
|
||||
void DialogConfig::on_comboBox_comPort_currentIndexChanged(int index)
|
||||
|
|
|
@ -45,6 +45,10 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::DialogConfig *ui;
|
||||
|
||||
int findRigModel(QString rigModel); //Find hamlib rig model from the rig selected in the comboBox_rigModel
|
||||
void setDialogSerialConfig(int dataBits, int parity, int stopBits, int handshake); //Set the serial port configuration on the dialog
|
||||
void setRigSerialConfigFromDialog(); //Set the rigConf serial config from dialog serial settings
|
||||
};
|
||||
|
||||
int printRigList(const struct rig_caps *rigCaps, void *data); //Retrives rig list from Hamlib and write to file
|
||||
|
|
162
dialogconfig.ui
162
dialogconfig.ui
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>390</width>
|
||||
<height>378</height>
|
||||
<height>700</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -118,6 +118,124 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_serialDataBits">
|
||||
<property name="title">
|
||||
<string>Data Bits</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_dataBits7">
|
||||
<property name="text">
|
||||
<string>7</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_dataBits8">
|
||||
<property name="text">
|
||||
<string>8</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_serialStopBits">
|
||||
<property name="title">
|
||||
<string>Stop Bits</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_stopBits1">
|
||||
<property name="text">
|
||||
<string>1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="radioButton_stopBits2">
|
||||
<property name="text">
|
||||
<string>2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_serialHandshake">
|
||||
<property name="title">
|
||||
<string>Handshake</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="radioButton_handshakeXonXoff">
|
||||
<property name="text">
|
||||
<string>XON/XOFF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="radioButton_handshakeHardware">
|
||||
<property name="text">
|
||||
<string>Hardware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="radioButton_handshakeNone">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_serialParity">
|
||||
<property name="title">
|
||||
<string>Parity</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="2" column="0">
|
||||
<widget class="QRadioButton" name="radioButton_parityOdd">
|
||||
<property name="text">
|
||||
<string>Odd</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QRadioButton" name="radioButton_parityEven">
|
||||
<property name="text">
|
||||
<string>Even</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="radioButton_parityNone">
|
||||
<property name="text">
|
||||
<string>None</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_tcp">
|
||||
|
@ -215,16 +333,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_autoPowerOn">
|
||||
<property name="toolTip">
|
||||
<string>Auto power-on on startup</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto power ON</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_autoConnect">
|
||||
<property name="toolTip">
|
||||
|
@ -235,6 +343,16 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="checkBox_autoPowerOn">
|
||||
<property name="toolTip">
|
||||
<string>Auto power-on on startup</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto power ON</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -251,11 +369,25 @@
|
|||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>comboBox_rigModel</tabstop>
|
||||
<tabstop>tabWidget_Config</tabstop>
|
||||
<tabstop>comboBox_comPort</tabstop>
|
||||
<tabstop>comboBox_serialSpeed</tabstop>
|
||||
<tabstop>lineEdit_civAddr</tabstop>
|
||||
<tabstop>radioButton_dataBits7</tabstop>
|
||||
<tabstop>radioButton_dataBits8</tabstop>
|
||||
<tabstop>radioButton_parityNone</tabstop>
|
||||
<tabstop>radioButton_parityOdd</tabstop>
|
||||
<tabstop>radioButton_parityEven</tabstop>
|
||||
<tabstop>radioButton_stopBits1</tabstop>
|
||||
<tabstop>radioButton_stopBits2</tabstop>
|
||||
<tabstop>radioButton_handshakeNone</tabstop>
|
||||
<tabstop>radioButton_handshakeXonXoff</tabstop>
|
||||
<tabstop>radioButton_handshakeHardware</tabstop>
|
||||
<tabstop>spinBox_RefreshRate</tabstop>
|
||||
<tabstop>checkBox_fullPoll</tabstop>
|
||||
<tabstop>checkBox_autoConnect</tabstop>
|
||||
<tabstop>checkBox_autoPowerOn</tabstop>
|
||||
<tabstop>checkBox_netRigctl</tabstop>
|
||||
<tabstop>lineEdit_ip</tabstop>
|
||||
</tabstops>
|
||||
|
@ -268,8 +400,8 @@
|
|||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>259</x>
|
||||
<y>324</y>
|
||||
<x>270</x>
|
||||
<y>688</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
|
@ -284,8 +416,8 @@
|
|||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>327</x>
|
||||
<y>324</y>
|
||||
<x>338</x>
|
||||
<y>688</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
|
|
|
@ -106,10 +106,17 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
|
||||
//* Load settings from catradio.ini
|
||||
QSettings configFile(QString("catradio.ini"), QSettings::IniFormat);
|
||||
rigCom.rigModel = configFile.value("rigModel", 0).toInt();
|
||||
rigCom.rigModel = configFile.value("rigModel", 0).toUInt();
|
||||
rigCom.rigPort = configFile.value("rigPort").toString();
|
||||
rigCom.serialSpeed = configFile.value("serialSpeed", 9600).toInt();
|
||||
rigCom.serialSpeed = configFile.value("serialSpeed", 9600).toUInt();
|
||||
rigCom.civAddr = configFile.value("civAddress", 0).toInt();
|
||||
if (configFile.contains("serialDataBits")) //For backward compatibility with CatRadio v.< 1.4.0
|
||||
{
|
||||
rigCom.serialDataBits = configFile.value("serialDataBits", 8).toUInt();
|
||||
rigCom.serialParity = configFile.value("serialParity", 0).toUInt();
|
||||
rigCom.serialStopBits = configFile.value("serialStopBits", 2).toUInt();
|
||||
rigCom.serialHandshake = configFile.value("serialHandshake", 0).toUInt();
|
||||
}
|
||||
rigCom.netRigctl = configFile.value("netRigctl", false).toBool();
|
||||
rigCom.rigRefresh = configFile.value("rigRefresh", 100).toInt();
|
||||
rigCom.fullPoll = configFile.value("fullPolling", true).toBool();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
** This file is part of the CatRadio project.
|
||||
** Copyright 2022 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
** Copyright 2022-2024 Gianfranco Sordetti IZ8EWD <iz8ewd@pianetaradio.it>.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -61,19 +61,23 @@ RIG *RigDaemon::rigConnect(int *retcode)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (rigCom.rigModel == 2) //Rigctld
|
||||
//if (rigCom.rigModel == 2) //Rigctld
|
||||
if (my_rig->state.port_type == RIG_PORT_NETWORK)
|
||||
{
|
||||
//myport.type.rig = RIG_PORT_NETWORK;
|
||||
strncpy(my_rig->state.rigport.pathname, rigCom.rigPort.toLatin1(), HAMLIB_FILPATHLEN - 1);
|
||||
}
|
||||
else
|
||||
else //RIG_PORT_SERIAL
|
||||
{
|
||||
//myport.type.rig = RIG_PORT_SERIAL;
|
||||
strncpy(my_rig->state.rigport.pathname, rigCom.rigPort.toLatin1(), HAMLIB_FILPATHLEN - 1);
|
||||
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;
|
||||
my_rig->state.rigport.parm.serial.data_bits = rigCom.serialDataBits;
|
||||
if (rigCom.serialParity == 1) my_rig->state.rigport.parm.serial.parity = RIG_PARITY_ODD;
|
||||
else if (rigCom.serialParity == 2) my_rig->state.rigport.parm.serial.parity = RIG_PARITY_EVEN;
|
||||
else my_rig->state.rigport.parm.serial.parity = RIG_PARITY_NONE;
|
||||
my_rig->state.rigport.parm.serial.stop_bits = rigCom.serialStopBits;
|
||||
if (rigCom.serialHandshake == 1) my_rig->state.rigport.parm.serial.handshake = RIG_HANDSHAKE_XONXOFF;
|
||||
else if (rigCom.serialHandshake == 2) my_rig->state.rigport.parm.serial.handshake = RIG_HANDSHAKE_HARDWARE;
|
||||
else my_rig->state.rigport.parm.serial.handshake = RIG_HANDSHAKE_NONE;
|
||||
|
||||
if (rigCom.civAddr) //CI-V address Icom
|
||||
{
|
||||
|
@ -227,6 +231,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (rigCmd.vfoXchange)
|
||||
{
|
||||
if (my_rig->state.vfo_ops & RIG_OP_XCHG)
|
||||
//if (my_rig->caps->vfo_ops & RIG_OP_XCHG)
|
||||
{
|
||||
mode_t tempMode = rigGet.mode;
|
||||
retcode = rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_XCHG);
|
||||
|
@ -239,6 +244,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
}
|
||||
|
||||
else if (my_rig->state.vfo_ops & RIG_OP_TOGGLE)
|
||||
//else if (my_rig->caps->vfo_ops & RIG_OP_TOGGLE)
|
||||
{
|
||||
freq_t tempFreq = rigGet.freqMain;
|
||||
mode_t tempMode = rigGet.mode;
|
||||
|
@ -258,6 +264,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (rigCmd.vfoCopy)
|
||||
{
|
||||
if (my_rig->state.vfo_ops & RIG_OP_CPY)
|
||||
//if (my_rig->caps->vfo_ops & RIG_OP_CPY)
|
||||
{
|
||||
retcode = rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_CPY);
|
||||
if (retcode == RIG_OK)
|
||||
|
@ -287,6 +294,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (rigCmd.bandUp)
|
||||
{
|
||||
if (my_rig->state.vfo_ops & RIG_OP_BAND_UP)
|
||||
//if (my_rig->caps->vfo_ops & RIG_OP_BAND_UP)
|
||||
{
|
||||
retcode = rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_BAND_UP);
|
||||
if (retcode == RIG_OK) indexCmd = 21;
|
||||
|
@ -298,6 +306,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (rigCmd.bandDown)
|
||||
{
|
||||
if (my_rig->state.vfo_ops & RIG_OP_BAND_DOWN)
|
||||
//if (my_rig->caps->vfo_ops & RIG_OP_BAND_DOWN)
|
||||
{
|
||||
retcode = rig_vfo_op(my_rig, RIG_VFO_CURR, RIG_OP_BAND_DOWN);
|
||||
if (retcode == RIG_OK) indexCmd = 21;
|
||||
|
@ -325,6 +334,7 @@ void RigDaemon::rigUpdate(RIG *my_rig)
|
|||
if (rigCmd.tune)
|
||||
{
|
||||
if (my_rig->state.vfo_ops & RIG_OP_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;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,10 @@ typedef struct {
|
|||
unsigned rigModel; //Hamlib rig model
|
||||
QString rigPort; //COM port or IP address
|
||||
unsigned serialSpeed; //Serial port baud rate
|
||||
unsigned serialDataBits; //Serial port data bit
|
||||
unsigned serialParity; //Serial port parity (serial_parity_e RIG_PARITY_NONE = 0, RIG_PARITY_ODD, RIG_PARITY_EVEN)
|
||||
unsigned serialStopBits;
|
||||
unsigned serialHandshake; //Serial port handshake (serial_handshake_e RIG_HANDSHAKE_NONE = 0, RIG_HANDSHAKE_XONXOFF, RIG_HANDSHAKE_HARDWARE)
|
||||
int civAddr; //CI-V address (decimal, Icom radio)
|
||||
bool netRigctl; //TCP NET Rigctl
|
||||
unsigned rigRefresh; //GUI refresh interval (ms)
|
||||
|
|
Ładowanie…
Reference in New Issue