From 26b96aaa0d0766029d2aaf7b30aa844af4c6a4e0 Mon Sep 17 00:00:00 2001 From: Ethan Holter Date: Mon, 17 Nov 2025 00:46:39 -0600 Subject: [PATCH 1/2] surpress warnings for known unused event types --- joy/src/joy.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/joy/src/joy.cpp b/joy/src/joy.cpp index c3e8c9df..d3beccff 100644 --- a/joy/src/joy.cpp +++ b/joy/src/joy.cpp @@ -47,6 +47,12 @@ namespace joy { +static const std::unordered_set ignored_sdl_events = { + SDL_CONTROLLERTOUCHPADDOWN, + SDL_CONTROLLERTOUCHPADMOTION, + SDL_CONTROLLERTOUCHPADUP, + SDL_JOYBATTERYUPDATED +}; Joy::Joy(const rclcpp::NodeOptions & options) : rclcpp::Node("joy_node", options) @@ -435,7 +441,9 @@ void Joy::eventThread() int success = SDL_WaitEventTimeout(&e, wait_time_ms); if (success == 1) { // Succeeded getting an event - if (e.type == SDL_JOYAXISMOTION) { + if (ignored_sdl_events.count(e.type) == 1) { + // ignore events which explicitly have no purpose to reduce log verbosity + } else if (e.type == SDL_JOYAXISMOTION) { should_publish = handleJoyAxis(e); } else if (e.type == SDL_JOYBUTTONDOWN) { should_publish = handleJoyButtonDown(e); From f705c5e4335b0f7c6942f22c74746e0d447c93e3 Mon Sep 17 00:00:00 2001 From: Ethan Holter Date: Thu, 20 Nov 2025 16:29:27 -0600 Subject: [PATCH 2/2] removed newer SDL event for Humble compatability --- joy/src/joy.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/joy/src/joy.cpp b/joy/src/joy.cpp index d3beccff..fca9713b 100644 --- a/joy/src/joy.cpp +++ b/joy/src/joy.cpp @@ -50,8 +50,7 @@ namespace joy static const std::unordered_set ignored_sdl_events = { SDL_CONTROLLERTOUCHPADDOWN, SDL_CONTROLLERTOUCHPADMOTION, - SDL_CONTROLLERTOUCHPADUP, - SDL_JOYBATTERYUPDATED + SDL_CONTROLLERTOUCHPADUP }; Joy::Joy(const rclcpp::NodeOptions & options)