summaryrefslogtreecommitdiff
path: root/qt/RGBController/old_src/serial_communication.h
blob: 5f2826c9d52fc29034e80a10faeca39734ef6e4e (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_COMMUNICATION_H
#define SERIAL_COMMUNICATION_H

/* includes */
#include <QSerialPort>
#include <QSerialPortInfo>
#include <QDebug>


class serial_communication
{
	public:
		/* function declares */
		serial_communication();
		bool serial_connect(QString port);
		bool serial_disconnect();
		void rgb_change(int r, int g, int b);
	        void send(QString com);
		/* variables */
		QString port_name;
		QSerialPort serial;
		QByteArray data;
	private slots:
		void read();
};

#endif // SERIAL_COMMUNICATION_H