diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-08-10 12:21:34 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-08-10 12:21:34 +0300 |
| commit | ba0fa1fa68767b7264803019ade99f5e123a5d1a (patch) | |
| tree | fdfeee6b0e707bb639c30deae15971775490216e /Software/Visual_Studio | |
| parent | cea6dbf4dedf06ba95db5e1b6bb63f207de32a41 (diff) | |
| download | Tango-ba0fa1fa68767b7264803019ade99f5e123a5d1a.tar.gz Tango-ba0fa1fa68767b7264803019ade99f5e123a5d1a.zip | |
ResumeJob. Bug in Emulator, - the job does not complete properly.
Diffstat (limited to 'Software/Visual_Studio')
4 files changed, 8 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index 5738fe8a0..c874e5fc2 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -1805,7 +1805,7 @@ namespace Tango.PPC.Jobs.ViewModels { if (!e.JobHandler.Status.IsCompleted) { - if (e.JobHandler.JobStatus.Progress <= 0) return; + if (e.JobHandler.JobStatus.Progress <= e.JobHandler.ProcessParameters.DryerBufferLengthMeters) return; var model = JobResumeDB.Default.Get(e.Job.Guid); bool insert = false; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs index c87c50db2..11823f797 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/RunningJobViewerEureka.xaml.cs @@ -251,6 +251,10 @@ namespace Tango.PPC.UI.Controls if(_prevUnit < currentUnit) { + if(_prevOffset == 0)//resume + { + _prevOffset = ControlWidth * (1-multiplier) * currentUnit; + } _addOffset = _prevOffset; //Debug.WriteLine($"OnSliderValueChanged prevOffset: '{_prevOffset}' currentUnit = {currentUnit}, total:{total}"); } diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 9464b37ec..7074582d0 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -847,10 +847,11 @@ namespace Tango.Emulations.Emulators double firstUnitStartPosition = request.Message.FirstUnitStartPosition; bool addedResume = firstUnitStartPosition <= 0; + bool bIsResumeProcess = firstUnitStartPosition > 0; for (int i = 0; i < units; i++) { - while (progress < unit_length + (i == units - 1 ? dryerLength : 0) && !_cancelJob) + while (progress < unit_length + (!bIsResumeProcess && i == units - 1 ? dryerLength : 0) && !_cancelJob) { var status = new PMR.Printing.JobStatus(); status.Progress = progress; diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index d159b20bc..11634109f 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -3254,6 +3254,7 @@ namespace Tango.Integration.Operation { resumePreProgress = config.ResumeConfig.GlobalStartPosition - request.FirstUnitStartPosition; request.FirstUnitStartPosition = config.ResumeConfig.FirstUnitStartPosition; + request.JobTicket.Length = (request.JobTicket.Length / Math.Max(request.JobTicket.NumberOfUnits, 1)) *(int)Math.Max(config.ResumeConfig.RemainingUnits, 1); request.JobTicket.NumberOfUnits = (uint)Math.Max(config.ResumeConfig.RemainingUnits, 1); } |
