blob: 3f0386a4bb9e010aa624900dd4f615d401c03cee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#ifndef SERIAL_H
#define SERIAL_H
#include <QObject>
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QDebug>
class serial : public QObject
{
Q_OBJECT
public:
serial();
void start(QString port);
public slots:
void send(QString com);
private:
bool connect(QString port);
void show_ports();
QSerialPort ser;
QSerialPortInfo s;
QByteArray serdata;
QByteArray data;
};
#endif // SERIAL_H
|