Porównaj commity

...

3 Commity

Autor SHA1 Wiadomość Data
PianetaRadio a2fda861ce
GUI
Combo box and Spin box improvement
2023-04-27 20:24:22 +02:00
PianetaRadio c17bb04fd7
Copyright
date updated
2023-04-27 20:12:32 +02:00
PianetaRadio c2ea381757
Disconnect
Add meters reset and PTT status check
2023-04-27 20:11:48 +02:00
1 zmienionych plików z 68 dodań i 26 usunięć

Wyświetl plik

@ -759,11 +759,23 @@ void MainWindow::on_pushButton_Connect_toggled(bool checked)
}
else if (rigCom.connected) //Button unchecked
{
rigCom.connected = 0;
if(timer->isActive()) timer->stop();
rig_close(my_rig); //Close the communication to the rig
connectMsg = "Disconnected";
//rig_cleanup(my_rig); //Release rig handle and free associated memory
if (rigSet.ptt == RIG_PTT_OFF) //Disconnect only if PTT off
{
rigCom.connected = 0;
if(timer->isActive()) timer->stop();
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);
@ -1195,44 +1207,65 @@ void MainWindow::on_vfoDisplaySubValueChanged(int value)
void MainWindow::on_comboBox_Mode_activated(int index)
{
rigSet.mode = rig_parse_mode(ui->comboBox_Mode->itemText(index).toLatin1());
rigCmd.mode = 1;
if (!rigCmd.mode)
{
rigSet.mode = rig_parse_mode(ui->comboBox_Mode->itemText(index).toLatin1());
rigCmd.mode = 1;
}
}
void MainWindow::on_comboBox_ModeSub_activated(int index)
{
rigSet.modeSub = rig_parse_mode(ui->comboBox_ModeSub->itemText(index).toLatin1());
rigCmd.modeSub = 1;
if (!rigCmd.modeSub)
{
rigSet.modeSub = rig_parse_mode(ui->comboBox_ModeSub->itemText(index).toLatin1());
rigCmd.modeSub = 1;
}
}
void MainWindow::on_comboBox_BW_activated(int index)
{
rigSet.bwidth = ui->comboBox_BW->itemText(index).toInt();
rigCmd.bwidth = 1;
if (!rigCmd.bwidth)
{
rigSet.bwidth = ui->comboBox_BW->itemText(index).toInt();
rigCmd.bwidth = 1;
}
}
void MainWindow::on_comboBox_AGC_activated(int index)
{
rigSet.agc = levelagcstr(ui->comboBox_AGC->itemText(index));
rigCmd.agc = 1;
if (!rigCmd.agc)
{
rigSet.agc = levelagcstr(ui->comboBox_AGC->itemText(index));
rigCmd.agc = 1;
}
}
void MainWindow::on_comboBox_Att_activated(int index)
{
rigSet.att = ui->comboBox_Att->itemText(index).toInt();
rigCmd.att = 1;
if (!rigCmd.att)
{
rigSet.att = ui->comboBox_Att->itemText(index).toInt();
rigCmd.att = 1;
}
}
void MainWindow::on_comboBox_Preamp_activated(int index)
{
rigSet.pre = ui->comboBox_Preamp->itemText(index).toInt();
rigCmd.pre = 1;
if (!rigCmd.pre)
{
rigSet.pre = ui->comboBox_Preamp->itemText(index).toInt();
rigCmd.pre = 1;
}
}
void MainWindow::on_comboBox_Ant_activated(int index)
{
rigSet.ant = antstr(ui->comboBox_Ant->itemText(index));
rigCmd.ant = 1;
if (!rigCmd.ant)
{
rigSet.ant = antstr(ui->comboBox_Ant->itemText(index));
rigCmd.ant = 1;
}
}
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)
{
rigSet.noiseReductionLevel = arg1;
rigCmd.noiseReductionLevel = 1;
if (!rigCmd.noiseReductionLevel)
{
rigSet.noiseReductionLevel = arg1;
rigCmd.noiseReductionLevel = 1;
}
}
void MainWindow::on_spinBox_WPM_valueChanged(int arg1)
{
rigSet.wpm = arg1;
rigCmd.wpm = 1;
if (!rigCmd.wpm)
{
rigSet.wpm = arg1;
rigCmd.wpm = 1;
}
}
void MainWindow::on_spinBox_RPToffset_valueChanged(int arg1)
{
rigSet.rptOffset = arg1*1000;
rigCmd.rptOffset = 1;
if (!rigCmd.rptOffset)
{
rigSet.rptOffset = arg1*1000;
rigCmd.rptOffset = 1;
}
}
//***** Slider *****
@ -1528,7 +1570,7 @@ void MainWindow::on_action_AboutCatRadio_triggered()
msgBox.setTextFormat(Qt::RichText);
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.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>"
"<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/>"