diff --git a/CHANGELOG.md b/CHANGELOG.md index c3eaba6..bbd763d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,14 @@ ## 0.1.5 (2020-06-17) ------------------- -* Merged multiple small libraries into one "wrpsdk" +* Merged multiple small libraries into one "wrp_sdk" * Changed to "plain" project structure +* Contributors: Ruixiang Du ## 0.1.4 (2020-04-01) ------------------- * Added initial support of Hunter +* Contributors: Ruixiang Du ## 0.1.3 (2019-09-15) ------------------ diff --git a/CMakeLists.txt b/CMakeLists.txt index 090c846..ad8219c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.10.2) +project(wrp_sdk VERSION 0.1.5) find_program(CCACHE_PROGRAM ccache) if(CCACHE_PROGRAM) @@ -6,10 +7,11 @@ if(CCACHE_PROGRAM) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") endif() -project(wrp_sdk VERSION 0.1.5) - ## Project Options option(BUILD_TESTS ON) +option(STATIC_CHECK OFF) +# set(CMAKE_BUILD_TYPE Release) +# set(CMAKE_BUILD_TYPE Debug) ## Check if pkg is built with ROS catkin if(CATKIN_DEVEL_PREFIX) @@ -23,6 +25,14 @@ endif() ## Generate symbols for IDE indexer set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +if(STATIC_CHECK) + find_program(CPPCHECK cppcheck) + if(CPPCHECK) + message(STATUS "Found cppcheck") + set(CMAKE_CXX_CPPCHECK cppcheck;--std=c++11;--enable=all) + endif() +endif() + ## Additional cmake module path set(USER_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${USER_CMAKE_PATH}/modules") @@ -35,9 +45,6 @@ set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) ## Chosse build type -# set(CMAKE_BUILD_TYPE Release) -# set(CMAKE_BUILD_TYPE Debug) - set(default_build_type "Release") if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to '${default_build_type}' as none was specified.") @@ -63,9 +70,9 @@ endif() find_package(Threads REQUIRED) add_library(${PROJECT_NAME} - src/async_serial.cpp - src/async_can.cpp - src/asyncio_utils.cpp + src/asyncio/async_serial.cpp + src/asyncio/async_can.cpp + src/asyncio/asyncio_utils.cpp # agilex mobile platforms src/platforms/mobile_base.cpp src/platforms/hunter_base.cpp diff --git a/include/wrp_sdk/platforms/scout/scout_base.hpp b/include/wrp_sdk/platforms/scout/scout_base.hpp index 6ac6a4e..c859e36 100644 --- a/include/wrp_sdk/platforms/scout/scout_base.hpp +++ b/include/wrp_sdk/platforms/scout/scout_base.hpp @@ -48,7 +48,6 @@ class ScoutBase : public MobileBase { uint8_t tx_buffer_[SCOUT_CMD_BUF_LEN]; // cmd/status update related variables - std::thread cmd_thread_; std::mutex scout_state_mutex_; std::mutex motion_cmd_mutex_; std::mutex light_cmd_mutex_; @@ -57,9 +56,6 @@ class ScoutBase : public MobileBase { ScoutMotionCmd current_motion_cmd_; ScoutLightCmd current_light_cmd_; - - - bool light_ctrl_enabled_ = false; bool light_ctrl_requested_ = false; diff --git a/src/async_can.cpp b/src/asyncio/async_can.cpp similarity index 100% rename from src/async_can.cpp rename to src/asyncio/async_can.cpp diff --git a/src/async_serial.cpp b/src/asyncio/async_serial.cpp similarity index 100% rename from src/async_serial.cpp rename to src/asyncio/async_serial.cpp diff --git a/src/asyncio_utils.cpp b/src/asyncio/asyncio_utils.cpp similarity index 100% rename from src/asyncio_utils.cpp rename to src/asyncio/asyncio_utils.cpp diff --git a/src/asyncio_utils.hpp b/src/asyncio/asyncio_utils.hpp similarity index 100% rename from src/asyncio_utils.hpp rename to src/asyncio/asyncio_utils.hpp