summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt25
-rw-r--r--src/camera/veyeimx287m.cpp22
-rw-r--r--src/httpservice.cpp12
3 files changed, 33 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7001301..80c3782 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,31 @@ set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_SYSROOT}/usr/include")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
+macro(_add_imported_target target_name file)
+ if (NOT EXISTS "${file}")
+ message(FATAL_ERROR "The imported target \"${target_name}\" references the file \"${file}\" but this file does not exist.")
+ endif()
+
+ if (NOT TARGET ${target_name})
+ add_executable(${target_name} IMPORTED)
+ set_target_properties(${target_name} PROPERTIES IMPORTED_LOCATION ${file})
+ endif()
+endmacro()
+
+# use the host versions of these executables
+if (false)
+_add_imported_target(Qt6::moc "/usr/lib64/qt6/libexec/moc")
+_add_imported_target(Qt6::rcc "/usr/lib64/qt6/libexec/rcc")
+_add_imported_target(Qt6::cmake_automoc_parser "/usr/lib64/qt6/libexec/cmake_automoc_parser")
+_add_imported_target(Qt6::tracegen "/usr/lib64/qt6/libexec/tracegen")
+_add_imported_target(Qt6::qlalr "/usr/lib64/qt6/libexec/qlalr")
+_add_imported_target(Qt6::qtpaths "/usr/lib64/qt6/bin/qtpaths")
+_add_imported_target(Qt6::qmake "/usr/lib64/qt6/bin/qmake6")
+_add_imported_target(Qt6::androiddeployqt "/tmp/androiddeployqt")
+_add_imported_target(Qt6::androidtestrunner "/tmp/androidtestrunner")
+# _add_imported_target(Qt6::moc "/usr/lib64/qt6/libexec/moc")
+# _add_imported_target(Qt6::qmake "/usr/lib64/qt6/bin/qmake6")
+endif()
# NOTE: /aarch64-none-linux-gnu/bin/ld: cannot find -lm: No such file or directory
# DOESN'T WORK sudo apt install build-essential
diff --git a/src/camera/veyeimx287m.cpp b/src/camera/veyeimx287m.cpp
index 3f3a9e6..b8fdbb4 100644
--- a/src/camera/veyeimx287m.cpp
+++ b/src/camera/veyeimx287m.cpp
@@ -16,11 +16,7 @@
#include <QElapsedTimer>
-<<<<<<< Updated upstream
-// orpheus
-=======
#include "camera/veye_i2c.h"
->>>>>>> Stashed changes
#include "constants.h"
#include "httpservice.h"
#include "imagealgos.h"
@@ -654,7 +650,6 @@ bool VeyeIMX287m::initCam()
return true;
}
-<<<<<<< Updated upstream
bool VeyeIMX287m::initHttpServer()
{
m_httpServer = std::make_shared<HttpServer>(this);
@@ -662,23 +657,6 @@ bool VeyeIMX287m::initHttpServer()
return m_httpServer != nullptr;
}
-void VeyeIMX287m::dequeueFrameLoop(std::stop_token stopToken)
-{
- // std::cout << "VeyeIMX287m: start stream" << std::endl;
-
- // while (!stopToken.stop_requested()) {
- // size_t imageIndex{};
-
- // if (!dequeueImageBuffer(imageIndex))
- // // break;
- // continue;
- // }
-
- // std::cout << "VeyeIMX287m: stream interruption requested" << std::endl;
-}
-
-=======
->>>>>>> Stashed changes
void VeyeIMX287m::calcFrameLoop(std::stop_token stopToken)
{
QElapsedTimer t;
diff --git a/src/httpservice.cpp b/src/httpservice.cpp
index 14cf60d..efcf17f 100644
--- a/src/httpservice.cpp
+++ b/src/httpservice.cpp
@@ -44,10 +44,14 @@ QHttpServerResponse HttpServer::GET_pixels()
// std::shared_ptr<std::nullptr_t> logTime = std::make_shared<std::nullptr_t>(nullptr, [t]() {
// qDebug() << "HttpServer::GET_pixels: elapsed" << t.nsecsElapsed() / 1000 << "(us)";
// });
- const std::shared_ptr<std::nullptr_t> logTime{nullptr, [t](auto unused_ptr) {
- qDebug() << "HttpServer::GET_pixels: elapsed"
- << t.nsecsElapsed() / 1000 << "(us)";
- }};
+ static constexpr bool logTime{false};
+ if constexpr (logTime) {
+ const std::shared_ptr<std::nullptr_t>
+ timeLogger{nullptr, [t](auto unused_ptr) {
+ qDebug() << "HttpServer::GET_pixels: elapsed" << t.nsecsElapsed() / 1000
+ << "(us)";
+ }};
+ }
Image img;
{