Skip to content

Commit

Permalink
build: update to CMakeModules 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
higaski committed Apr 17, 2024
1 parent 19c57e2 commit 5e63dc0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ endif()
FetchContent_Declare(
CMakeModules
GIT_REPOSITORY https://github.com/ZIMO-Elektronik/CMakeModules
GIT_TAG v0.7.0
GIT_TAG v0.8.0
SOURCE_DIR ${CMAKE_BINARY_DIR}/CMakeModules)
FetchContent_MakeAvailable(CMakeModules)

Expand Down Expand Up @@ -57,7 +57,7 @@ target_compile_definitions(
DCC_TX_MIN_PREAMBLE_BITS=${DCC_TX_MIN_PREAMBLE_BITS}
DCC_TX_DEQUE_SIZE=${DCC_TX_DEQUE_SIZE})

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
if(PROJECT_IS_TOP_LEVEL)
target_include_directories(DCC INTERFACE include)
target_compile_options(DCC
INTERFACE -Werror;-Wno-error=deprecated-declarations)
Expand Down
2 changes: 1 addition & 1 deletion examples/repl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ add_executable(DCCReplExample ${SRC})

target_common_warnings(DCCReplExample PRIVATE)

cpmaddpackage(gh:daniele77/cli@2.1.0)
cpmaddpackage("gh:daniele77/cli@2.1.0")

target_link_libraries(DCCReplExample PRIVATE cli::cli DCC::DCC)
4 changes: 2 additions & 2 deletions include/dcc/rx/crtp_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ struct CrtpBase : bidi::CrtpBase<T> {
if (!(bytes[0uz] & 0b0000'1111u)) speed = 0;
// Emergency stop
else if (!(bytes[0uz] & 0b0000'1110u)) return impl().emergencyStop(addr);
else speed = (bytes[0uz] & 0b0000'1111) - 1;
else speed = static_cast<int32_t>(bytes[0uz] & 0b0000'1111u) - 1;

// 14 speed steps and F0
if (_f0_exception) {
Expand All @@ -464,7 +464,7 @@ struct CrtpBase : bidi::CrtpBase<T> {
: 0u};
impl().function(addr, mask, state);
}
// 28 speed steps
// 28 speed steps with intermediate
else {
speed <<= 1u;
if (speed && !(bytes[0uz] & ztl::make_mask(4u))) --speed;
Expand Down

0 comments on commit 5e63dc0

Please sign in to comment.