This repository was archived by the owner on May 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ project(libhal-rmd VERSION 0.0.1 LANGUAGES CXX)
1818
1919find_package (libhal REQUIRED CONFIG )
2020find_package (libhal-util REQUIRED CONFIG )
21+ find_package (libhal-canrouter REQUIRED CONFIG )
2122
2223add_library (libhal-rmd
2324 src/drc.cpp
@@ -31,6 +32,7 @@ target_compile_features(libhal-rmd PRIVATE cxx_std_20)
3132target_link_libraries (libhal-rmd PRIVATE
3233 libhal::libhal
3334 libhal::util
35+ libhal::canrouter
3436)
3537
3638if (NOT BUILD_TESTING STREQUAL OFF )
Original file line number Diff line number Diff line change 2525
2626class libhal_rmd_conan (ConanFile ):
2727 name = "libhal-rmd"
28- version = "3.0.0 "
28+ version = "3.0.1 "
2929 license = "Apache-2.0"
3030 url = "https://github.com/conan-io/conan-center-index"
3131 homepage = "https://libhal.github.io/libhal-rmd"
@@ -74,7 +74,8 @@ def lazy_lt_semver(v1, v2):
7474
7575 def requirements (self ):
7676 self .requires ("libhal/[^2.0.0]" )
77- self .requires ("libhal-util/[^2.0.0]" )
77+ self .requires ("libhal-util/[^3.0.0]" )
78+ self .requires ("libhal-canrouter/[^1.0.0]" )
7879 self .test_requires ("libhal-mock/[^2.0.0]" )
7980 self .test_requires ("boost-ext-ut/1.1.9" )
8081
Original file line number Diff line number Diff line change @@ -27,9 +27,8 @@ def build_requirements(self):
2727
2828 def requirements (self ):
2929 if str (self .options .platform ).startswith ("lpc40" ):
30- self .requires ("libhal-lpc40/[^2.0.0]" )
31- self .requires ("libhal-util/[^2.0.0]" )
32- self .requires ("libhal-rmd/2.0.0" )
30+ self .requires ("libhal-lpc40/[^2.1.1]" )
31+ self .requires ("libhal-rmd/3.0.1" )
3332
3433 def layout (self ):
3534 platform_directory = "build/" + str (self .options .platform )
Original file line number Diff line number Diff line change 1616
1717#include < cstdint>
1818
19- #include < libhal-util/can .hpp>
19+ #include < libhal-canrouter/can_router .hpp>
2020#include < libhal/can.hpp>
2121#include < libhal/motor.hpp>
2222#include < libhal/rotation_sensor.hpp>
Original file line number Diff line number Diff line change 1616
1717#include < cstdint>
1818
19- #include < libhal-util/can .hpp>
19+ #include < libhal-canrouter/can_router .hpp>
2020#include < libhal/can.hpp>
2121#include < libhal/motor.hpp>
2222#include < libhal/rotation_sensor.hpp>
Original file line number Diff line number Diff line change @@ -303,14 +303,14 @@ void drc::operator()(const can::message_t& p_message)
303303 case hal::value (read::multi_turns_angle): {
304304 auto & data = p_message.payload ;
305305
306- m_feedback.raw_multi_turn_angle = hal::bit::value (0U )
307- .insert <bit:: byte_m<0 >>(data[1 ])
308- .insert <bit:: byte_m<1 >>(data[2 ])
309- .insert <bit:: byte_m<2 >>(data[3 ])
310- .insert <bit:: byte_m<3 >>(data[4 ])
311- .insert <bit:: byte_m<4 >>(data[5 ])
312- .insert <bit:: byte_m<5 >>(data[6 ])
313- .insert <bit:: byte_m<6 >>(data[7 ])
306+ m_feedback.raw_multi_turn_angle = hal::bit_value (0U )
307+ .insert <byte_m<0 >>(data[1 ])
308+ .insert <byte_m<1 >>(data[2 ])
309+ .insert <byte_m<2 >>(data[3 ])
310+ .insert <byte_m<3 >>(data[4 ])
311+ .insert <byte_m<4 >>(data[5 ])
312+ .insert <byte_m<5 >>(data[6 ])
313+ .insert <byte_m<6 >>(data[7 ])
314314 .to <std::int64_t >();
315315 break ;
316316 }
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ find_package(ut REQUIRED CONFIG)
2424find_package (libhal REQUIRED CONFIG )
2525find_package (libhal-util REQUIRED CONFIG )
2626find_package (libhal-mock REQUIRED CONFIG )
27+ find_package (libhal-canrouter REQUIRED CONFIG )
2728
2829add_executable (${PROJECT_NAME}
2930
@@ -65,4 +66,5 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
6566 boost-ext-ut::ut
6667 libhal::libhal
6768 libhal::util
68- libhal::mock )
69+ libhal::mock
70+ libhal::canrouter )
Original file line number Diff line number Diff line change 1818
1919#include < libhal-mock/can.hpp>
2020#include < libhal-mock/steady_clock.hpp>
21+ #include < libhal-util/can.hpp>
2122#include < libhal-util/enum.hpp>
2223
2324#include < boost/ut.hpp>
You can’t perform that action at this time.
0 commit comments