fIX SIEMENS axes

This commit is contained in:
Lucio Maranta
2019-03-15 12:10:59 +00:00
parent 0efb99dc30
commit 96764e676a
+5 -2
View File
@@ -1801,9 +1801,12 @@ namespace CMS_CORE_Library.Siemens
// Cycle between axes
// The dictionary is written asynchronously so i have to create a copy of the dictionary with .ToList() to avoid exceptions
// axes = InterpAxesPosition.ToDictionary(x => x.Key, x => x.Value); This code throws exceptions
foreach (var axis in InterpAxesPosition.ToList())
lock (InterpAxesPosition)
{
axes.Add(axis.Key, axis.Value);
foreach (var axis in InterpAxesPosition.ToList())
{
axes.Add(axis.Key, axis.Value);
}
}
}
catch (Exception ex)