From 36b65fdf0701f6d5a33c1e8a03a5807d21e22769 Mon Sep 17 00:00:00 2001 From: TimZnr Date: Thu, 3 Nov 2022 09:38:28 +0100 Subject: [PATCH] Move main method in own file instead of lfr.cpp --- CMakeLists.txt | 2 +- autonomous_mode_main.cpp | 9 +++++++++ lfr.cpp | 9 --------- 3 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 autonomous_mode_main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index ab2ae22..561fa4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ target_include_directories(ControlModule PRIVATE .) target_include_directories(Interpreter PRIVATE .) target_include_directories(IntersectionHandler PRIVATE .) -add_executable(lfr_image_processing lfr.cpp) +add_executable(lfr_image_processing lfr.cpp autonomous_mode_main.cpp) target_link_libraries( lfr_image_processing ${OpenCV_LIBS} Input Processing ControlModule Interpreter IntersectionHandler ) diff --git a/autonomous_mode_main.cpp b/autonomous_mode_main.cpp new file mode 100644 index 0000000..92a29b2 --- /dev/null +++ b/autonomous_mode_main.cpp @@ -0,0 +1,9 @@ +#include "lfr.h" + +int main(void) +{ + //Mat image1 = input.readFile("C:\\Line-Following-Robot\\Test_data\\*.jpeg"); + + LFR lfr; + lfr.startLoop(); +} \ No newline at end of file diff --git a/lfr.cpp b/lfr.cpp index 75a7f78..655ef0b 100644 --- a/lfr.cpp +++ b/lfr.cpp @@ -33,13 +33,4 @@ void LFR::startLoop() void LFR::endLoop() { std::cout<<"The loop has been started. You may not dare to tell it to stop."; -} - - -int main(void) -{ - //Mat image1 = input.readFile("C:\\Line-Following-Robot\\Test_data\\*.jpeg"); - - LFR lfr; - lfr.startLoop(); } \ No newline at end of file