History

added additional flight time debugging

ZappoMan committed 12 years ago

Commit 3a16a491 parent 77636671 file · +15 −0Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+15−0
@@ -4401,6 +4401,21 @@ void* Application::networkReceive(void* args) { · 4400 unmodified lines
4401 case PACKET_TYPE_ENVIRONMENT_DATA: {4401 case PACKET_TYPE_ENVIRONMENT_DATA: {
4402 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), 4402 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
4403 "Application::networkReceive()... _voxelProcessor.queueReceivedPacket()");4403 "Application::networkReceive()... _voxelProcessor.queueReceivedPacket()");
4404
4405 bool wantExtraDebugging = Menu::getInstance()->isOptionChecked(MenuOption::ExtraDebugging);
4406 if (wantExtraDebugging && app->_incomingPacket[0] == PACKET_TYPE_VOXEL_DATA) {
4407 int numBytesPacketHeader = numBytesForPacketHeader(app->_incomingPacket);
4408 unsigned char* dataAt = app->_incomingPacket + numBytesPacketHeader;
4409 dataAt += sizeof(VOXEL_PACKET_FLAGS);
4410 VOXEL_PACKET_SEQUENCE sequence = (*(VOXEL_PACKET_SEQUENCE*)dataAt);
4411 dataAt += sizeof(VOXEL_PACKET_SEQUENCE);
4412 VOXEL_PACKET_SENT_TIME sentAt = (*(VOXEL_PACKET_SENT_TIME*)dataAt);
4413 dataAt += sizeof(VOXEL_PACKET_SENT_TIME);
4414 VOXEL_PACKET_SENT_TIME arrivedAt = usecTimestampNow();
4415 int flightTime = arrivedAt - sentAt;
4416
4417 printf("got PACKET_TYPE_VOXEL_DATA, sequence:%d flightTime:%d\n", sequence, flightTime);
4418 }
4404 4419
4405 // add this packet to our list of voxel packets and process them on the voxel processing4420 // add this packet to our list of voxel packets and process them on the voxel processing
4406 app->_voxelProcessor.queueReceivedPacket(senderAddress, app->_incomingPacket, bytesReceived);4421 app->_voxelProcessor.queueReceivedPacket(senderAddress, app->_incomingPacket, bytesReceived);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t