mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 15:16:34 +00:00
Minor changes.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
|
||||
struct RectangleProperties
|
||||
{
|
||||
uint16_t width;
|
||||
uint16_t height;
|
||||
uint16_t middleX;
|
||||
uint16_t middleY;
|
||||
};
|
||||
|
||||
class RemoteControl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RemoteControl();
|
||||
~RemoteControl();
|
||||
void run();
|
||||
|
||||
private slots:
|
||||
void sendResponse(void);
|
||||
void calculateTargetPosition(QJsonObject &commandObject);
|
||||
void turnToTarget(QJsonObject &commandObject);
|
||||
void zoomToTarget(QJsonObject &commandObject);
|
||||
void restoreOrientation(void);
|
||||
void restoreZoom(void);
|
||||
RectangleProperties calculateRectangleProperties(uint16_t top, uint16_t left, uint16_t bottom, uint16_t right);
|
||||
|
||||
private:
|
||||
void openNamedPipe(void);
|
||||
bool mIsBusy;
|
||||
int mFifoFdIn;
|
||||
int mFifoFdOut;
|
||||
QJsonObject mResponseObject;
|
||||
};
|
||||
Reference in New Issue
Block a user