aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-25 06:02:06 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-03-25 06:02:06 +0200
commite3f44f81af2cc5a650041d06fe2106937af03560 (patch)
tree82c9906491d02fe2d0e770d382dc687479159cd8 /Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
parent838378bae2944477177a4af641c356976173d8f6 (diff)
downloadTango-e3f44f81af2cc5a650041d06fe2106937af03560.tar.gz
Tango-e3f44f81af2cc5a650041d06fe2106937af03560.zip
Several bug fixes.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index fa6d37377..96c2ea4c4 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -256,6 +256,7 @@ namespace Tango.Integration.Operation
internal void RaiseCompleted()
{
//This will compensate on any missing progress from Shlomo, but also will tell the wrong progress if job is really completed with a large progress mistake.
+ // Might be worth to compensate only on small drifts like the below (ProgressMinusSettingsUp)...
//InvalidateJobProgress(new JobStatus()
//{
// Progress = Status.TotalProgress,
@@ -263,6 +264,14 @@ namespace Tango.Integration.Operation
//});
LogManager.Log($"Job completed at position {Status.Progress}/{Status.TotalProgress}...");
+
+ //If drift is smaller than 10cm auto correct it.
+ if (Math.Abs(Status.TotalProgressMinusSettingUp - Status.ProgressMinusSettingUp) < 0.1)
+ {
+ LogManager.Log($"Job completed with a small drift in the progress minus settings up calculation. ({Status.ProgressMinusSettingUp}/{Status.TotalProgressMinusSettingUp}). Compensating...");
+ Status.ProgressMinusSettingUp = Status.TotalProgressMinusSettingUp;
+ }
+
Status.Segments.Last().Completed = true;
Status.RemainingUnits = 0;
Status.IsFinalizing = false;