Files
autopilot/misc/camera/a8/serialPort.hpp

25 lines
371 B
C++

#pragma once
#include <QByteArray>
#include <QObject>
#include <QSerialPort>
class SerialPort : public QObject
{
Q_OBJECT
public:
SerialPort(QString usePort);
~SerialPort();
bool openPort();
void closePort();
public slots:
void sendCommand(const QByteArray &command);
QByteArray readResponse();
private:
QSerialPort *mSerialPort;
};