mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 12:46:34 +00:00
Changed FIFO pipes to UDP.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <QtNetwork/QUdpSocket>
|
||||
|
||||
struct RectangleProperties
|
||||
{
|
||||
@@ -18,11 +19,11 @@ class RemoteControl : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RemoteControl();
|
||||
~RemoteControl();
|
||||
void run();
|
||||
explicit RemoteControl(QObject *parent = nullptr);
|
||||
|
||||
private slots:
|
||||
void readPendingDatagrams();
|
||||
void processJSON(QJsonDocument jsonDoc);
|
||||
void sendResponse(void);
|
||||
void calculateTargetPosition(QJsonObject &commandObject);
|
||||
void turnToTarget(QJsonObject &commandObject);
|
||||
@@ -32,9 +33,7 @@ private slots:
|
||||
RectangleProperties calculateRectangleProperties(uint16_t top, uint16_t left, uint16_t bottom, uint16_t right);
|
||||
|
||||
private:
|
||||
void openNamedPipe(void);
|
||||
bool mIsBusy;
|
||||
int mFifoFdIn;
|
||||
int mFifoFdOut;
|
||||
QUdpSocket *mUdpSocket;
|
||||
QJsonObject mResponseObject;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user