From 6f1777a8f47eb5723619e9f21c8aeca52da811dc Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Fri, 17 Feb 2023 11:08:29 +0100
Subject: [PATCH] Made public the to_angles() and to_speeds() functions.

---
 include/dynamixel_motor.h | 22 +++++++++++-----------
 src/dynamixel_motor.cpp   |  4 ++--
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/dynamixel_motor.h b/include/dynamixel_motor.h
index 9329a7c..71788bb 100644
--- a/include/dynamixel_motor.h
+++ b/include/dynamixel_motor.h
@@ -125,16 +125,6 @@ class CDynamixelMotor
      */
     bool enabled;
   protected:
-    /**
-     * \brief
-     *
-     */
-    double to_angles(unsigned int counts); 
-    /**
-     * \brief
-     *
-     */
-    double to_speeds(unsigned int counts); 
     /**
      * \brief 
      *
@@ -161,6 +151,16 @@ class CDynamixelMotor
      *
      */
     void set_control_mode(control_mode mode);
+    /**
+     * \brief
+     *
+     */
+    double to_angles(unsigned int counts); 
+    /**
+     * \brief
+     *
+     */
+    double to_speeds(signed int counts); 
     /**
      * \brief
      *
@@ -170,7 +170,7 @@ class CDynamixelMotor
      * \brief
      *
      */
-    unsigned int from_speeds(double speed); 
+    signed int from_speeds(double speed); 
     /**
      * \brief
      *
diff --git a/src/dynamixel_motor.cpp b/src/dynamixel_motor.cpp
index 31dada7..e5e65a2 100644
--- a/src/dynamixel_motor.cpp
+++ b/src/dynamixel_motor.cpp
@@ -82,7 +82,7 @@ unsigned int CDynamixelMotor::from_angles(double angle)
   return counts;
 }
 
-unsigned int CDynamixelMotor::from_speeds(double speed)
+signed int CDynamixelMotor::from_speeds(double speed)
 {
   unsigned int counts;
 
@@ -105,7 +105,7 @@ double CDynamixelMotor::to_angles(unsigned int counts)
   return angle;
 }
 
-double CDynamixelMotor::to_speeds(unsigned int counts)
+double CDynamixelMotor::to_speeds(signed int counts)
 {
   double speed;
 
-- 
GitLab