diff --git a/CMakeLists.txt b/CMakeLists.txt index bbe3886..3f8bf58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,3 @@ -idf_component_register(SRCS BNO08x.cpp - INCLUDE_DIRS . +idf_component_register(SRC_DIRS "source" "tests" + INCLUDE_DIRS "include" "tests" REQUIRES driver esp_timer) diff --git a/BNO08x.hpp b/include/BNO08x.hpp similarity index 98% rename from BNO08x.hpp rename to include/BNO08x.hpp index 9378d2a..b41f91b 100644 --- a/BNO08x.hpp +++ b/include/BNO08x.hpp @@ -10,6 +10,7 @@ #include #include #include +#include #include // standard library includes @@ -88,7 +89,8 @@ typedef struct bno08x_config_t class BNO08x { public: - BNO08x(bno08x_config_t imu_config = default_imu_config); + BNO08x(bno08x_config_t imu_config = bno08x_config_t()); + ~BNO08x(); bool initialize(); bool hard_reset(); @@ -327,8 +329,6 @@ class BNO08x void print_header(bno08x_rx_packet_t* packet); void print_packet(bno08x_rx_packet_t* packet); - static bno08x_config_t default_imu_config; ///< default imu config settings - EventGroupHandle_t evt_grp_spi; ///