Add skimmer support (setting not saved)

merge-requests/14/head
Phil Taylor 2022-10-31 12:39:27 +00:00
rodzic 209c5a9b0b
commit 29060eb43e
5 zmienionych plików z 68 dodań i 7 usunięć

Wyświetl plik

@ -57,7 +57,7 @@ void dxClusterClient::enableTcp(bool enable)
tcpEnable = enable; tcpEnable = enable;
if (enable) if (enable)
{ {
tcpRegex = QRegularExpression("^DX de ([a-z|A-Z|0-9|/]+):\\s+([0-9|.]+)\\s+([a-z|A-Z|0-9|/]+)+\\s+(.*)\\s+(\\d{4}Z)"); tcpRegex = QRegularExpression("^DX de ([a-z-|A-Z|0-9|#|/]+):\\s+([0-9|.]+)\\s+([a-z|A-Z|0-9|/]+)+\\s+(.*)\\s+(\\d{4}Z)");
if (tcpSocket == Q_NULLPTR) if (tcpSocket == Q_NULLPTR)
{ {
@ -181,6 +181,7 @@ void dxClusterClient::tcpDataReceived()
} }
if (data.contains("Hello")) { if (data.contains("Hello")) {
authenticated = true; authenticated = true;
enableSkimmerSpots(skimmerSpots);
} }
} }
else { else {
@ -296,3 +297,18 @@ void dxClusterClient::updateSpots()
#endif #endif
emit sendSpots(spots); emit sendSpots(spots);
} }
void dxClusterClient::enableSkimmerSpots(bool enable)
{
skimmerSpots = enable;
if (authenticated) {
if (skimmerSpots) {
sendTcpData(QString("Set Dx Filter Skimmer\n"));
}
else
{
sendTcpData(QString("Set Dx Filter Not Skimmer\n"));
}
}
}

Wyświetl plik

@ -72,6 +72,7 @@ public slots:
void setTcpTimeout(int p) { tcpTimeout = p; } void setTcpTimeout(int p) { tcpTimeout = p; }
void tcpCleanup(); void tcpCleanup();
void freqRange(double low, double high); void freqRange(double low, double high);
void enableSkimmerSpots(bool enable);
private: private:
void sendTcpData(QString data); void sendTcpData(QString data);
@ -99,6 +100,7 @@ private:
double lowFreq; double lowFreq;
double highFreq; double highFreq;
QMap<QString,spotData*> allSpots; QMap<QString,spotData*> allSpots;
bool skimmerSpots = false;
}; };
#endif #endif

Wyświetl plik

@ -127,6 +127,7 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
connect(this, SIGNAL(setClusterPassword(QString)), cluster, SLOT(setTcpPassword(QString))); connect(this, SIGNAL(setClusterPassword(QString)), cluster, SLOT(setTcpPassword(QString)));
connect(this, SIGNAL(setClusterTimeout(int)), cluster, SLOT(setTcpTimeout(int))); connect(this, SIGNAL(setClusterTimeout(int)), cluster, SLOT(setTcpTimeout(int)));
connect(this, SIGNAL(setFrequencyRange(double, double)), cluster, SLOT(freqRange(double, double))); connect(this, SIGNAL(setFrequencyRange(double, double)), cluster, SLOT(freqRange(double, double)));
connect(this, SIGNAL(setClusterSkimmerSpots(bool)), cluster, SLOT(enableSkimmerSpots(bool)));
connect(cluster, SIGNAL(sendSpots(QList<spotData>)), this, SLOT(receiveSpots(QList<spotData>))); connect(cluster, SIGNAL(sendSpots(QList<spotData>)), this, SLOT(receiveSpots(QList<spotData>)));
connect(cluster, SIGNAL(sendOutput(QString)), this, SLOT(receiveClusterOutput(QString))); connect(cluster, SIGNAL(sendOutput(QString)), this, SLOT(receiveClusterOutput(QString)));
@ -7843,6 +7844,12 @@ void wfmain::on_clusterPopOutBtn_clicked()
} }
} }
void wfmain::on_clusterSkimmerSpotsEnable_clicked(bool enable)
{
prefs.clusterSkimmerSpotsEnable = enable;
emit setClusterSkimmerSpots(enable);
}
void wfmain::on_clickDragTuningEnableChk_clicked(bool checked) void wfmain::on_clickDragTuningEnableChk_clicked(bool checked)
{ {
prefs.clickDragTuningEnable = checked; prefs.clickDragTuningEnable = checked;

Wyświetl plik

@ -197,6 +197,7 @@ signals:
void setClusterUserName(QString name); void setClusterUserName(QString name);
void setClusterPassword(QString pass); void setClusterPassword(QString pass);
void setClusterTimeout(int timeout); void setClusterTimeout(int timeout);
void setClusterSkimmerSpots(bool enable);
void setFrequencyRange(double low, double high); void setFrequencyRange(double low, double high);
private slots: private slots:
@ -676,6 +677,7 @@ private slots:
void on_clusterPasswordLineEdit_editingFinished(); void on_clusterPasswordLineEdit_editingFinished();
void on_clusterTimeoutLineEdit_editingFinished(); void on_clusterTimeoutLineEdit_editingFinished();
void on_clusterPopOutBtn_clicked(); void on_clusterPopOutBtn_clicked();
void on_clusterSkimmerSpotsEnable_clicked(bool enable);
void on_clickDragTuningEnableChk_clicked(bool checked); void on_clickDragTuningEnableChk_clicked(bool checked);
@ -941,6 +943,7 @@ private:
QString clusterTcpUserName; QString clusterTcpUserName;
QString clusterTcpPassword; QString clusterTcpPassword;
int clusterTimeout; int clusterTimeout;
bool clusterSkimmerSpotsEnable;
bool clickDragTuningEnable; bool clickDragTuningEnable;
} prefs; } prefs;

Wyświetl plik

@ -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>3</number>
</property> </property>
<widget class="QWidget" name="mainTab"> <widget class="QWidget" name="mainTab">
<attribute name="title"> <attribute name="title">
@ -2223,7 +2223,7 @@
<item> <item>
<widget class="QStackedWidget" name="settingsStack"> <widget class="QStackedWidget" name="settingsStack">
<property name="currentIndex"> <property name="currentIndex">
<number>1</number> <number>5</number>
</property> </property>
<widget class="QWidget" name="radioAccess"> <widget class="QWidget" name="radioAccess">
<layout class="QVBoxLayout" name="verticalLayout_21"> <layout class="QVBoxLayout" name="verticalLayout_21">
@ -3350,8 +3350,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>799</width> <width>801</width>
<height>269</height> <height>311</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
@ -5090,11 +5090,44 @@
<string>Pop-Out</string> <string>Pop-Out</string>
</property> </property>
</widget> </widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>470</y>
<width>801</width>
<height>22</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_45">
<item>
<widget class="QCheckBox" name="clusterSkimmerSpotsEnable">
<property name="text">
<string>Show Skimmer Spots</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_36">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<zorder>groupBox_9</zorder> <zorder>groupBox_9</zorder>
<zorder>horizontalLayoutWidget</zorder> <zorder>horizontalLayoutWidget</zorder>
<zorder>groupBox_10</zorder> <zorder>groupBox_10</zorder>
<zorder>clusterOutputTextEdit</zorder> <zorder>clusterOutputTextEdit</zorder>
<zorder>clusterPopOutBtn</zorder> <zorder>clusterPopOutBtn</zorder>
<zorder>horizontalLayoutWidget_2</zorder>
</widget> </widget>
<widget class="QWidget" name="experimental"> <widget class="QWidget" name="experimental">
<layout class="QVBoxLayout" name="verticalLayout_28"> <layout class="QVBoxLayout" name="verticalLayout_28">
@ -5263,7 +5296,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1023</width> <width>1023</width>
<height>23</height> <height>21</height>
</rect> </rect>
</property> </property>
</widget> </widget>
@ -5290,7 +5323,7 @@
<resources/> <resources/>
<connections/> <connections/>
<buttongroups> <buttongroups>
<buttongroup name="underlayButtonGroup"/>
<buttongroup name="buttonGroup"/> <buttongroup name="buttonGroup"/>
<buttongroup name="underlayButtonGroup"/>
</buttongroups> </buttongroups>
</ui> </ui>