diff --git a/include/dynamixel_motor.h b/include/dynamixel_motor.h index 9329a7cdc8eefe07c95fe958e104c81abab3f7ef..71788bb7dce8afbcbf97f5f6844d0beceea12cf2 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 31dada7c1f647af797594afa8e4474e55e69c154..e5e65a2e3e8fa7fcd8c46316867ab729fb8c86f1 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;