added rotation handlers

This commit is contained in:
Michal Starski 2018-11-20 13:56:29 +01:00
parent 401db23ba2
commit 4e09837eff
2 changed files with 3 additions and 2 deletions

BIN
server

Binary file not shown.

View File

@ -169,9 +169,10 @@ void *dataProcessHandler(void *data)
while (1)
{
if (recvfrom(info->socket, &floats, 12, 0, (struct sockaddr *)&tmp, &addrLen) != 12)
if (recvfrom(info->socket, &floats, 28, 0, (struct sockaddr *)&tmp, &addrLen) != 28)
continue;
sendto(info->socket, &floats, 12, 0, (struct sockaddr *)&info->address, sizeof(info->address));
// printf("x: %f, y: %f, z: %f, rot_x: %f, rot_y: %f, rot_z: %f, rot_w: %f\n", floats.x, floats.y, floats.z, floats.rot_x, floats.rot_y, floats.rot_z, floats.rot_w);
sendto(info->socket, &floats, 28, 0, (struct sockaddr *)&info->address, sizeof(info->address));
}
return NULL;
}