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

Changed the config_bus function to change only the communication device baud...

Changed the config_bus function to change only the communication device baud speed, but not that of the devices connected to the bus. 
parent 1c688ad9
No related branches found
No related tags found
No related merge requests found
......@@ -135,10 +135,22 @@ void *CDynamixelServer::scan_thread(void *param)
void CDynamixelServer::config_bus(int bus_id, int baudrate)
{
TFTDIconfig ftdi_config;
// set the desired bus identifier
this->set_bus_id(bus_id);
// set the desired baudrate for the bus
this->set_baudrate(baudrate);
/* reconfigure the communciations device */
ftdi_config.word_length=8;
ftdi_config.stop_bits=1;
ftdi_config.parity=0;
ftdi_config.read_timeout = 1000;
ftdi_config.write_timeout = 1000;
ftdi_config.latency_timer = 1;
ftdi_config.baud_rate=baudrate;
this->comm_dev->config(&ftdi_config);
this->bus_info.baud_rate=baudrate;
// this->set_baudrate(baudrate);
}
int CDynamixelServer::get_num_buses(void)
......
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