mirror of
https://github.com/thunderbug1/Spherebot-Host-GUI.git
synced 2026-03-06 18:06:47 +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
37 lines
630 B
C++
37 lines
630 B
C++
#ifndef TXTHREAD_H
|
|
#define TXTHREAD_H
|
|
#include <QString>
|
|
#include "spherebot.h"
|
|
#include <QMessageBox>
|
|
#include <QTimer>
|
|
#include <QString>
|
|
#include <string.h>
|
|
|
|
class txThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
txThread(spherebot *);
|
|
void set(QString textfile);
|
|
void run();
|
|
~txThread();
|
|
int getLineCounter();
|
|
|
|
signals:
|
|
void progressChanged(int);
|
|
void layerTransmitted();
|
|
void fileTransmitted();
|
|
|
|
public slots:
|
|
void sendNext();
|
|
void resetState();
|
|
private:
|
|
QString textfile;
|
|
int lineCounter;
|
|
int lineMax;
|
|
bool ignoreFirstM01;
|
|
spherebot *bot;
|
|
};
|
|
|
|
#endif // TXTHREAD_H
|