Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 714 → Rev 715

/QMK-Groundstation/trunk/Global/Class_Input/Input_TCP.cpp
22,6 → 22,7
{
b_Open = false;
Timer = new QTimer();
s_Buffer = "";
connect(Timer, SIGNAL(timeout()), this, SLOT(slot_Timer()));
 
for (int z = 0; z < MAX_Confirm; z++)
78,7 → 79,7
}
 
QByteArray Temp;
Temp = QByteArray(t_Data.toAscii());
Temp = QByteArray(QString(t_Data + "\n").toAscii());
 
TCP_Socket->write(Temp);
TCP_Socket->flush();
140,8 → 141,10
void Input_TCP::slot_TCP_ReadLine()
{
// QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n'));
QString t_Data = QString(TCP_Socket->readAll());
QString t_Data = s_Buffer + QString(TCP_Socket->readAll());
 
s_Buffer = "";
 
QStringList l_Data;
l_Data = t_Data.split('\n');
 
148,11 → 151,15
for (int z = 0; z < l_Data.count(); z++)
{
 
if ((l_Data[z].length() > 3) && (t_Data[l_Data[z].length() - 1] == '\r'))
if ((l_Data[z][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,6 → 48,7
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/Dialogs/dlg_Main.cpp
28,6 → 28,7
{
setupUi(this);
 
s_Buffer = "";
o_Settings = new cSettings();
 
o_Input = new Input();
752,7 → 753,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"));
}
 
853,14 → 854,16
ID = ID;
 
// QString t_Data = QString(TCP_Socket->readLine(TCP_Socket->bytesAvailable())).remove(QChar('\n'));
QString t_Data = QString(Socket->readAll());
QString t_Data = s_Buffer + QString(Socket->readAll());
s_Buffer = "";
 
QStringList l_Data = t_Data.split('\r');
QStringList l_Data = t_Data.split('\n');
 
for (int z = 0; z < l_Data.count(); z++)
{
if ((l_Data[z].length() > 3))
if ((l_Data[z][l_Data[z].length() - 1] == '\r'))
{
l_Data[z].remove(QChar('\r'));
if (l_Data[z][0] == '$')
{
parse_TCP_Server_Data(l_Data[z], ID);
875,6 → 878,12
}
}
}
else
{
qDebug("Ohne Ende");
s_Buffer = s_Buffer + l_Data[z];
}
 
}
 
/*
/QMK-Groundstation/trunk/QMK-Communicator/Dialogs/dlg_Main.h
77,6 → 77,7
// 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;
/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.4";
static const QString QA_VERSION_NR = "1.1.5";
 
#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 = "30.11.2009";
static const QString QA_DATE = "02.12.2009";
static const QString QA_YEAR = "2008-2009";
 
static const QString QA_ABOUT =