mirror of
https://github.com/thunderbug1/Spherebot-Host-GUI.git
synced 2026-03-03 00:23:59 +01:00
outsourced the receiving to a seperate thread. This allows us to use much lower baudrates but still have a responsive UI. Set Baudrate to 57600 baud
29 lines
434 B
C++
29 lines
434 B
C++
#ifndef RXTHREAD_H
|
|
#define RXTHREAD_H
|
|
|
|
#include <QThread>
|
|
#include "spherebot.h"
|
|
#include <QTimer>
|
|
#include <QString>
|
|
|
|
class rxThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
rxThread(spherebot *);
|
|
void set(QString textfile,spherebot &bot);
|
|
void run();
|
|
~rxThread();
|
|
|
|
signals:
|
|
void lineReceived(QString);
|
|
|
|
public slots:
|
|
void receiveData();
|
|
private:
|
|
QString line;
|
|
spherebot *bot;
|
|
};
|
|
|
|
#endif // RXTHREAD_H
|