diff options
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -91,7 +91,8 @@ int main( // QNetworkRequest profileRequest(QUrl("http://rpizero:8081/v1/profile")); // QNetworkRequest pixelsRequest(QUrl("http://radxa:8081/v1/pixels")); QNetworkRequest pixelsRequest(QUrl("http://radxa:8080/v1/pixels")); - QNetworkRequest profileRequest(QUrl("http://radxa:8081/v1/profile")); + QNetworkRequest profileRequest(QUrl("http://radxa:8080/v1/profile")); + // QNetworkRequest profileRequest(QUrl("http://radxa:80/v1/profile")); auto manager = new QNetworkAccessManager(&app); QTimer pixelsAutoRestartTimer(&app); @@ -105,6 +106,7 @@ int main( profileAutoRestartTimer.setInterval(500); profileAutoRestartTimer.setSingleShot(false); QObject::connect(&profileAutoRestartTimer, &QTimer::timeout, [&]() { + qDebug() << "SEND PROFILE REQUEST"; manager->get(profileRequest); }); @@ -260,10 +262,11 @@ int main( prev_y_profile = y_pixels; } else if (reply->url().toString().endsWith("profile")) { + qDebug() << "GOT PROFILE"; ++profilePacketCounter; auto json = QJsonDocument::fromJson(reply->readAll()).object(); auto jsonProfile = json["profile"].toObject(); - auto jsonPointsMm = jsonProfile["pointsMm"].toArray(); + auto jsonPointsMm = json["pointsMm"].toArray(); QList<qreal> x_profile(size_t(img_width), 0.); QList<qreal> y_profile(size_t(img_width), 0.); @@ -287,8 +290,10 @@ int main( profileGraph->setData(x_profile, y_profile); // pixelsGraph->setData(x_profile, y_profile); + qDebug() << "SEND PROFILE REQUEST1"; manager->get(profileRequest); profileAutoRestartTimer.start(); + qDebug() << "START PROFILE TIMER"; } else { qDebug() << "unknown reply type"; } @@ -302,6 +307,7 @@ int main( manager->get(pixelsRequest); pixelsAutoRestartTimer.start(); + qDebug() << "SEND PROFILE REQUEST2"; manager->get(profileRequest); // profileAutoRestartTimer.start(); |
