kopia lustrzana https://gitlab.com/eliggett/wfview
better control of rapid commands when mode changes
rodzic
87a261be12
commit
5328838c73
47
wfmain.cpp
47
wfmain.cpp
|
@ -4864,6 +4864,13 @@ void wfmain::initPeriodicCommands()
|
||||||
rapidPollCmdQueueEnabled = false;
|
rapidPollCmdQueueEnabled = false;
|
||||||
rapidPollCmdQueue.clear();
|
rapidPollCmdQueue.clear();
|
||||||
rapidPollCmdQueueEnabled = true;
|
rapidPollCmdQueueEnabled = true;
|
||||||
|
|
||||||
|
if (rigCaps.hasSpectrum) {
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetTPBFInner);
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetTPBFOuter);
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetPassband);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wfmain::insertPeriodicRapidCmd(cmds cmd)
|
void wfmain::insertPeriodicRapidCmd(cmds cmd)
|
||||||
|
@ -5700,12 +5707,6 @@ void wfmain::receiveMode(unsigned char mode, unsigned char filter)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Remove all "Slow" commands (they will be added later if needed)
|
// Remove all "Slow" commands (they will be added later if needed)
|
||||||
removePeriodicRapidCmd(cmdGetCwPitch);
|
|
||||||
removePeriodicRapidCmd(cmdGetDashRatio);
|
|
||||||
removePeriodicRapidCmd(cmdGetKeySpeed);
|
|
||||||
removePeriodicRapidCmd(cmdGetPassband);
|
|
||||||
removePeriodicRapidCmd(cmdGetTPBFInner);
|
|
||||||
removePeriodicRapidCmd(cmdGetTPBFOuter);
|
|
||||||
|
|
||||||
quint16 maxPassbandHz = 0;
|
quint16 maxPassbandHz = 0;
|
||||||
switch ((mode_kind)mode) {
|
switch ((mode_kind)mode) {
|
||||||
|
@ -5718,12 +5719,15 @@ void wfmain::receiveMode(unsigned char mode, unsigned char filter)
|
||||||
passbandWidth = 0.007;
|
passbandWidth = 0.007;
|
||||||
passbandCenterFrequency = 0.0;
|
passbandCenterFrequency = 0.0;
|
||||||
maxPassbandHz = 10E3;
|
maxPassbandHz = 10E3;
|
||||||
|
removePeriodicRapidCmd(cmdGetPassband);
|
||||||
|
removePeriodicRapidCmd(cmdGetTPBFInner);
|
||||||
|
removePeriodicRapidCmd(cmdGetTPBFOuter);
|
||||||
break;
|
break;
|
||||||
case modeCW:
|
case modeCW:
|
||||||
case modeCW_R:
|
case modeCW_R:
|
||||||
insertPeriodicRapidCmd(cmdGetCwPitch);
|
insertPeriodicRapidCmdUnique(cmdGetCwPitch);
|
||||||
insertPeriodicRapidCmd(cmdGetDashRatio);
|
insertPeriodicRapidCmdUnique(cmdGetDashRatio);
|
||||||
insertPeriodicRapidCmd(cmdGetKeySpeed);
|
insertPeriodicRapidCmdUnique(cmdGetKeySpeed);
|
||||||
maxPassbandHz = 3600;
|
maxPassbandHz = 3600;
|
||||||
break;
|
break;
|
||||||
case modeAM:
|
case modeAM:
|
||||||
|
@ -5741,6 +5745,23 @@ void wfmain::receiveMode(unsigned char mode, unsigned char filter)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((mode_kind)mode != modeFM && currentModeInfo.mk == modeFM)
|
||||||
|
{
|
||||||
|
/* mode was FM but now isn't so insert commands */
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetPassband);
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetTPBFInner);
|
||||||
|
insertPeriodicRapidCmdUnique(cmdGetTPBFOuter);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (((mode_kind)mode != modeCW && (mode_kind)mode != modeCW_R) && (currentModeInfo.mk == modeCW || currentModeInfo.mk == modeCW_R))
|
||||||
|
{
|
||||||
|
/* mode was CW/CWR but now isn't so remove CW commands */
|
||||||
|
removePeriodicRapidCmd(cmdGetCwPitch);
|
||||||
|
removePeriodicRapidCmd(cmdGetDashRatio);
|
||||||
|
removePeriodicRapidCmd(cmdGetKeySpeed);
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < ui->modeSelectCombo->count(); i++)
|
for (int i = 0; i < ui->modeSelectCombo->count(); i++)
|
||||||
{
|
{
|
||||||
if (ui->modeSelectCombo->itemData(i).toInt() == mode)
|
if (ui->modeSelectCombo->itemData(i).toInt() == mode)
|
||||||
|
@ -5775,14 +5796,6 @@ void wfmain::receiveMode(unsigned char mode, unsigned char filter)
|
||||||
{
|
{
|
||||||
trxadj->setMaxPassband(maxPassbandHz);
|
trxadj->setMaxPassband(maxPassbandHz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentModeInfo.mk != modeFM)
|
|
||||||
{
|
|
||||||
|
|
||||||
insertPeriodicRapidCmd(cmdGetPassband);
|
|
||||||
insertPeriodicRapidCmd(cmdGetTPBFInner);
|
|
||||||
insertPeriodicRapidCmd(cmdGetTPBFOuter);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: we need to know if the DATA mode is active to reach mode-D
|
// Note: we need to know if the DATA mode is active to reach mode-D
|
||||||
// some kind of queued query:
|
// some kind of queued query:
|
||||||
|
|
Ładowanie…
Reference in New Issue