kopia lustrzana https://gitlab.com/eliggett/wfview
Fix mod input when data mode is changed
rodzic
245008fe90
commit
e2bd81a8d0
|
@ -2237,7 +2237,7 @@ void rigCommander::parseCommand()
|
|||
{
|
||||
if (r.reg == bcdHexToUChar(payloadIn[0]))
|
||||
{
|
||||
value.setValue(rigInput(r));
|
||||
value.setValue(r);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1362,6 +1362,7 @@ void spectrumScope::receiveMode(modeInfo m)
|
|||
|
||||
if (mode.data != m.data)
|
||||
{
|
||||
emit dataChanged(m); // Signal wfmain that the data mode has been changed.
|
||||
dataCombo->blockSignals(true);
|
||||
dataCombo->setCurrentIndex(m.data);
|
||||
dataCombo->blockSignals(false);
|
||||
|
@ -1369,6 +1370,7 @@ void spectrumScope::receiveMode(modeInfo m)
|
|||
|
||||
if (m.mk != mode.mk) {
|
||||
// We have changed mode so "may" need to change regular commands
|
||||
|
||||
passbandCenterFrequency = 0.0;
|
||||
|
||||
// If new mode doesn't allow bandwidth control, disable filterwidth and pbt.
|
||||
|
|
|
@ -109,7 +109,7 @@ signals:
|
|||
void showStatusBarText(QString text);
|
||||
void updateSettings(bool sub, int value, quint16 len, int floor, int ceiling);
|
||||
void elapsedTime(bool sub, qint64 ns);
|
||||
|
||||
void dataChanged(modeInfo m);
|
||||
|
||||
private slots:
|
||||
void updatedScopeMode(int index);
|
||||
|
|
40
wfmain.cpp
40
wfmain.cpp
|
@ -489,6 +489,9 @@ void wfmain::rigConnections()
|
|||
|
||||
connect(ui->mainScope, SIGNAL(elapsedTime(bool,qint64)), this, SLOT(receiveElapsed(bool,qint64)));
|
||||
connect(ui->subScope, SIGNAL(elapsedTime(bool,qint64)), this, SLOT(receiveElapsed(bool,qint64)));
|
||||
|
||||
connect(ui->mainScope, SIGNAL(dataChanged(modeInfo)), this, SLOT(dataModeChanged(modeInfo)));
|
||||
|
||||
}
|
||||
|
||||
void wfmain::makeRig()
|
||||
|
@ -2423,7 +2426,6 @@ void wfmain::extChangedRsPref(prefRsItem i)
|
|||
case rs_dataOffMod:
|
||||
queue->add(priorityImmediate,queueItem(funcDATAOffMod,QVariant::fromValue<rigInput>(prefs.inputSource[0]),false,false));
|
||||
queue->addUnique(priorityHigh,queueItem(getInputTypeCommand(prefs.inputSource[0].type),true,false));
|
||||
qInfo(logSystem()) << "Data off mod changed to" << prefs.inputSource[0].name;
|
||||
break;
|
||||
case rs_data1Mod:
|
||||
queue->add(priorityImmediate,queueItem(funcDATA1Mod,QVariant::fromValue<rigInput>(prefs.inputSource[1]),false,false));
|
||||
|
@ -4462,7 +4464,7 @@ void wfmain::receiveModInput(rigInput input, unsigned char data)
|
|||
{
|
||||
qInfo() << QString("Data: %0 Input: %1 current: %2").arg(data).arg(input.name).arg(prefs.inputSource[data].name);
|
||||
queue->del(getInputTypeCommand(prefs.inputSource[data].type),false);
|
||||
prefs.inputSource[data] = rigInput(input);
|
||||
prefs.inputSource[data] = input;
|
||||
if (ui->mainScope->getDataMode() == data)
|
||||
{
|
||||
queue->addUnique(priorityImmediate,getInputTypeCommand(input.type),true,false);
|
||||
|
@ -5598,11 +5600,15 @@ void wfmain::receiveValue(cacheItem val){
|
|||
//receivePassband(val.value.value<ushort>());
|
||||
break;
|
||||
case funcDataModeWithFilter:
|
||||
if (val.sub)
|
||||
if (val.sub) {
|
||||
ui->subScope->receiveMode(val.value.value<modeInfo>());
|
||||
else
|
||||
} else {
|
||||
ui->mainScope->receiveMode(val.value.value<modeInfo>());
|
||||
}
|
||||
// Set the inputSource to invalid to ensure it gets updated
|
||||
prefs.inputSource[ui->mainScope->getDataMode()] = rigInput();
|
||||
break;
|
||||
|
||||
case funcAFMute:
|
||||
break;
|
||||
// 0x1a 0x05 various registers!
|
||||
|
@ -5817,6 +5823,32 @@ void wfmain::on_dualWatchBtn_toggled(bool en)
|
|||
queue->add(priorityImmediate,queueItem(funcVFODualWatch,QVariant::fromValue(en),false,false));
|
||||
}
|
||||
|
||||
void wfmain::dataModeChanged(modeInfo m)
|
||||
{
|
||||
// As the data mode may have changed, we need to make sure that we invalidate the input selection.
|
||||
// Also request the current input from the rig.
|
||||
qInfo(logSystem()) << "*** DATA MODE HAS CHANGED ***";
|
||||
currentModSrc[m.data] = rigInput();
|
||||
|
||||
// Request the current inputSource.
|
||||
switch(m.data)
|
||||
{
|
||||
case 0:
|
||||
queue->add(priorityImmediate,funcDATAOffMod);
|
||||
break;
|
||||
case 1:
|
||||
queue->add(priorityImmediate,funcDATA1Mod);
|
||||
break;
|
||||
case 2:
|
||||
queue->add(priorityImmediate,funcDATA2Mod);
|
||||
break;
|
||||
case 3:
|
||||
queue->add(priorityImmediate,funcDATA3Mod);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void wfmain::receiveScopeSettings(bool sub, int theme, quint16 len, int floor, int ceiling)
|
||||
{
|
||||
if (sub) {
|
||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -415,6 +415,7 @@ private slots:
|
|||
void receiveBaudRate(quint32 baudrate);
|
||||
void radioSelection(QList<radio_cap_packet> radios);
|
||||
|
||||
void dataModeChanged(modeInfo m);
|
||||
|
||||
// Added for RC28/Shuttle support
|
||||
void pttToggle(bool);
|
||||
|
|
Ładowanie…
Reference in New Issue