I'm goig to try
for (i=0;i<6;i++) //inicializacion
{
strncpy(temp1,buffer+i*VECTOR_SIZE,VECTOR_SIZE);
velocities[i]=atof(temp1);
}
Type: Posts; User: jcarellanov
I'm goig to try
for (i=0;i<6;i++) //inicializacion
{
strncpy(temp1,buffer+i*VECTOR_SIZE,VECTOR_SIZE);
velocities[i]=atof(temp1);
}
char buffer[BUFSIZE]
As of right now there are seven different elements in the string: x,y,z linear and x,y,z angular. There's an extra character E,C or H that tells the machine to exit the...
I was under the impression that memcpy simply copied the memory blocks, but but didn't format the data. Therefore I used sscanf to format them as strings, was my logic wrong?
I'm not sure I follow, could you please elaborate a bit more? Also, the string consist of 6 different characters at all times (3 linear components and 3 angular).
@laserlight buffer is global....
int convert_data(int id_limb){
char temp1[VECTOR_SIZE];
char temp2[VECTOR_SIZE];
char code;
char code_temp;
double velocities[8];
int i;
for (i=0;i<6;i++) //initializing