From f4acd39118e8441c5a573296c1b02cae1342761d Mon Sep 17 00:00:00 2001 From: Vincent Hamp Date: Fri, 23 Jun 2023 11:55:01 +0200 Subject: [PATCH 1/4] Fix weird phrasing in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 04571fa..2d2b020 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ set(DCC_RX_QUEUE_SIZE ``` ### Build -If the library is built locally then the tests and a REPL example will be generated. +If the build is running as a top-level CMake project then tests and a REPL example will be generated. ```sh cmake -Bbuild cmake --build build --target DCCReplExample From 6e63ca07eade62c618cb849076c8fd36c10d3f46 Mon Sep 17 00:00:00 2001 From: Vincent Hamp Date: Fri, 23 Jun 2023 13:46:21 +0200 Subject: [PATCH 2/4] Use version from git describe --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e9d419..6bb4d79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,13 +6,14 @@ if(NOT CMAKE_BUILD_EARLY_EXPANSION) FetchContent_Declare( CMakeModules GIT_REPOSITORY https://github.com/ZIMO-Elektronik/CMakeModules - GIT_TAG v0.0.5 + GIT_TAG v0.0.7 SOURCE_DIR ${CMAKE_BINARY_DIR}/CMakeModules) FetchContent_MakeAvailable(CMakeModules) + version_from_git() project( DCC - VERSION 0.27.0 + VERSION ${VERSION_FROM_GIT} LANGUAGES C CXX) endif() From 21fdc7334b1ef9c875d3d1cb04cdccca22a2dc98 Mon Sep 17 00:00:00 2001 From: Vincent Hamp Date: Fri, 23 Jun 2023 14:55:38 +0200 Subject: [PATCH 3/4] Actions must fetch tags --- .github/workflows/build.yml | 1 + .github/workflows/tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1384882..bbf09c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,5 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: git fetch --unshallow --tags - run: cmake -Bbuild - run: cmake --build build \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index caf36fa..09a06bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: git fetch --unshallow --tags - run: cmake -Bbuild - run: cmake --build build --target DCCTests - run: ctest --test-dir build --schedule-random \ No newline at end of file From d14ead0800fd504de60b2eb4864d5b5027158291 Mon Sep 17 00:00:00 2001 From: Vincent Hamp Date: Fri, 23 Jun 2023 17:48:03 +0200 Subject: [PATCH 4/4] Add IDF Component Manager to README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 2d2b020..e11571b 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,14 @@ FetchContent_Declare( target_link_libraries(YourTarget PRIVATE DCC::DCC) ``` +For the ESP32 there is also the possibility to integrate the library via the [IDF Component Manager](https://docs.espressif.com/projects/idf-component-manager/en/latest/) by adding it to a `idf_component.yml` file. +```yaml +dependencies: + dcc: + version: v0.27.0 + git: https://github.com/ZIMO-Elektronik/DCC.git +``` + A number of [options](CMakeLists.txt) are provided to configure various sizes such as the receiver queue length or the maximum packet length. When RAM becomes scarce, queue lengths can be reduced. On the other hand, if the processing of the commands is too slow and cannot be done every few milliseconds, it can make sense to lengthen the queues and batch process several commands at once. Otherwise, we recommend sticking with the defaults. ```cmake set(DCC_RX_QUEUE_SIZE