PyBullet: TCP connection, optimized getVREvents to allow faster Windows -> Linux Vive tracking state communication.

This commit is contained in:
Erwin Coumans
2018-06-27 23:43:42 -07:00
parent ac59886960
commit bfc85ff1fd
2 changed files with 57 additions and 19 deletions

View File

@@ -181,8 +181,17 @@ bool TcpNetworkedPhysicsProcessor::processCommand(const struct SharedMemoryComma
}
else
{
sz = sizeof(SharedMemoryCommand);
data = (unsigned char*)&clientCmd;
if (clientCmd.m_type == CMD_REQUEST_VR_EVENTS_DATA)
{
sz = 3 * sizeof(int) + sizeof(smUint64_t) + 16;
data = (unsigned char*)&clientCmd;
}
else
{
sz = sizeof(SharedMemoryCommand);
data = (unsigned char*)&clientCmd;
}
}
m_data->m_tcpSocket.Send((const uint8 *)data,sz);