From 2b15ed0f5bd2a43e3819d22b08b585bb4712f449 Mon Sep 17 00:00:00 2001 From: Christopher Remde Date: Wed, 8 Jul 2020 14:15:49 +0200 Subject: [PATCH] Cleaned up --- LiveScanServer/KinectServer.cs | 2 +- LiveScanServer/KinectSocket.cs | 12 ------------ src/LiveScanClient/azureKinectCapture.cpp | 5 +---- src/LiveScanClient/frameFileWriterReader.cpp | 3 ++- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/LiveScanServer/KinectServer.cs b/LiveScanServer/KinectServer.cs index 1d7d69c..d9c38d7 100644 --- a/LiveScanServer/KinectServer.cs +++ b/LiveScanServer/KinectServer.cs @@ -234,7 +234,7 @@ namespace KinectServer } /// - /// Send temporal Sync Data to all client + /// Send temporal Sync Data to all clients /// public void SendTemporalSyncData() { diff --git a/LiveScanServer/KinectSocket.cs b/LiveScanServer/KinectSocket.cs index 7d1f9b1..f2fb4a0 100644 --- a/LiveScanServer/KinectSocket.cs +++ b/LiveScanServer/KinectSocket.cs @@ -220,18 +220,6 @@ namespace KinectServer currentTempSyncState = eTempSyncConfig.STANDALONE; } - //MARKED FOR DELETION - //if(currentTempSyncState == eTempSyncConfig.SUBORDINATE && confirmSubStarted == 1) - //{ - - //} - - //else if(currentTempSyncState == eTempSyncConfig.SUBORDINATE && confirmSubStarted == 0) - //{ - // bSubStarted = false; - // eSubInitialized?.Invoke(); - //} - UpdateSocketState(); } diff --git a/src/LiveScanClient/azureKinectCapture.cpp b/src/LiveScanClient/azureKinectCapture.cpp index 06798fe..a69a291 100644 --- a/src/LiveScanClient/azureKinectCapture.cpp +++ b/src/LiveScanClient/azureKinectCapture.cpp @@ -56,10 +56,7 @@ bool AzureKinectCapture::Initialize(bool asMaster, bool asSubordinate, int syncO { config.wired_sync_mode = K4A_WIRED_SYNC_MODE_SUBORDINATE; //Sets the offset on subordinate devices. Should be a multiple of 160, each subordinate having a different multiplier in ascending order. - //This is very important, as it avoids firing the Kinects Lasers at the same time. - - config.subordinate_delay_off_master_usec = 0; - + //This is very important, as it avoids firing the Kinects lasers at the same time. config.subordinate_delay_off_master_usec = 160 * syncOffsetMultiplier; } diff --git a/src/LiveScanClient/frameFileWriterReader.cpp b/src/LiveScanClient/frameFileWriterReader.cpp index fbb3259..c1a4f7f 100644 --- a/src/LiveScanClient/frameFileWriterReader.cpp +++ b/src/LiveScanClient/frameFileWriterReader.cpp @@ -94,7 +94,8 @@ void FrameFileWriterReader::writeFrame(std::vector points, std::vector< FILE *f = m_pFileHandle; int nPoints = static_cast(points.size()); - //fprintf(f, "n_points= %d\nframe_timestamp= %d\n", nPoints, getRecordingTimeMilliseconds()); + + //The Timestamp is generated by the Kinect instead of the system. If temporal Sync is enabled, Master and Subordinate have a synced timestamp fprintf(f, "n_points= %d\nframe_timestamp= %d\n", nPoints, timestamp); if (nPoints > 0) {