diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2026-02-26 16:33:12 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2026-02-26 16:33:12 +0100 |
| commit | a688e436f03309d5813b68a375f694412018ca0b (patch) | |
| tree | 8a5cdbb170fbb8417de42a09832d2eaf527ff61e /src/main.cpp | |
| parent | 1664027209ea3b8eb327b7755e4111577e66a2ee (diff) | |
add sync moveSteps
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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; }); |
