Photo capture and PHD dither support
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef PHD_H
|
||||
#define PHD_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QTcpSocket>
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Stopped,
|
||||
Selected,
|
||||
Calibrating,
|
||||
Guiding,
|
||||
LostLock,
|
||||
Paused,
|
||||
Looping,
|
||||
Unknown,
|
||||
}PHDState;
|
||||
|
||||
class PHD : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QTcpSocket *_socket;
|
||||
QByteArray _data;
|
||||
int _messageId;
|
||||
public:
|
||||
explicit PHD(QObject *parent = nullptr);
|
||||
void connectTo(const QHostAddress &address, int port = 4400);
|
||||
QString stateToString(PHDState state);
|
||||
PHDState stringToState(const QString &state);
|
||||
void dither(float pixels, bool raOnly, int time = 5, int timeout = 30);
|
||||
private:
|
||||
void parseMessage();
|
||||
void invokeMethod(const QString &method, const QVariantList ¶ms);
|
||||
private slots:
|
||||
void readyRead();
|
||||
signals:
|
||||
void connected();
|
||||
void settled();
|
||||
void stateChanged(PHDState state);
|
||||
};
|
||||
|
||||
#endif // PHD_H
|
||||
Reference in New Issue
Block a user