1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-26 03:54:30 -04:00

GS-232 Controller updates.

Update GS-232 controller to use message pipes for the target.
Add field displaying the name of the target.
Add azimuth and elevation offsets.
Report worker thread errors to the GUI.
This commit is contained in:
Jon Beniston
2021-01-13 19:44:53 +00:00
parent f2ebd72004
commit 931a63dc8b
13 changed files with 417 additions and 403 deletions
@@ -21,6 +21,7 @@
#include <QThread>
#include <QNetworkRequest>
#include <QTimer>
#include "feature/feature.h"
#include "util/message.h"
@@ -81,6 +82,25 @@ public:
{ }
};
class MsgReportWorker : public Message {
MESSAGE_CLASS_DECLARATION
public:
QString getMessage() { return m_message; }
static MsgReportWorker* create(QString message) {
return new MsgReportWorker(message);
}
private:
QString m_message;
MsgReportWorker(QString message) :
Message(),
m_message(message)
{}
};
GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface);
virtual ~GS232Controller();
virtual void destroy() { delete this; }
@@ -122,7 +142,10 @@ private:
QThread m_thread;
GS232ControllerWorker *m_worker;
GS232ControllerSettings m_settings;
bool m_ptt;
//QHash<PipeEndPoint*, AvailablePipeSource> m_availablePipes;
QList<AvailablePipeSource> m_availablePipes;
PipeEndPoint *m_selectedPipe;
QTimer m_updatePipesTimer;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
@@ -133,7 +156,9 @@ private:
void webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const GS232ControllerSettings& settings, bool force);
private slots:
void updatePipes();
void networkManagerFinished(QNetworkReply *reply);
//void handlePipeMessageQueue(MessageQueue* messageQueue);
};
#endif // INCLUDE_FEATURE_GS232CONTROLLER_H_