summaryrefslogtreecommitdiff
path: root/qt/RGBController/old_src/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt/RGBController/old_src/serial.h')
-rw-r--r--qt/RGBController/old_src/serial.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/qt/RGBController/old_src/serial.h b/qt/RGBController/old_src/serial.h
new file mode 100644
index 0000000..6403887
--- /dev/null
+++ b/qt/RGBController/old_src/serial.h
@@ -0,0 +1,32 @@
+#ifndef SERIAL_H
+#define SERIAL_H
+
+#include <QObject>
+#include <QSerialPort>
+#include <QSerialPortInfo>
+#include <QDebug>
+
+class serial : public QObject
+{
+ Q_OBJECT
+ public:
+ explicit serial(QObject *parent = 0);
+
+
+ /* function declares */
+ bool serial_connect(QString port);
+ bool serial_disconnect();
+ void rgb_change(int r, int g, int b);
+ void send(QString com);
+ void parse(QString message);
+ /* variables */
+ QString port_name;
+ //QSerialPort ser;
+ QSerialPort *ser;
+ QByteArray data;
+ QByteArray serdata;
+ private slots:
+ void read();
+};
+
+#endif // SERIAL_H