1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-29 07:24:13 +01:00

Fixes performance issues under windows

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@476 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
zedamota 2010-04-10 23:02:40 +00:00 committed by zedamota
parent eb8ad597c3
commit 5e1ecd34c6
5 changed files with 303 additions and 298 deletions

View File

@ -56,7 +56,7 @@
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Vendor:</string>
<string>Developer:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@ -54,7 +54,7 @@
</column>
<column>
<property name="text">
<string>Vendor</string>
<string>Developer</string>
</property>
</column>
<column>

View File

@ -79,7 +79,7 @@ int QymodemTx::SendInitialise(unsigned timeout)
int c;
for(;;)
{
const unsigned timeoutStep = 1000;
const unsigned timeoutStep = 100;
c = InChar(timeoutStep);
if(c=='G')
{

View File

@ -160,7 +160,7 @@ int QymodemSend::SendFile(QString filename)
emit Error("File not found",QymodemSend::ErrorFileNotFound);
return QymodemSend::ErrorFileNotFound;
}
if(!Port.open(QIODevice::ReadWrite))
if(!Port.open(_DEVICE_SET_))
{
emit Error("Could not open port",QymodemSend::ErrorCoulNotOpenPort);
return QymodemSend::ErrorCoulNotOpenPort;
@ -194,7 +194,7 @@ void QymodemSend::run()
emit Error("File not found",QymodemSend::ErrorFileNotFound);
return;
}
if(!Port.open(QIODevice::ReadWrite))
if(!Port.open(_DEVICE_SET_))
{
emit Error("Could not open port",QymodemSend::ErrorCoulNotOpenPort);
return;

View File

@ -20,6 +20,11 @@
#include <QString>
#include <QFile>
#ifdef Q_OS_WIN
#define _DEVICE_SET_ QIODevice::ReadWrite|QIODevice::Unbuffered
#else
#define _DEVICE_SET_ QIODevice::ReadWrite
#endif
class QymodemSend:public QymodemTx
{