From 765986922827db6d0f92ce1de6f53519c0674344 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 11 Oct 2023 14:55:13 +0300 Subject: Removed option 'show advanced (segment&gradient) in job editor' Related Work Items: #9131 --- Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index d8a71fc78..bcf35a741 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -1132,6 +1132,7 @@ namespace Tango.PPC.Jobs.Models GroupingSegments.Where(i => i.SegmentIndex != max).ToList().ForEach(x => x.EnableInterSegment = InterSegmentLength > 0); } _preventChange = false; + EnableInterSegment = InterSegmentLength > 0; OnLengthChanged(); } -- cgit v1.3.1 From 6633cb47da2bd14a5bbe356a7c4602c6d09462d1 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 15 Oct 2023 17:24:24 +0300 Subject: pressing "resume" the dyed amount is doubled Related Work Items: #9046 --- .../PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs | 9 ++++++--- .../Tango.Emulations/Emulators/MachineEmulator.cs | 4 ++-- .../Tango.Integration/Operation/JobHandler.cs | 17 +++++++++-------- .../Tango.Integration/Operation/MachineOperator.cs | 11 +++++++---- 4 files changed, 24 insertions(+), 17 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index bcf35a741..983719e57 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -79,7 +79,7 @@ namespace Tango.PPC.Jobs.Models if (Segments != null) { if((EnableInterSegment && IsAllSegmentsPerSpool)) - return GroupingSegments.Count > 0 ? (GroupingSegments.Sum(x => x.LengthWithInterSegment) - InterSegmentLength) : 0; + return GroupingSegments.Count > 0 ? (GroupingSegments.Sum(x => x.LengthWithInterSegment) ) : 0; return GroupingSegments.Sum(x => x.FullLength); //return Segments.Sum(x => x.LengthWithInterSegment); // return Segments.Sum(x => x.LengthWithFactor) + ((EnableInterSegment && IsAllSegmentsPerSpool) ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0); @@ -1097,8 +1097,9 @@ namespace Tango.PPC.Jobs.Models // NumberOfUnits = (int)maxRep; //} } - RaisePropertyChanged(nameof(Length)); + OnUpdateLengthhWeight(); + RaisePropertyChanged(nameof(Length)); } RaisePropertyChanged(nameof(GetEstimatedDuration)); @@ -1131,9 +1132,11 @@ namespace Tango.PPC.Jobs.Models int max = GroupingSegments.Max(x => x.SegmentIndex); GroupingSegments.Where(i => i.SegmentIndex != max).ToList().ForEach(x => x.EnableInterSegment = InterSegmentLength > 0); } + _enableintersegment = InterSegmentLength > 0; _preventChange = false; - EnableInterSegment = InterSegmentLength > 0; + OnLengthChanged(); + UpdateEffectiveSegments(); } private void OnNumberOfSpoolsChanged() diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index ea45fbedd..bacce5f5e 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -847,7 +847,7 @@ namespace Tango.Emulations.Emulators double firstUnitStartPosition = request.Message.FirstUnitStartPosition; bool addedResume = firstUnitStartPosition <= 0; - bool bIsResumeProcess = firstUnitStartPosition > 0; + //bool bIsResumeProcess = firstUnitStartPosition > 0; for (int i = 0; i < units; i++) { @@ -892,7 +892,7 @@ namespace Tango.Emulations.Emulators addedResume = true; progress = firstUnitStartPosition; } - //LogManager.Log($" Emulator Progress = {progress}, units = {units}"); + //LogManager.Log($" EMULATOR PROGRESS Progress = {progress}, units = {units}"); double currentPosition = 0; double nextStopPosition = unit_length; diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs index 5d62f4269..630bda866 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs @@ -371,32 +371,33 @@ namespace Tango.Integration.Operation { LogManager.Log($"Invalid job progress received '{s.Progress}' while last progress was '{_last_progress}'."); } - + _last_progress = s.Progress; - + List unit_segments = new List(); Status.Progress = s.Progress; Status.RemainingTime = Status.TotalTime - Job.TranslateProgressToTime(Status.Progress, ProcessParameters); Status.RemainingProgress = Status.TotalProgress - Status.Progress; - if (s.Progress < Status.SettingUpTotalProgress || Status.SettingUpProgress < Status.SettingUpTotalProgress) + if((s.Progress < Status.SettingUpTotalProgress) || (Status.SettingUpProgress < Status.SettingUpTotalProgress)) { Status.SettingUpProgress = Math.Min(s.Progress, this.Status.SettingUpTotalProgress); Status.IsSettingUp = true; + //LogManager.Log($" Status.IsSettingUp = true , Status.SettingUpProgress = {Status.SettingUpProgress}' Status.SettingUpTotalProgress = {Status.SettingUpTotalProgress}."); } - if (s.Progress >= Status.SettingUpTotalProgress) + if (s.Progress >= ProcessParameters.DryerBufferLengthMeters)//Status.SettingUpTotalProgress) { if (Status.IsSettingUp && Status.Progress > 0) { Status.IsSettingUp = false; + //LogManager.Log($" Status.IsSettingUp = false , Status.SettingUpProgress = {Status.SettingUpProgress}'."); } if (ResumeConfig != null && ResumeConfig.GlobalStartPosition > 0) { Status.ProgressMinusSettingUp = s.Progress - ProcessParameters.DryerBufferLengthMeters; - //LogManager.Log($" Status.ProgressMinusSettingUp {Status.ProgressMinusSettingUp} progress = {s.Progress}"); - + //LogManager.Log($" JOB HANDLER Status.ProgressMinusSettingUp {Status.ProgressMinusSettingUp} progress = {s.Progress}"); } else { @@ -434,7 +435,7 @@ namespace Tango.Integration.Operation if (!Status.IsSettingUp && s.Progress <= previousUnitsLengthWithoutThis + unitLength + ProcessParameters.DryerBufferLengthMeters) { currentUnitProgress = s.Progress - previousUnitsLengthWithoutThis - ProcessParameters.DryerBufferLengthMeters; - //LogManager.Log($"currentUnitProgress before ={currentUnitProgress} progress = {s.Progress}"); + //LogManager.Log($" JOB HANDLER currentUnitProgress before ={currentUnitProgress} progress = {s.Progress}"); break; } } @@ -452,7 +453,7 @@ namespace Tango.Integration.Operation Status.CurrentUnit = currentUnit; Status.CurrentUnitProgress = currentUnitProgress; - //LogManager.Log($"CurrentUnit {Status.CurrentUnit} currentUnitProgress {Status.CurrentUnitProgress} "); + //LogManager.Log($" JOB HANDLER CurrentUnit {Status.CurrentUnit} currentUnitProgress {Status.CurrentUnitProgress} "); Status.RemainingUnits = this.Job.NumberOfUnits - this.Status.CurrentUnit; diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index df320527e..a33ee3165 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -3254,10 +3254,10 @@ namespace Tango.Integration.Operation } double resumePreProgress = 0; - + if (config.ResumeConfig != null) { - resumePreProgress = config.ResumeConfig.GlobalStartPosition - processParameters.DryerBufferLengthMeters; + resumePreProgress = config.ResumeConfig.GlobalStartPosition - config.ResumeConfig.FirstUnitStartPosition;//- processParameters.DryerBufferLengthMeters; request.FirstUnitStartPosition = config.ResumeConfig.FirstUnitStartPosition; //LogManager.Log($" resumePreProgress = {resumePreProgress}, GlobalStartPosition {config.ResumeConfig.GlobalStartPosition} FirstUnitStartPosition {request.FirstUnitStartPosition}"); request.JobTicket.Length = (request.JobTicket.Length / Math.Max(request.JobTicket.NumberOfUnits, 1)) * (int)Math.Max(config.ResumeConfig.RemainingUnits, 1); @@ -3268,8 +3268,11 @@ namespace Tango.Integration.Operation { if (!completed) { - response.Message.Status.Progress += resumePreProgress; - + if(resumePreProgress > 0 ) + { + response.Message.Status.Progress += resumePreProgress;//LogManager.Log($" MACHINE OPERATOR Added Progress = {response.Message.Status.Progress}"); + } + handler.RaiseStatusReceived(response.Message.Status); _last_job_status = handler.Status; -- cgit v1.3.1