mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Remove max LED number constraint from Matrix layout (#1805)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// project includes
|
||||
#include "JsonClientConnection.h"
|
||||
#include <api/JsonAPI.h>
|
||||
#include <api/JsonCallbacks.h>
|
||||
|
||||
// qt inc
|
||||
#include <QTcpSocket>
|
||||
@@ -17,8 +18,9 @@ JsonClientConnection::JsonClientConnection(QTcpSocket *socket, bool localConnect
|
||||
// create a new instance of JsonAPI
|
||||
_jsonAPI = new JsonAPI(socket->peerAddress().toString(), _log, localConnection, this);
|
||||
// get the callback messages from JsonAPI and send it to the client
|
||||
connect(_jsonAPI, &JsonAPI::callbackMessage, this , &JsonClientConnection::sendMessage);
|
||||
connect(_jsonAPI, &JsonAPI::callbackReady, this , &JsonClientConnection::sendMessage);
|
||||
connect(_jsonAPI, &JsonAPI::forceClose, this , [&](){ _socket->close(); } );
|
||||
connect(_jsonAPI->getCallBack().get(), &JsonCallbacks::callbackReady, this, &JsonClientConnection::sendMessage);
|
||||
|
||||
_jsonAPI->initialize();
|
||||
}
|
||||
@@ -47,7 +49,8 @@ void JsonClientConnection::readRequest()
|
||||
qint64 JsonClientConnection::sendMessage(QJsonObject message)
|
||||
{
|
||||
QJsonDocument writer(message);
|
||||
QByteArray data = writer.toJson(QJsonDocument::Compact) + "\n";
|
||||
QByteArray data = writer.toJson(QJsonDocument::Compact);
|
||||
data.append('\n');
|
||||
|
||||
if (!_socket || (_socket->state() != QAbstractSocket::ConnectedState)) return 0;
|
||||
return _socket->write(data.data(), data.size());
|
||||
|
Reference in New Issue
Block a user