mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
b server visa
This commit is contained in:
@@ -18,7 +18,7 @@ Visa::Visa(QObject *parent)
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
QObject::connect(m_tcp_socket, &QTcpSocket::readyRead, this, [=, this] {
|
QObject::connect(m_tcp_socket, &QTcpSocket::readyRead, this, [=, this] {
|
||||||
m_data = QString::fromUtf8(m_tcp_socket->read(1024));
|
m_data = QString::fromUtf8(m_tcp_socket->readAll());
|
||||||
m_data_ready = true;
|
m_data_ready = true;
|
||||||
emit s_data_ready(m_data);
|
emit s_data_ready(m_data);
|
||||||
});
|
});
|
||||||
@@ -64,7 +64,7 @@ QString Visa::query(QString data)
|
|||||||
uint32_t counter = 0;
|
uint32_t counter = 0;
|
||||||
m_data.clear();
|
m_data.clear();
|
||||||
send(data);
|
send(data);
|
||||||
while (!m_data_ready || counter > 1024)
|
while (!m_data_ready && counter < 1024)
|
||||||
{
|
{
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
counter++;
|
counter++;
|
||||||
|
|||||||
Reference in New Issue
Block a user