diff options
author | daniel-Jones <daniel@danieljon.es> | 2017-07-06 19:04:48 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2017-07-06 19:04:48 +0930 |
commit | d3624454f67e3afc026d7e16546f5549e67f6102 (patch) | |
tree | e370fc7bd48c58f9d4a523d9eb7c554ebf6b461e /qt/consoleserver/serial.h | |
parent | 9834782c287b1dc6df59a03e5992911d8fb70a83 (diff) | |
download | RGB-Controller-d3624454f67e3afc026d7e16546f5549e67f6102.tar.gz RGB-Controller-d3624454f67e3afc026d7e16546f5549e67f6102.zip |
Added console based server that allows clients to connect and send commands to the microcontroller, does not require X to use, includes the IRC bot. Also included my beginning works on a c ncurses based client.
Diffstat (limited to 'qt/consoleserver/serial.h')
-rw-r--r-- | qt/consoleserver/serial.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qt/consoleserver/serial.h b/qt/consoleserver/serial.h new file mode 100644 index 0000000..3f0386a --- /dev/null +++ b/qt/consoleserver/serial.h @@ -0,0 +1,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 |