kopia lustrzana https://github.com/PianetaRadio/CatRadio
Porównaj commity
3 Commity
e91f5aae09
...
a2fda861ce
Autor | SHA1 | Data |
---|---|---|
PianetaRadio | a2fda861ce | |
PianetaRadio | c17bb04fd7 | |
PianetaRadio | c2ea381757 |
|
@ -759,11 +759,23 @@ void MainWindow::on_pushButton_Connect_toggled(bool checked)
|
||||||
}
|
}
|
||||||
else if (rigCom.connected) //Button unchecked
|
else if (rigCom.connected) //Button unchecked
|
||||||
{
|
{
|
||||||
rigCom.connected = 0;
|
if (rigSet.ptt == RIG_PTT_OFF) //Disconnect only if PTT off
|
||||||
if(timer->isActive()) timer->stop();
|
{
|
||||||
rig_close(my_rig); //Close the communication to the rig
|
rigCom.connected = 0;
|
||||||
connectMsg = "Disconnected";
|
if(timer->isActive()) timer->stop();
|
||||||
//rig_cleanup(my_rig); //Release rig handle and free associated memory
|
rig_close(my_rig); //Close the communication to the rig
|
||||||
|
connectMsg = "Disconnected";
|
||||||
|
//rig_cleanup(my_rig); //Release rig handle and free associated memory
|
||||||
|
|
||||||
|
//Reset meters
|
||||||
|
ui->progressBar_Smeter->setValue(-54);
|
||||||
|
setSubMeter();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui->pushButton_Connect->setChecked(false); //Uncheck the button
|
||||||
|
connectMsg = "Warning PTT on!";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->statusbar->showMessage(connectMsg);
|
ui->statusbar->showMessage(connectMsg);
|
||||||
|
@ -1195,44 +1207,65 @@ void MainWindow::on_vfoDisplaySubValueChanged(int value)
|
||||||
|
|
||||||
void MainWindow::on_comboBox_Mode_activated(int index)
|
void MainWindow::on_comboBox_Mode_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.mode = rig_parse_mode(ui->comboBox_Mode->itemText(index).toLatin1());
|
if (!rigCmd.mode)
|
||||||
rigCmd.mode = 1;
|
{
|
||||||
|
rigSet.mode = rig_parse_mode(ui->comboBox_Mode->itemText(index).toLatin1());
|
||||||
|
rigCmd.mode = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_ModeSub_activated(int index)
|
void MainWindow::on_comboBox_ModeSub_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.modeSub = rig_parse_mode(ui->comboBox_ModeSub->itemText(index).toLatin1());
|
if (!rigCmd.modeSub)
|
||||||
rigCmd.modeSub = 1;
|
{
|
||||||
|
rigSet.modeSub = rig_parse_mode(ui->comboBox_ModeSub->itemText(index).toLatin1());
|
||||||
|
rigCmd.modeSub = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_BW_activated(int index)
|
void MainWindow::on_comboBox_BW_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.bwidth = ui->comboBox_BW->itemText(index).toInt();
|
if (!rigCmd.bwidth)
|
||||||
rigCmd.bwidth = 1;
|
{
|
||||||
|
rigSet.bwidth = ui->comboBox_BW->itemText(index).toInt();
|
||||||
|
rigCmd.bwidth = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_AGC_activated(int index)
|
void MainWindow::on_comboBox_AGC_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.agc = levelagcstr(ui->comboBox_AGC->itemText(index));
|
if (!rigCmd.agc)
|
||||||
rigCmd.agc = 1;
|
{
|
||||||
|
rigSet.agc = levelagcstr(ui->comboBox_AGC->itemText(index));
|
||||||
|
rigCmd.agc = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_Att_activated(int index)
|
void MainWindow::on_comboBox_Att_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.att = ui->comboBox_Att->itemText(index).toInt();
|
if (!rigCmd.att)
|
||||||
rigCmd.att = 1;
|
{
|
||||||
|
rigSet.att = ui->comboBox_Att->itemText(index).toInt();
|
||||||
|
rigCmd.att = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_Preamp_activated(int index)
|
void MainWindow::on_comboBox_Preamp_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.pre = ui->comboBox_Preamp->itemText(index).toInt();
|
if (!rigCmd.pre)
|
||||||
rigCmd.pre = 1;
|
{
|
||||||
|
rigSet.pre = ui->comboBox_Preamp->itemText(index).toInt();
|
||||||
|
rigCmd.pre = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_Ant_activated(int index)
|
void MainWindow::on_comboBox_Ant_activated(int index)
|
||||||
{
|
{
|
||||||
rigSet.ant = antstr(ui->comboBox_Ant->itemText(index));
|
if (!rigCmd.ant)
|
||||||
rigCmd.ant = 1;
|
{
|
||||||
|
rigSet.ant = antstr(ui->comboBox_Ant->itemText(index));
|
||||||
|
rigCmd.ant = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_comboBox_Meter_activated(int index)
|
void MainWindow::on_comboBox_Meter_activated(int index)
|
||||||
|
@ -1273,20 +1306,29 @@ void MainWindow::on_comboBox_toneFreq_activated(int index)
|
||||||
|
|
||||||
void MainWindow::on_spinBox_NR_valueChanged(int arg1)
|
void MainWindow::on_spinBox_NR_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
rigSet.noiseReductionLevel = arg1;
|
if (!rigCmd.noiseReductionLevel)
|
||||||
rigCmd.noiseReductionLevel = 1;
|
{
|
||||||
|
rigSet.noiseReductionLevel = arg1;
|
||||||
|
rigCmd.noiseReductionLevel = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_spinBox_WPM_valueChanged(int arg1)
|
void MainWindow::on_spinBox_WPM_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
rigSet.wpm = arg1;
|
if (!rigCmd.wpm)
|
||||||
rigCmd.wpm = 1;
|
{
|
||||||
|
rigSet.wpm = arg1;
|
||||||
|
rigCmd.wpm = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_spinBox_RPToffset_valueChanged(int arg1)
|
void MainWindow::on_spinBox_RPToffset_valueChanged(int arg1)
|
||||||
{
|
{
|
||||||
rigSet.rptOffset = arg1*1000;
|
if (!rigCmd.rptOffset)
|
||||||
rigCmd.rptOffset = 1;
|
{
|
||||||
|
rigSet.rptOffset = arg1*1000;
|
||||||
|
rigCmd.rptOffset = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//***** Slider *****
|
//***** Slider *****
|
||||||
|
@ -1528,7 +1570,7 @@ void MainWindow::on_action_AboutCatRadio_triggered()
|
||||||
msgBox.setTextFormat(Qt::RichText);
|
msgBox.setTextFormat(Qt::RichText);
|
||||||
QString version = QString::number(VERSION_MAJ)+"."+QString::number(VERSION_MIN)+"."+QString::number(VERSION_MIC);
|
QString version = QString::number(VERSION_MAJ)+"."+QString::number(VERSION_MIN)+"."+QString::number(VERSION_MIC);
|
||||||
msgBox.setText("<b>CatRadio</b> <i>Radio control software</i><br/>version "+version+" "+RELEASE_DATE);
|
msgBox.setText("<b>CatRadio</b> <i>Radio control software</i><br/>version "+version+" "+RELEASE_DATE);
|
||||||
msgBox.setInformativeText("<p>Copyright (C) 2022 Gianfranco Sordetti IZ8EWD<br/>"
|
msgBox.setInformativeText("<p>Copyright (C) 2022-2023 Gianfranco Sordetti IZ8EWD<br/>"
|
||||||
"<a href='https://www.pianetaradio.it' style='color: #668fb8'>www.pianetaradio.it</a></p>"
|
"<a href='https://www.pianetaradio.it' style='color: #668fb8'>www.pianetaradio.it</a></p>"
|
||||||
"<p>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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>"
|
"<p>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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version.<br/>"
|
||||||
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<br/>"
|
"This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<br/>"
|
||||||
|
|
Ładowanie…
Reference in New Issue