From 98ef1336b6b52d56a75b6af9c5a92b1583f2b126 Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Fri, 6 Mar 2026 23:22:23 +0100 Subject: use new url for profile, add more garbage --- main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 01b4e60..9e2094c 100644 --- a/main.cpp +++ b/main.cpp @@ -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 x_profile(size_t(img_width), 0.); QList 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(); -- cgit v1.3