Skip to content

Commit

Permalink
fixes for windows compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
SENAI-GilmarCorreia committed Oct 30, 2024
1 parent 7c89c17 commit f12076c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ double resolve_tolerance_source(const double default_value, const double goal_va
// * -1 - The tolerance is "erased".
// If there was a default, the joint will be allowed to move without restriction.
constexpr double ERASE_VALUE = -1.0;
auto is_erase_value = [](double value)
auto is_erase_value = [=](double value)
{ return fabs(value - ERASE_VALUE) < std::numeric_limits<float>::epsilon(); };

if (goal_value > 0.0)
Expand Down
10 changes: 10 additions & 0 deletions pid_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(-Wall -Wextra -Werror=conversion -Werror=unused-but-set-variable -Werror=return-type -Werror=shadow -Werror=format)
endif()

if(WIN32)
add_compile_definitions(
# For math constants
_USE_MATH_DEFINES
# Minimize Windows namespace collision
NOMINMAX
WIN32_LEAN_AND_MEAN
)
endif()

set(THIS_PACKAGE_INCLUDE_DEPENDS
angles
control_msgs
Expand Down

0 comments on commit f12076c

Please sign in to comment.