From a688e436f03309d5813b68a375f694412018ca0b Mon Sep 17 00:00:00 2001 From: Nikita Kostovsky Date: Thu, 26 Feb 2026 16:33:12 +0100 Subject: add sync moveSteps --- src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 01e4eac..208004f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,7 @@ #include "camera/veyeimx287m.h" #include "dumps.h" #include "imagealgos.h" +#include "printerclient.h" #include "profile.h" #include "protocols/httpserver.h" #include "scanner.h" @@ -88,6 +89,8 @@ int main(int argc, char *argv[]) std::signal(s, SIG_DFL); }; + qDebug() << "sizeof(Pixels):" << sizeof(Pixels); + std::signal(SIGINT, sigHandler); std::signal(SIGTERM, sigHandler); @@ -211,6 +214,8 @@ int main(int argc, char *argv[]) scanner->startAllProtocols(); + Esp32Stand stand{QHostAddress{"192.168.18.248"}, 80, 1600}; + QHttpServer qHttpServer; qHttpServer.route("/v1/profile", [&]() -> QHttpServerResponse { @@ -274,7 +279,12 @@ int main(int argc, char *argv[]) qDebug() << "send gCode:" << command; + // WARNING: tmp logic + auto distanceMm = command.split(' ').at(1); + distanceMm.remove(0, 1); + // printerClient.sendCommand(command); + stand.moveMm(distanceMm.toInt()); return QHttpServerResponse::StatusCode::Ok; }); -- cgit v1.3