We now calculate polling rates immediately upon receiveCommReady for

serial connections. For network connections, we assume sane values and
modify once we receive the baud rate from the server.
merge-requests/5/head
Elliott Liggett 2021-06-14 20:22:15 -07:00
rodzic 85a07881d6
commit 297478ffca
2 zmienionych plików z 14 dodań i 8 usunięć

Wyświetl plik

@ -52,6 +52,9 @@ model_kind determineRadioModel(unsigned char rigID)
case model705:
rig = model705;
break;
case model718:
rig = model718;
break;
case model756proiii:
rig = model756proiii;
break;

Wyświetl plik

@ -160,6 +160,7 @@ void wfmain::openRig()
if (prefs.enableLAN)
{
ui->lanEnableBtn->setChecked(true);
usingLAN = true;
// We need to setup the tx/rx audio:
emit sendCommSetup(prefs.radioCIVAddr, udpPrefs, rxSetup, txSetup, prefs.virtualSerialPort);
} else {
@ -176,10 +177,7 @@ void wfmain::openRig()
serialPortRig = serialPortCL;
}
}
// Here, the radioCIVAddr is being set from a default preference, which is for the 7300.
// However, we will not use it initially. OTOH, if it is set explicitedly to a value in the prefs,
// then we skip auto detection.
usingLAN = false;
emit sendCommSetup(prefs.radioCIVAddr, serialPortRig, prefs.serialPortBaud,prefs.virtualSerialPort);
}
@ -455,7 +453,13 @@ void wfmain::findSerialPort()
void wfmain::receiveCommReady()
{
qInfo(logSystem()) << "Received CommReady!! ";
// taken from above:
if(!usingLAN)
{
// usingLAN gets set when we emit the sendCommSetup signal.
// If we're not using the LAN, then we're on serial, and
// we already know the baud rate and can calculate the timing parameters.
calculateTimingParameters();
}
if(prefs.radioCIVAddr == 0)
{
// tell rigCommander to broadcast a request for all rig IDs.
@ -484,7 +488,6 @@ void wfmain::receiveFoundRigID(rigCapabilities rigCaps)
if(rig->usingLAN())
{
usingLAN = true;
//delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
} else {
usingLAN = false;
}
@ -724,7 +727,7 @@ void wfmain::getSettingsFilePath(QString settingsFile)
void wfmain::setInitialTiming()
{
delayedCmdIntervalLAN_ms = 10; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdIntervalLAN_ms = 70; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdIntervalSerial_ms = 100; // interval for regular delayed commands, including initial rig/UI state queries
delayedCmdStartupInterval_ms = 250; // interval for rigID polling
delayedCommand = new QTimer(this);
@ -4609,6 +4612,6 @@ void wfmain::on_wfLengthSlider_valueChanged(int value)
void wfmain::on_debugBtn_clicked()
{
qInfo(logSystem()) << "Debug button pressed.";
prepareWf(160);
emit getTxPower();
}