File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ Joy::Joy(const rclcpp::NodeOptions & options)
8888
8989 sticky_buttons_ = this ->declare_parameter (" sticky_buttons" , false );
9090
91- autocenter_ = std::clamp (this ->declare_parameter (" autocenter" , 0 ), 0 , 100 );
91+ autocenter_ = std::clamp (static_cast < int >( this ->declare_parameter (" autocenter" , 0 ) ), 0 , 100 );
9292
9393 coalesce_interval_ms_ = static_cast <int >(this ->declare_parameter (" coalesce_interval_ms" , 1 ));
9494 if (coalesce_interval_ms_ < 0 ) {
@@ -484,7 +484,7 @@ void Joy::eventThread()
484484
485485 status = future_.wait_for (std::chrono::seconds (0 ));
486486
487- if (haptic_ != nullptr && autocenter_ ) {
487+ if (haptic_ != nullptr ) {
488488 int result = SDL_HapticSetAutocenter (haptic_, autocenter_);
489489 if (result) {
490490 RCLCPP_WARN (get_logger (), " Failed to set autocenter: %s" , SDL_GetError ());
You can’t perform that action at this time.
0 commit comments