Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 7cf8a310

Přidáno uživatelem Miloslav Kovář před téměř 4 roky(ů)

Re #8630 - Server fixes

Zobrazit rozdíly:

deltarobot/curvedataserver.cpp
24 24
    connect(clientSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(onSocketStateChanged(QAbstractSocket::SocketState)));
25 25

  
26 26
    _sockets.push_back(clientSocket);
27
    for (QTcpSocket* socket : _sockets) {
28
        socket->write(QByteArray::fromStdString(clientSocket->peerAddress().toString().toStdString() + " connected to server !\n"));
29
    }
27

  
30 28
}
31 29

  
32 30
void CurveDataServer::onSocketStateChanged(QAbstractSocket::SocketState socketState)
......
93 91
void CurveDataServer::sendApplicatorPoint(float x, float y, float z)
94 92
{
95 93
    QByteArray message(18, 0);
96
    message[0] = 0x40;
97
    message[1] = 0x03;
94
    message[0] = 0x03;
95
    message[1] = 0x40;
98 96

  
99 97
    putFloatIntoMessage(&message, 2, x);
100 98
    putFloatIntoMessage(&message, 6, y);
......
105 103
            socket->write(message);
106 104
    }
107 105
    qDebug() << message.toHex();
106
    qDebug() << x << " " << y << " " << z;
108 107
}

Také k dispozici: Unified diff