Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D400 Calibration extensions in C# #9256

Merged
merged 11 commits into from
Jul 4, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public static bool IsTheDeviceD400Series(Device dev)
{
res = Regex.IsMatch(dev.Info[CameraInfo.Name].ToString(), @"(D4\d\d)");
if (!res)
Console.WriteLine($"{Environment.NewLine}The devices of D400 series can be calibrated only!");
Console.WriteLine($"{Environment.NewLine}Device is not a D400 series model");
}
return res;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ public CaptureWindow()
using (var ctx = new Context())
{
var devices = ctx.QueryDevices();
if ( 0 == devices.Count )
var dev = devices[0];
maloel marked this conversation as resolved.
Show resolved Hide resolved

if ( 1 != devices.Count || (!ExampleAutocalibrateDevice.IsTheDeviceD400Series(dev)) )
maloel marked this conversation as resolved.
Show resolved Hide resolved
{
Console.WriteLine("The tutorial {0} requires Realsense D400 device to run.\nConnect a device and rerun",
Console.WriteLine("The tutorial {0} requires a single Realsense D400 device to run.\nFix the setup and rerun",
System.Diagnostics.Process.GetCurrentProcess().ProcessName);
Environment.Exit(0);
}
var dev = devices[0];

Console.WriteLine("Using device 0, an {0}", dev.Info[CameraInfo.Name]);
Console.WriteLine(" Serial number: {0}", dev.Info[CameraInfo.SerialNumber]);
Expand Down