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:
Alex
2014-12-23 19:01:14 +01:00
parent 45e67844bd
commit aec078c865
30 changed files with 3504 additions and 5912 deletions

27
Spherebot_UI/rxthread.cpp Normal file
View File

@@ -0,0 +1,27 @@
#include "rxthread.h"
rxThread::rxThread(spherebot *uibot)
{
bot = uibot;
}
rxThread::~rxThread()
{
}
void rxThread::receiveData()
{
if(bot->port->canReadLine())
{
line = bot->port->readLine(1024);
line.chop(1);
qDebug()<<"receiving: " << line << endl;/////////////////////////////
emit lineReceived(line);
}
}
void rxThread::run()
{
qDebug()<<"start Receiver";
line = "";
}