mirror of
https://github.com/storytold/LiveScan3D.git
synced 2026-10-11 21:41:24 +00:00
Added new UI for the Temporal Sync Feature, made the software more robust including:
-Settings window can only be opened once
-When the client can't open a device, it tries multiple times
-Recording bins are now saved with a unique ID per device, to allow multiple clients to record on the same PC
-Synchronized & Unsynchronized devices can be both used in one server
-Included a workaround for a bug in the Azure Kinect SDK regarding exposure (microsoft/Azure-Kinect-Sensor-SDK#1378)
This commit is contained in:
@@ -75,8 +75,6 @@ namespace KinectServer
|
||||
IFormatter formatter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
|
||||
Stream stream = new FileStream("settings.bin", FileMode.Open, FileAccess.Read);
|
||||
oSettings = (KinectSettings)formatter.Deserialize(stream);
|
||||
//This always needs to be set to false on startup, as we can only activate it when all Kinects are already connected
|
||||
oSettings.bEnableSync = false;
|
||||
stream.Close();
|
||||
}
|
||||
catch(Exception)
|
||||
@@ -127,10 +125,16 @@ namespace KinectServer
|
||||
//Opens the settings form
|
||||
private void btSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
SettingsForm form = new SettingsForm();
|
||||
form.oSettings = oSettings;
|
||||
form.oServer = oServer;
|
||||
form.Show();
|
||||
if(oServer.GetSettingsForm() == null)
|
||||
{
|
||||
SettingsForm form = new SettingsForm();
|
||||
form.oSettings = oSettings;
|
||||
form.oServer = oServer;
|
||||
form.Show();
|
||||
oServer.SetSettingsForm(form);
|
||||
oServer.SetMainWindowForm(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Performs recording which is synchronized frame capture.
|
||||
@@ -265,6 +269,12 @@ namespace KinectServer
|
||||
while (!worker.CancellationPending)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
|
||||
if (!oServer.GetAllDevicesInitialized())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
oServer.GetLatestFrame(lFramesRGB, lFramesVerts, lFramesBody);
|
||||
|
||||
//Update the vertex and color lists that are common between this class and the OpenGLWindow.
|
||||
@@ -474,7 +484,7 @@ namespace KinectServer
|
||||
OpenGLWorker.RunWorkerAsync();
|
||||
}
|
||||
|
||||
private void SetStatusBarOnTimer(string message, int milliseconds)
|
||||
public void SetStatusBarOnTimer(string message, int milliseconds)
|
||||
{
|
||||
statusLabel.Text = message;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user