Added preference for automatic sideband.

half-duplex
Elliott Liggett 2023-01-18 23:17:28 -08:00
rodzic b99249692f
commit 71326cd385
5 zmienionych plików z 48 dodań i 11 usunięć

Wyświetl plik

@ -44,6 +44,7 @@ struct preferences {
// Controls:
bool enablePTT;
bool niceTS;
bool automaticSidebandSwitching = true;
// LAN:
bool enableLAN;

Wyświetl plik

@ -16,11 +16,11 @@ public:
{
return modeLSB;
}
if( (f.Hz >= 5000000) || (f.Hz < 5600000) )
if( (f.Hz >= 5000000) && (f.Hz < 5600000) )
{
return modeUSB;
}
if( (f.Hz >= 5600000) || (f.Hz < 10000000) )
if( (f.Hz >= 5600000) && (f.Hz < 10000000) )
{
return modeLSB;
}

Wyświetl plik

@ -1256,6 +1256,14 @@ void wfmain::setUIToPrefs()
ui->wfthemeCombo->setCurrentIndex(ui->wfthemeCombo->findData(prefs.wftheme));
colorMap->setGradient(static_cast<QCPColorGradient::GradientPreset>(prefs.wftheme));
ui->tuningFloorZerosChk->blockSignals(true);
ui->tuningFloorZerosChk->setChecked(prefs.niceTS);
ui->tuningFloorZerosChk->blockSignals(false);
ui->autoSSBchk->blockSignals(true);
ui->autoSSBchk->setChecked(prefs.automaticSidebandSwitching);
ui->autoSSBchk->blockSignals(false);
ui->useCIVasRigIDChk->blockSignals(true);
ui->useCIVasRigIDChk->setChecked(prefs.CIVisRadioModel);
ui->useCIVasRigIDChk->blockSignals(false);
@ -1780,7 +1788,7 @@ void wfmain::loadSettings()
prefs.enablePTT = settings->value("EnablePTT", defPrefs.enablePTT).toBool();
ui->pttEnableChk->setChecked(prefs.enablePTT);
prefs.niceTS = settings->value("NiceTS", defPrefs.niceTS).toBool();
prefs.automaticSidebandSwitching = settings->value("automaticSidebandSwitching", defPrefs.automaticSidebandSwitching).toBool();
settings->endGroup();
settings->beginGroup("LAN");
@ -2514,6 +2522,7 @@ void wfmain::saveSettings()
settings->beginGroup("Controls");
settings->setValue("EnablePTT", prefs.enablePTT);
settings->setValue("NiceTS", prefs.niceTS);
settings->setValue("automaticSidebandSwitching", prefs.automaticSidebandSwitching);
settings->endGroup();
settings->beginGroup("LAN");
@ -4903,9 +4912,11 @@ void wfmain::on_goFreqBtn_clicked()
m.reg = (unsigned char) m.mk;
m.filter = ui->modeFilterCombo->currentData().toInt();
qDebug(logSystem()) << "current mode: " << currentMode << "new mode:" << m.mk;
if(m.mk != currentMode)
if((m.mk != currentMode) && !usingDataMode && prefs.automaticSidebandSwitching)
{
issueCmd(cmdSetMode, m);
currentMode = m.mk;
}
f.MHzDouble = (float)f.Hz / 1E6;
freq = f;
@ -8194,3 +8205,8 @@ void wfmain::connectionHandler(bool connect)
}
}
}
void wfmain::on_autoSSBchk_clicked(bool checked)
{
prefs.automaticSidebandSwitching = checked;
}

Wyświetl plik

@ -714,6 +714,8 @@ private slots:
void on_pollTimeMsSpin_valueChanged(int arg1);
void on_autoSSBchk_clicked(bool checked);
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);

Wyświetl plik

@ -1798,6 +1798,7 @@
<font>
<family>DejaVu Sans Mono</family>
<pointsize>14</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
@ -2222,7 +2223,7 @@
<item>
<widget class="QStackedWidget" name="settingsStack">
<property name="currentIndex">
<number>6</number>
<number>1</number>
</property>
<widget class="QWidget" name="radioAccess">
<layout class="QVBoxLayout" name="verticalLayout_21">
@ -2914,6 +2915,22 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="autoSSBchk">
<property name="toolTip">
<string>When using SSB, automatically switch to the standard sideband for a given band.</string>
</property>
<property name="accessibleName">
<string>Auto SSB Switching</string>
</property>
<property name="accessibleDescription">
<string>When using SSB, automatically switch to the standard sideband for a given band.</string>
</property>
<property name="text">
<string>Auto SSB</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="clickDragTuningEnableChk">
<property name="text">
@ -3382,8 +3399,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>579</width>
<height>224</height>
<width>858</width>
<height>287</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@ -5128,7 +5145,7 @@
<x>10</x>
<y>470</y>
<width>801</width>
<height>22</height>
<height>24</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_451">
@ -5332,6 +5349,7 @@
<widget class="QPushButton" name="exitBtn">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
@ -5351,7 +5369,7 @@
<x>0</x>
<y>0</y>
<width>1082</width>
<height>22</height>
<height>21</height>
</rect>
</property>
</widget>
@ -5378,8 +5396,8 @@
<resources/>
<connections/>
<buttongroups>
<buttongroup name="underlayButtonGroup"/>
<buttongroup name="pollingButtonGroup"/>
<buttongroup name="underlayButtonGroup"/>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>