kopia lustrzana https://gitlab.com/eliggett/wfview
Different timing on command polling for serial rigs.
rodzic
61291f2b8c
commit
fa869dd270
|
@ -201,6 +201,11 @@ void rigCommander::handleStatusUpdate(const QString text)
|
|||
emit haveStatusUpdate(text);
|
||||
}
|
||||
|
||||
bool rigCommander::usingLAN()
|
||||
{
|
||||
return usingNativeLAN;
|
||||
}
|
||||
|
||||
void rigCommander::findRigs()
|
||||
{
|
||||
// This function sends data to 0x00 ("broadcast") to look for any connected rig.
|
||||
|
@ -2660,8 +2665,8 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.antennas = {0x00, 0x01, 0x02, 0x03};
|
||||
rigCaps.bands = standardHF;
|
||||
rigCaps.bands.push_back(bandGen);
|
||||
rigCaps.bands.push_back(band630m);
|
||||
rigCaps.bands.push_back(band2200m);
|
||||
rigCaps.bands.push_back(band630m);
|
||||
rigCaps.bands.push_back(band2200m);
|
||||
break;
|
||||
case model705:
|
||||
rigCaps.modelName = QString("IC-705");
|
||||
|
|
|
@ -57,6 +57,8 @@ public:
|
|||
rigCommander();
|
||||
~rigCommander();
|
||||
|
||||
bool usingLAN();
|
||||
|
||||
public slots:
|
||||
void process();
|
||||
void commSetup(unsigned char rigCivAddr, QString rigSerialPort, quint32 rigBaudRate);
|
||||
|
|
|
@ -272,6 +272,7 @@ QString rigCtlClient::getFilter(unsigned char mode, unsigned char filter) {
|
|||
}
|
||||
|
||||
QString rigCtlClient::getMode(unsigned char mode, bool datamode) {
|
||||
(void)datamode;
|
||||
switch (mode) {
|
||||
case 0:
|
||||
return QString("LSB");
|
||||
|
|
19
wfmain.cpp
19
wfmain.cpp
|
@ -305,7 +305,8 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
|||
rigName->setText("NONE");
|
||||
rigName->setFixedWidth(50);
|
||||
|
||||
delayedCmdInterval_ms = 10; // interval for regular delayed commands, including initial rig/UI state queries
|
||||
delayedCmdIntervalLAN_ms = 10; // interval for regular delayed commands, including initial rig/UI state queries
|
||||
delayedCmdIntervalSerial_ms = 50; // interval for regular delayed commands, including initial rig/UI state queries
|
||||
delayedCmdStartupInterval_ms = 250; // interval for rigID polling
|
||||
delayedCommand = new QTimer(this);
|
||||
delayedCommand->setInterval(delayedCmdStartupInterval_ms); // 250ms until we find rig civ and id, then 100ms.
|
||||
|
@ -749,7 +750,14 @@ void wfmain::receiveFoundRigID(rigCapabilities rigCaps)
|
|||
//now we know what the rig ID is:
|
||||
//qDebug(logSystem()) << "In wfview, we now have a reply to our request for rig identity sent to CIV BROADCAST.";
|
||||
|
||||
delayedCommand->setInterval(delayedCmdInterval_ms); // faster polling is ok now.
|
||||
if(rig->usingLAN())
|
||||
{
|
||||
usingLAN = true;
|
||||
delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
|
||||
} else {
|
||||
usingLAN = false;
|
||||
delayedCommand->setInterval(delayedCmdIntervalSerial_ms);
|
||||
}
|
||||
receiveRigID(rigCaps);
|
||||
getInitialRigState();
|
||||
|
||||
|
@ -1991,7 +1999,12 @@ void wfmain::runDelayedCommand()
|
|||
periodicPollingTimer->stop();
|
||||
break;
|
||||
case cmdQueNormalSpeed:
|
||||
delayedCommand->setInterval(delayedCmdInterval_ms);
|
||||
if(usingLAN)
|
||||
{
|
||||
delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
|
||||
} else {
|
||||
delayedCommand->setInterval(delayedCmdIntervalSerial_ms);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
4
wfmain.h
4
wfmain.h
|
@ -552,8 +552,10 @@ private:
|
|||
QVector <cmds> cmdOutQue;
|
||||
QVector <cmds> periodicCmdQueue;
|
||||
int pCmdNum = 0;
|
||||
int delayedCmdInterval_ms = 100;
|
||||
int delayedCmdIntervalLAN_ms = 100;
|
||||
int delayedCmdIntervalSerial_ms = 100;
|
||||
int delayedCmdStartupInterval_ms = 100;
|
||||
bool usingLAN = false;
|
||||
|
||||
freqMemory mem;
|
||||
struct colors {
|
||||
|
|
20
wfmain.ui
20
wfmain.ui
|
@ -18,7 +18,7 @@
|
|||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="mainTab">
|
||||
<attribute name="title">
|
||||
|
@ -734,7 +734,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="preampSelCombo"/>
|
||||
<widget class="QComboBox" name="preampSelCombo">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -754,7 +758,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="attSelCombo"/>
|
||||
<widget class="QComboBox" name="attSelCombo">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -794,7 +802,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="antennaSelCombo"/>
|
||||
<widget class="QComboBox" name="antennaSelCombo">
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
|
Ładowanie…
Reference in New Issue