Skip to content
Snippets Groups Projects
Commit 07eedb94 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a call to the scan_bus() funciton each time the get_num_devices() function is called.

Solved some memory leacks.
parent ae20a08a
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,7 @@ int CDynamixelServer::get_num_buses(void)
this->dynamixel_access.enter();
try{
ftdi_server->scan_bus();// rescan all the present FTDI devices
num_dev=ftdi_server->get_num_devices();
for(i=0;i<num_dev;i++)
{
......@@ -401,6 +402,7 @@ void CDynamixelServer::set_baudrate(int baudrate)
this->dynamixel_access.enter();
if(this->comm_dev->write(packet,length)!=length)
{
delete[] packet;
this->dynamixel_access.exit();
throw CDynamixelServerException(_HERE_,"Unexpected error while writing to the communication device");
}
......
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