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);
|
emit haveStatusUpdate(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rigCommander::usingLAN()
|
||||||
|
{
|
||||||
|
return usingNativeLAN;
|
||||||
|
}
|
||||||
|
|
||||||
void rigCommander::findRigs()
|
void rigCommander::findRigs()
|
||||||
{
|
{
|
||||||
// This function sends data to 0x00 ("broadcast") to look for any connected rig.
|
// This function sends data to 0x00 ("broadcast") to look for any connected rig.
|
||||||
|
|
|
@ -57,6 +57,8 @@ public:
|
||||||
rigCommander();
|
rigCommander();
|
||||||
~rigCommander();
|
~rigCommander();
|
||||||
|
|
||||||
|
bool usingLAN();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void process();
|
void process();
|
||||||
void commSetup(unsigned char rigCivAddr, QString rigSerialPort, quint32 rigBaudRate);
|
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) {
|
QString rigCtlClient::getMode(unsigned char mode, bool datamode) {
|
||||||
|
(void)datamode;
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 0:
|
case 0:
|
||||||
return QString("LSB");
|
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->setText("NONE");
|
||||||
rigName->setFixedWidth(50);
|
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
|
delayedCmdStartupInterval_ms = 250; // interval for rigID polling
|
||||||
delayedCommand = new QTimer(this);
|
delayedCommand = new QTimer(this);
|
||||||
delayedCommand->setInterval(delayedCmdStartupInterval_ms); // 250ms until we find rig civ and id, then 100ms.
|
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:
|
//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.";
|
//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);
|
receiveRigID(rigCaps);
|
||||||
getInitialRigState();
|
getInitialRigState();
|
||||||
|
|
||||||
|
@ -1991,7 +1999,12 @@ void wfmain::runDelayedCommand()
|
||||||
periodicPollingTimer->stop();
|
periodicPollingTimer->stop();
|
||||||
break;
|
break;
|
||||||
case cmdQueNormalSpeed:
|
case cmdQueNormalSpeed:
|
||||||
delayedCommand->setInterval(delayedCmdInterval_ms);
|
if(usingLAN)
|
||||||
|
{
|
||||||
|
delayedCommand->setInterval(delayedCmdIntervalLAN_ms);
|
||||||
|
} else {
|
||||||
|
delayedCommand->setInterval(delayedCmdIntervalSerial_ms);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
4
wfmain.h
4
wfmain.h
|
@ -552,8 +552,10 @@ private:
|
||||||
QVector <cmds> cmdOutQue;
|
QVector <cmds> cmdOutQue;
|
||||||
QVector <cmds> periodicCmdQueue;
|
QVector <cmds> periodicCmdQueue;
|
||||||
int pCmdNum = 0;
|
int pCmdNum = 0;
|
||||||
int delayedCmdInterval_ms = 100;
|
int delayedCmdIntervalLAN_ms = 100;
|
||||||
|
int delayedCmdIntervalSerial_ms = 100;
|
||||||
int delayedCmdStartupInterval_ms = 100;
|
int delayedCmdStartupInterval_ms = 100;
|
||||||
|
bool usingLAN = false;
|
||||||
|
|
||||||
freqMemory mem;
|
freqMemory mem;
|
||||||
struct colors {
|
struct colors {
|
||||||
|
|
20
wfmain.ui
20
wfmain.ui
|
@ -18,7 +18,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="mainTab">
|
<widget class="QWidget" name="mainTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -734,7 +734,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="preampSelCombo"/>
|
<widget class="QComboBox" name="preampSelCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -754,7 +758,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="attSelCombo"/>
|
<widget class="QComboBox" name="attSelCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -794,7 +802,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="antennaSelCombo"/>
|
<widget class="QComboBox" name="antennaSelCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|
Ładowanie…
Reference in New Issue