From f213318d528e7fc652d6c8eb7672619d27a95d0c Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Thu, 18 Jan 2024 06:46:50 +0100 Subject: [PATCH] Introduce include/src directories and cleaning up main folder structure. --- CMakeLists.txt | 12 +++++++----- bno085.h => include/bno085.h | 0 bno085_exception.h => include/bno085_exception.h | 0 bno085_hal.h => include/bno085_hal.h | 0 gpio-sysfs.h => include/gpio-sysfs.h | 0 spi.h => include/spi.h | 0 bno085.cpp => src/bno085.cpp | 0 bno085_hal.cpp => src/bno085_hal.cpp | 0 gpio-sysfs.cpp => src/gpio-sysfs.cpp | 0 main.cpp => src/main.cpp | 0 spi.cpp => src/spi.cpp | 0 11 files changed, 7 insertions(+), 5 deletions(-) rename bno085.h => include/bno085.h (100%) rename bno085_exception.h => include/bno085_exception.h (100%) rename bno085_hal.h => include/bno085_hal.h (100%) rename gpio-sysfs.h => include/gpio-sysfs.h (100%) rename spi.h => include/spi.h (100%) rename bno085.cpp => src/bno085.cpp (100%) rename bno085_hal.cpp => src/bno085_hal.cpp (100%) rename gpio-sysfs.cpp => src/gpio-sysfs.cpp (100%) rename main.cpp => src/main.cpp (100%) rename spi.cpp => src/spi.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3528bd..8443d1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,14 +8,16 @@ find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(sensor_msgs REQUIRED) ########################################################################## +include_directories(${PIKA_SPARK_BNO085_TARGET} include) +########################################################################## add_subdirectory(sh2) ########################################################################## add_executable(${PIKA_SPARK_BNO085_TARGET} - main.cpp - bno085.cpp - bno085_hal.cpp - spi.cpp - gpio-sysfs.cpp + src/main.cpp + src/bno085.cpp + src/bno085_hal.cpp + src/spi.cpp + src/gpio-sysfs.cpp ) ########################################################################## if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") diff --git a/bno085.h b/include/bno085.h similarity index 100% rename from bno085.h rename to include/bno085.h diff --git a/bno085_exception.h b/include/bno085_exception.h similarity index 100% rename from bno085_exception.h rename to include/bno085_exception.h diff --git a/bno085_hal.h b/include/bno085_hal.h similarity index 100% rename from bno085_hal.h rename to include/bno085_hal.h diff --git a/gpio-sysfs.h b/include/gpio-sysfs.h similarity index 100% rename from gpio-sysfs.h rename to include/gpio-sysfs.h diff --git a/spi.h b/include/spi.h similarity index 100% rename from spi.h rename to include/spi.h diff --git a/bno085.cpp b/src/bno085.cpp similarity index 100% rename from bno085.cpp rename to src/bno085.cpp diff --git a/bno085_hal.cpp b/src/bno085_hal.cpp similarity index 100% rename from bno085_hal.cpp rename to src/bno085_hal.cpp diff --git a/gpio-sysfs.cpp b/src/gpio-sysfs.cpp similarity index 100% rename from gpio-sysfs.cpp rename to src/gpio-sysfs.cpp diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/spi.cpp b/src/spi.cpp similarity index 100% rename from spi.cpp rename to src/spi.cpp