Skip to content
Snippets Groups Projects
Commit 86447a28 authored by ferranmafe's avatar ferranmafe
Browse files

Added the functions to enable/disable power on the second dynamixel bus.

parent e8240800
No related branches found
No related tags found
1 merge request!8Kinetic migration
...@@ -69,6 +69,7 @@ bool DarwinDriver::startDriver(void) ...@@ -69,6 +69,7 @@ bool DarwinDriver::startDriver(void)
ROS_INFO_STREAM("Found " << num_servos << " servos "); ROS_INFO_STREAM("Found " << num_servos << " servos ");
// enable all servos and assign them to the action module // enable all servos and assign them to the action module
this->darwin->mm_enable_power(); this->darwin->mm_enable_power();
this->darwin->mm_enable_power_v2();
for(i=0;i<MAX_NUM_SERVOS;i++) for(i=0;i<MAX_NUM_SERVOS;i++)
{ {
if(present_servos&(0x00000001<<i)) if(present_servos&(0x00000001<<i))
...@@ -125,6 +126,7 @@ bool DarwinDriver::startDriver(void) ...@@ -125,6 +126,7 @@ bool DarwinDriver::startDriver(void)
{ {
this->darwin->mm_stop(); this->darwin->mm_stop();
this->darwin->mm_disable_power(); this->darwin->mm_disable_power();
this->darwin->mm_disable_power_v2();
} }
return false; return false;
} }
...@@ -143,6 +145,7 @@ bool DarwinDriver::stopDriver(void) ...@@ -143,6 +145,7 @@ bool DarwinDriver::stopDriver(void)
{ {
this->darwin->mm_stop(); this->darwin->mm_stop();
this->darwin->mm_disable_power(); this->darwin->mm_disable_power();
this->darwin->mm_disable_power_v2();
} }
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment