From 41d79b0d05233b5a28cd77fc59c294f48677a3e6 Mon Sep 17 00:00:00 2001 From: PianetaRadio <78976006+PianetaRadio@users.noreply.github.com> Date: Tue, 29 Mar 2022 22:56:27 +0200 Subject: [PATCH] DCS code #3 --- CatRadio.pro.user | 2 +- mainwindow.cpp | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CatRadio.pro.user b/CatRadio.pro.user index 3b47cac..4dd1d90 100644 --- a/CatRadio.pro.user +++ b/CatRadio.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId diff --git a/mainwindow.cpp b/mainwindow.cpp index a7ac6e8..58fa165 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -344,7 +344,7 @@ void MainWindow::guiUpdate() case 4: ui->comboBox_Ant->addItem("ANT5"); break; //RIG_ANT_5 case 30: ui->comboBox_Ant->addItem("UNK"); break; //RIG_ANT_UNKNOWN case 31: ui->comboBox_Ant->addItem("CURR"); break; //RIG_ANT_CURR - default: ui->comboBox_Ant->addItem("UNK"); break; + default: ui->comboBox_Ant->addItem(""); break; } } } @@ -449,9 +449,17 @@ void MainWindow::guiUpdate() else ui->radioButton_RPTshiftSimplex->setChecked(true); //Simplex ui->spinBox_RPToffset->setValue(rigGet.rptOffset/1000); //Offset (kHz) - ui->comboBox_toneType->setCurrentIndex(rigGet.toneType); + switch (rigGet.toneType) + { + case (1): ui->comboBox_toneType->setCurrentText("1750Hz"); break; + case (2): ui->comboBox_toneType->setCurrentText("TONE"); break; + case (3): ui->comboBox_toneType->setCurrentText("TSQL"); break; + case (4): ui->comboBox_toneType->setCurrentText("DCS"); break; + default: ui->comboBox_toneType->setCurrentText(""); break; + } + if (rigGet.toneType == 2 || rigGet.toneType ==3) ui->comboBox_toneFreq->setCurrentText(QString::number(rigGet.tone/10.0)); //CTCSS - else if (rigGet.toneType == 4 || rigGet.toneType ==5) ui->comboBox_toneFreq->setCurrentText(QString::number(rigGet.tone)); //DCS + else if (rigGet.toneType == 4) ui->comboBox_toneFreq->setCurrentText(QString::number(rigGet.tone)); //DCS }