diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-25 06:02:06 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-25 06:02:06 +0200 |
| commit | e3f44f81af2cc5a650041d06fe2106937af03560 (patch) | |
| tree | 82c9906491d02fe2d0e770d382dc687479159cd8 /Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs | |
| parent | 838378bae2944477177a4af641c356976173d8f6 (diff) | |
| download | Tango-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.cs | 9 |
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; |
