mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 08:36:33 +00:00
33399370f3
Simple program to control Siyi A8 mini (actually some other Siyi cameras too). Receiving responce sometimes gives error when checking CRC.
19 lines
310 B
C++
19 lines
310 B
C++
#pragma once
|
|
|
|
#include <QString>
|
|
#include <QSerialPort>
|
|
|
|
class SerialPort {
|
|
public:
|
|
SerialPort(const QString& portName);
|
|
~SerialPort();
|
|
|
|
bool openPort();
|
|
void closePort();
|
|
void sendCommand(const QByteArray& command);
|
|
QByteArray readResponse();
|
|
|
|
private:
|
|
QSerialPort mSerialPort;
|
|
};
|