From a3983dcc28778a1597204def03a0a1ae2070cb6f Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 29 Aug 2022 09:07:34 +0200 Subject: [PATCH] Added an abstract function that is called at each iteration of the main thread loop (user_loop). --- include/iri_base_bt_client/iri_base_bt_client.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/iri_base_bt_client/iri_base_bt_client.h b/include/iri_base_bt_client/iri_base_bt_client.h index 4b6082d..7bf61ad 100644 --- a/include/iri_base_bt_client/iri_base_bt_client.h +++ b/include/iri_base_bt_client/iri_base_bt_client.h @@ -378,6 +378,12 @@ class IriBaseBTClient * */ static void hupCalled(int sig); + + /** + * \brief + * + */ + virtual void user_loop(void) = 0; }; @@ -693,6 +699,7 @@ void *IriBaseBTClient<ConfigClass>::mainThread(void *param) { try { + iriNode->user_loop(); iriNode->status=iriNode->tree.tickRoot(); ROS_DEBUG_STREAM("Tree status: " << iriNode->status); } -- GitLab