diff --git a/hgx11.cpp b/hgx11.cpp index 48a6cae..2bf06d3 100644 --- a/hgx11.cpp +++ b/hgx11.cpp @@ -176,7 +176,7 @@ void hgx11::_activity() void hgx11::_setImgSize() { _hclient_p->imgCmdBuf.clear(); - _hclient_p->imgCmdBuf.append("{"command":"image","priority":").append(_hyperionPriority_m.toUtf8()).append(","imageheight":"); + _hclient_p->imgCmdBuf.append("{\"command\":\"image\",\"priority\":").append(_hyperionPriority_m.toUtf8()).append(",\"imageheight\":"); _hclient_p->imgCmdBuf.append(QString::number(_grabber_p->getDest_height()).toUtf8()); _hclient_p->imgCmdBuf.append(",\"imagewidth\":"); _hclient_p->imgCmdBuf.append(QString::number(_grabber_p->getDest_width()).toUtf8()); diff --git a/hgx11net.cpp b/hgx11net.cpp index ba5aacf..929016a 100644 --- a/hgx11net.cpp +++ b/hgx11net.cpp @@ -25,7 +25,7 @@ hgx11net::~hgx11net() void hgx11net::clearLeds() { _cmd_m.clear(); - _cmd_m.append("{"command": "clearall","priority":").append(_priority_m.toUtf8()).append("}\n"); + _cmd_m.append("{\"command\": \"clearall\",\"priority\":").append(_priority_m.toUtf8()).append("}\n"); _sendCommand(); } @@ -81,6 +81,7 @@ void hgx11net::_sendCommand() if (!_isConnected()) { return; } + qDebug() << "Sending command: " << _cmd_m; _sock_p->write(_cmd_m); while (_sock_p->bytesToWrite()) { _sock_p->waitForBytesWritten(); @@ -166,7 +167,7 @@ void hgx11net::_temperatureAdjustment() return; } _cmd_m.clear(); - _cmd_m.append("{\"command\":\"temperature\",\"priority\": + _cmd_m.append("{\"command\":\"temperature\",\"priority\":"); _cmd_m.append(_temperature_m.toUtf8()); _cmd_m.append("}}\n"); _sendCommand();