From 3a0137b045c817516b2341931ad9128fa70a1fd5 Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Thu, 13 Nov 2025 12:12:42 +0100 Subject: use new HttpServer::GET_pixels from orpheus --- main.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index c228b2c..d582972 100644 --- a/main.cpp +++ b/main.cpp @@ -90,7 +90,8 @@ int main( // QNetworkRequest profileRequest(QUrl("http://rpi5:8081/v1/profile")); // QNetworkRequest pixelsRequest(QUrl("http://rpizero:8081/v1/pixels")); // QNetworkRequest profileRequest(QUrl("http://rpizero:8081/v1/profile")); - QNetworkRequest pixelsRequest(QUrl("http://radxa:8081/v1/pixels")); + // QNetworkRequest pixelsRequest(QUrl("http://radxa:8081/v1/pixels")); + QNetworkRequest pixelsRequest(QUrl("http://radxa:8080/v1/pixels")); QNetworkRequest profileRequest(QUrl("http://radxa:8081/v1/profile")); auto manager = new QNetworkAccessManager(&app); @@ -130,11 +131,11 @@ int main( &QNetworkAccessManager::finished, [&](QNetworkReply* reply) { // qDebug() << "replyFinished"; - QElapsedTimer t; - t.start(); + // QElapsedTimer t; + // t.start(); if (reply->error()) { - qDebug() << "replyFinished with error:" << reply->errorString(); + // qDebug() << "replyFinished with error:" << reply->errorString(); // qDebug() << "url was:" << reply->request().url(); reply->deleteLater(); @@ -154,9 +155,10 @@ int main( // y_profile.clear(); - qDebug() << "pc" << jsonPixels.count() << json.isEmpty() - << doc.isObject(); + // qDebug() << "pc" << jsonPixels.count() << json.isEmpty() + // << doc.isObject(); // qDebug().noquote() << QString::fromUtf8(ra); + qDebug() << "pixels reply size:" << ra.size(); for (int i = 0; i < jsonPixels.count(); ++i) { @@ -231,7 +233,7 @@ int main( } else { - qDebug() << "set lines. count is" << lines.count(); + // qDebug() << "set lines. count is" << lines.count(); // pixelsCustomPlot->setLines(lines); } @@ -294,7 +296,7 @@ int main( reply->deleteLater(); - qDebug() << "reply processed for" << t.nsecsElapsed() / 1000 << "(us)"; + // qDebug() << "reply processed for" << t.nsecsElapsed() / 1000 << "(us)"; } ); @@ -302,7 +304,7 @@ int main( pixelsAutoRestartTimer.start(); manager->get(profileRequest); - profileAutoRestartTimer.start(); + // profileAutoRestartTimer.start(); // auto pixelsRequestFuture = QtConcurrent::run([&](){ // QThread::sleep(1); -- cgit v1.2.3-70-g09d2