summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-11-13 12:12:42 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2025-11-13 12:12:42 +0100
commit3a0137b045c817516b2341931ad9128fa70a1fd5 (patch)
treedcc4df61eb02cdcb582e5eec56829dbdcb6e48f1 /main.cpp
parent5e2c92325605919ad06ab634add74b7e58d21727 (diff)
use new HttpServer::GET_pixels from orpheus
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp20
1 files changed, 11 insertions, 9 deletions
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);