mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 22:26:35 +00:00
25 lines
371 B
C++
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;
|
|
};
|