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

Modified the main CMakeLists.txt to set the compiler flags for the C++...

Modified the main CMakeLists.txt to set the compiler flags for the C++ compiler instead of the C compiler.
Solved some compilation warnings that appeared.
parent a1986988
No related branches found
No related tags found
No related merge requests found
......@@ -17,8 +17,8 @@ IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "DEBUG")
ENDIF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_C_FLAGS_DEBUG "-g -Wall")
SET(CMAKE_C_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
ADD_SUBDIRECTORY(src)
......
......@@ -263,7 +263,7 @@ int CDynamixelServer::get_num_devices(void)
std::vector<int> CDynamixelServer::get_device_ids(void)
{
std::vector<int> ids;
int i=0;
unsigned int i=0;
this->dynamixel_access.enter();
for(i=0;i<this->devices.size();i++)
......@@ -280,7 +280,7 @@ CDynamixel *CDynamixelServer::get_device(int dev_id)
std::string name,serial;
bool updated=false;
TDynDevice device;
int i=0;
unsigned int i=0;
this->dynamixel_access.enter();
if(this->bus_info.bus_id==-1)
......@@ -350,7 +350,7 @@ CDynamixel *CDynamixelServer::get_device(int dev_id)
void CDynamixelServer::free_device(int dev_id)
{
int i=0;
unsigned int i=0;
for(i=0;i<this->devices.size();i++)
{
......@@ -366,7 +366,8 @@ void CDynamixelServer::set_baudrate(int baudrate)
{
TFTDIconfig ftdi_config;
unsigned char *packet;
int i=0,length=0;
unsigned int i=0;
int length=0;
if(this->comm_dev!=NULL)
{
......@@ -497,8 +498,6 @@ void CDynamixelServer::ping(int dev_id,int time)
void CDynamixelServer::close(void)
{
int i=0;
this->dynamixel_access.enter();
if(this->devices.size()>0)
{
......
......@@ -11,7 +11,6 @@ int main(int argc, char *argv[])
std::vector<float> position;
std::vector<int> devices;
CDynamixel *dyn_motor;
short int motors=0x0001;
num_buses=dyn_server->get_num_buses();
std::cout << "Num. buses: " << num_buses << std::endl;
......
......@@ -5,11 +5,9 @@
int main(int argc, char *argv[])
{
CDynamixelServer *dyn_server=CDynamixelServer::instance();
CEventServer *event_server=CEventServer::instance();
int num_buses=0,num_dev=0,baudrate=0,i=0;
std::vector<int> devices;
CDynamixel *dyn_motor;
short int motors=0x0001;
int num_buses=0;
num_buses=dyn_server->get_num_buses();
std::cout << "Num. buses: " << num_buses << std::endl;
......
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