Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 715 → Rev 714

/QMK-Groundstation/trunk/Global/Class_Input/Input_TCP.cpp
22,7 → 22,6
{
b_Open = false;
Timer = new QTimer();
s_Buffer = "";
connect(Timer, SIGNAL(timeout()), this, SLOT(slot_Timer()));
 
for (int z = 0; z < MAX_Confirm; z++)
79,7 → 78,7
}
 
QByteArray Temp;
Temp = QByteArray(QString(t_Data + "\n").toAscii());
Temp = QByteArray(t_Data.toAscii());
 
TCP_Socket->write(Temp);
TCP_Socket->flush();
141,10 → 140,8
void Input_TCP::slot_TCP_ReadLine()
{
// QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n'));
QString t_Data = s_Buffer + QString(TCP_Socket->readAll());
QString t_Data = QString(TCP_Socket->readAll());
 
s_Buffer = "";
 
QStringList l_Data;
l_Data = t_Data.split('\n');
 
151,15 → 148,11
for (int z = 0; z < l_Data.count(); z++)
{
 
if ((l_Data[z][l_Data[z].length() - 1] == '\r'))
if ((l_Data[z].length() > 3) && (t_Data[l_Data[z].length() - 1] == '\r'))
{
emit(sig_NewData(l_Data[z]));
// qDebug(QString("DATA: _" + l_Data[z] + "_ < END").toLatin1().data());
}
else
{
s_Buffer = s_Buffer + l_Data[z];
}
}
}
 
/QMK-Groundstation/trunk/Global/Class_Input/Input_TCP.h
48,7 → 48,6
QTimer *Timer;
bool b_Open;
s_Resend Confirm[MAX_Confirm];
QString s_Buffer;
 
private slots:
// void slot_newDataReceived(const QByteArray &dataReceived);
/QMK-Groundstation/trunk/QMK-Communicator/Defines.h
24,7 → 24,7
#include "../Global/Kopter.h"
 
static const QString QA_NAME = "QMK-Communicator";
static const QString QA_VERSION_NR = "1.1.5";
static const QString QA_VERSION_NR = "1.1.4";
 
#ifdef _BETA_
static const QString QA_VERSION = QA_VERSION_NR + " (BETA)";
32,7 → 32,7
static const QString QA_VERSION = QA_VERSION_NR;
#endif
 
static const QString QA_DATE = "02.12.2009";
static const QString QA_DATE = "30.11.2009";
static const QString QA_YEAR = "2008-2009";
 
static const QString QA_ABOUT =
/QMK-Groundstation/trunk/QMK-Communicator/Dialogs/dlg_Main.cpp
28,7 → 28,6
{
setupUi(this);
 
s_Buffer = "";
o_Settings = new cSettings();
 
o_Input = new Input();
753,7 → 752,7
connect(o_Input, SIGNAL(sig_NewData(QString)), this, SLOT(slot_Input_Data(QString)));
 
o_Input->send_Data(HandlerIP::make_Frame(ID_COMMUNICATOR, 101, QA_NAME + " " + QA_VERSION));
o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION);
// o_Input->send_Data(HandlerMK::make_Frame('v', 0, c_Data, 0).toLatin1().data(), DATA_VERSION);
btn_Connect->setText(tr("Trennen"));
}
 
854,16 → 853,14
ID = ID;
 
// QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n'));
QString t_Data = s_Buffer + QString(Socket->readAll());
s_Buffer = "";
QString t_Data = QString(Socket->readAll());
 
QStringList l_Data = t_Data.split('\n');
QStringList l_Data = t_Data.split('\r');
 
for (int z = 0; z < l_Data.count(); z++)
{
if ((l_Data[z][l_Data[z].length() - 1] == '\r'))
if ((l_Data[z].length() > 3))
{
l_Data[z].remove(QChar('\r'));
if (l_Data[z][0] == '$')
{
parse_TCP_Server_Data(l_Data[z], ID);
878,12 → 875,6
}
}
}
else
{
qDebug("Ohne Ende");
s_Buffer = s_Buffer + l_Data[z];
}
 
}
 
/*
/QMK-Groundstation/trunk/QMK-Communicator/Dialogs/dlg_Main.h
77,7 → 77,6
// TCP Server und Socket.
QTcpServer *TCP_Server;
QTcpSocket *o_TCP[DEV_IP_MAX];
QString s_Buffer;
 
//Liste alle IP-Verbindungen und deren Parameter.
int Connect_Count;