mirror of
https://github.com/thunderbug1/Spherebot-Host-GUI.git
synced 2026-03-10 03:46:46 +01:00
rxthread
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
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#include "txthread.h"
|
||||
|
||||
txThread::txThread()
|
||||
txThread::txThread(spherebot *uibot)
|
||||
{
|
||||
resetState();
|
||||
bot = uibot;
|
||||
}
|
||||
|
||||
txThread::~txThread()
|
||||
@@ -44,14 +45,13 @@ QString removeComments(QString intext)
|
||||
return outTmp2;
|
||||
}
|
||||
|
||||
void txThread::set(QString intextfile,spherebot &uibot)
|
||||
void txThread::set(QString intextfile)
|
||||
{
|
||||
lineCounter = 0;
|
||||
textfile.clear();
|
||||
textfile.append(removeComments(intextfile));
|
||||
//qDebug()<<"The textfile String is: \n\n" + textfile + "\n\nENDE\n\n";
|
||||
lineMax = textfile.count("\n");
|
||||
bot = &uibot;
|
||||
}
|
||||
|
||||
void txThread::run()
|
||||
@@ -78,7 +78,7 @@ void txThread::sendNext()
|
||||
emit layerTransmitted();
|
||||
}
|
||||
}
|
||||
//qDebug()<<"sending: " << tmp << endl;
|
||||
//qDebug()<<"sending: " << tmp << endl;/////////////////////////////
|
||||
bot->send(tmp);
|
||||
double progress= (double) lineCounter/(double)lineMax;
|
||||
emit progressChanged(progress*100);
|
||||
|
||||
Reference in New Issue
Block a user