From cd9c24c878501f4d2b74facf94c4212886dc4e1e Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 31 May 2024 11:01:38 +0300 Subject: Air dryer fixed. --- .../Eureka Installer-cache/cacheIndex.txt | Bin 52 -> 52 bytes .../Eureka Installer.aip | 6 +- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 89 +++++++++++---------- .../Tango.Emulations/Emulators/MachineEmulator.cs | 4 + 5 files changed, 55 insertions(+), 46 deletions(-) (limited to 'Software') diff --git a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer-cache/cacheIndex.txt b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer-cache/cacheIndex.txt index a603ff06b..5fe5afe5a 100644 Binary files a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer-cache/cacheIndex.txt and b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer-cache/cacheIndex.txt differ diff --git a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip index 61dbd0ca1..5e12ccbfe 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip @@ -15,10 +15,10 @@ - + - + @@ -682,7 +682,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index a5f3d64a8..9d42d8326 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("2.2.5.0")] +[assembly: AssemblyVersion("2.2.6.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 8507d1e39..0c0497210 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -64,7 +64,7 @@ namespace Tango.PPC.UI.ViewModels public class TimeToDyeValueCollection { - public DateTime StartTime { get; set;} + public DateTime StartTime { get; set; } public List items; public TimeToDyeValueCollection() { @@ -220,7 +220,7 @@ namespace Tango.PPC.UI.ViewModels { get { return GetVolumeLiquidType(LiquidTypes.LightYellow); } } - + //public double TransparentInkOutput //{ // get { return GetVolumeLiquidType(LiquidTypes.TransparentInk); } @@ -267,16 +267,18 @@ namespace Tango.PPC.UI.ViewModels set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); } } - public MachineOverviewErrorStates MachineErrorStates { get; set; } + public MachineOverviewErrorStates MachineErrorStates { get; set; } private bool _isExpandedNotificatios; public bool IsExpandedNotifications { get { return _isExpandedNotificatios; } - set { + set + { _isExpandedNotificatios = value; - RaisePropertyChangedAuto();} + RaisePropertyChangedAuto(); + } } private int _selectedStatisticTabIndex; @@ -361,9 +363,11 @@ namespace Tango.PPC.UI.ViewModels public ShowSetButtonsEnum ShowSetButtons { get { return _showSetButtons; } - set { + set + { _showSetButtons = value; - RaisePropertyChangedAuto();} + RaisePropertyChangedAuto(); + } } @@ -376,10 +380,10 @@ namespace Tango.PPC.UI.ViewModels public RelayCommand AbortCommand { get; set; } public RelayCommand ResumeCommand { get; set; } - public RelayCommand CaancelJobCommand{ get; set; } + public RelayCommand CaancelJobCommand { get; set; } public RelayCommand RestartJobCommand { get; set; } public RelayCommand ClearJobCommand { get; set; } - + public RelayCommand GoToJobCommand { get; set; } @@ -408,7 +412,7 @@ namespace Tango.PPC.UI.ViewModels _productiondata_timer = new DispatcherTimer(); _productiondata_timer.Interval = TimeSpan.FromMinutes(10); _productiondata_timer.Tick += _productiondata_timer_Tick; - + StopCommand = new RelayCommand(StopJob, () => CanStopped()); AbortCommand = new RelayCommand(AbortJob, () => CanStopped()); @@ -417,7 +421,7 @@ namespace Tango.PPC.UI.ViewModels CaancelJobCommand = new RelayCommand(CaancelJob); RestartJobCommand = new RelayCommand(RestartJob, () => MachineProvider.MachineOperator.CanPrint); ClearJobCommand = new RelayCommand(ClearJob); - + GoToJobCommand = new RelayCommand(GoToJob, () => IsEnableGoToJob()); JobStatusViewCommand = new RelayCommand(JobStatusView); @@ -448,15 +452,15 @@ namespace Tango.PPC.UI.ViewModels base.OnApplicationReady(); EventLogger.EventReceived += EventLogger_EventReceived; - MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure ).OrderBy(x => x.PackIndex).Select(x => new JerricanLevelModel() + MidTankLevels = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.HasLevelMeasure).OrderBy(x => x.PackIndex).Select(x => new JerricanLevelModel() { Max = x.MidTankType.LiterCapacity, IDSPack = x, }).OrderBy(y => y.IDSPack.LiquidType.Type).ToList(); var LubLevel = MachineProvider.Machine.Configuration.NoneEmptyIdsPacks.Where(x => x.MidTankType.Type == MidTankTypes.LubricantMidTank).FirstOrDefault(); - + MidTankLubLevel = new JerricanLevelModel(); - if(LubLevel != null) + if (LubLevel != null) { MidTankLubLevel.Max = LubLevel.MidTankType.LiterCapacity; MidTankLubLevel.IDSPack = LubLevel; @@ -479,13 +483,13 @@ namespace Tango.PPC.UI.ViewModels InvokeUI(() => { if (ev.Category == EventTypeCategories.Error || ev.Category == EventTypeCategories.Critical) - { - IsExpandedNotifications = true; - } + { + IsExpandedNotifications = true; + } }); } - private void MachineOperator_MachineStatusChanged(object sender, MachineStatus status) + private void MachineOperator_MachineStatusChanged(object sender, MachineStatus status) { UpdateMidTankLevels(status); UpdateMachineStatusErrors(status); @@ -502,7 +506,8 @@ namespace Tango.PPC.UI.ViewModels model = MidTankLubLevel; } - else { + else + { model = MidTankLevels.SingleOrDefault(x => x.IDSPack.PackIndex == item.Index); } @@ -563,7 +568,7 @@ namespace Tango.PPC.UI.ViewModels // { // model.Level = 4.99; // } - + //} ////////////////////////////// } @@ -595,7 +600,7 @@ namespace Tango.PPC.UI.ViewModels private void _productiondata_timer_Tick(object sender, EventArgs e) { - var CurrentDateTime = DateTime.Now; + var CurrentDateTime = DateTime.Now; } #endregion @@ -613,10 +618,10 @@ namespace Tango.PPC.UI.ViewModels JobResumeManager.JobResumeDropped += JobResumeManager_JobResumeDropped; } - + private void DefaultDiagnosticsFrameProvider_FrameReceived(object sender, PMR.Diagnostics.StartDiagnosticsResponse e) { - OverviewModel.Update(e, this.Job != null ? Job.Rml : null, null); + OverviewModel.Update(e, this.Job != null ? Job.Rml : null, MachineProvider.MachineOperator.CurrentProcessParameters); } private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) @@ -677,11 +682,11 @@ namespace Tango.PPC.UI.ViewModels private void JobHandler_StatusChanged(object sender, RunningJobStatus e) { RunningJobStatus = e; - if(RunningJobStatus != null && RunningJobStatus.IsFailed) + if (RunningJobStatus != null && RunningJobStatus.IsFailed) { ShowSetButtons = ShowSetButtonsEnum.ShowROnErrorsJob; } - else if(RunningJobStatus != null && RunningJobStatus.IsCompleted) + else if (RunningJobStatus != null && RunningJobStatus.IsCompleted) { ShowSetButtons = ShowSetButtonsEnum.ShowOnCompleteJob; } @@ -689,7 +694,7 @@ namespace Tango.PPC.UI.ViewModels IsDyeingProcess = (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null); if (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null) { - if(_runningJobStatus.CurrentSegment.IsInterSegment) + if (_runningJobStatus.CurrentSegment.IsInterSegment) { CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); JobBrushStop = null; @@ -700,17 +705,17 @@ namespace Tango.PPC.UI.ViewModels if (Job.EnableInterSegment && Job.InterSegmentLength > 0) { int segmentIndex = _runningJobStatus.CurrentSegment.SegmentIndex - (Job.EffectiveSegments.Count * RunningJobStatus.CurrentUnit); - if(RunningJobStatus.CurrentUnit > 0) + if (RunningJobStatus.CurrentUnit > 0) { segmentIndex -= RunningJobStatus.CurrentUnit;// inter segment between units } - realsegmIndex = (int)(segmentIndex/2) + 1; + realsegmIndex = (int)(segmentIndex / 2) + 1; } else { realsegmIndex = Math.Max(_runningJobStatus.CurrentSegment.SegmentIndex - (Job.Segments.Count * RunningJobStatus.CurrentUnit), 0); } - + var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == realsegmIndex); if (segment != null) { @@ -814,11 +819,11 @@ namespace Tango.PPC.UI.ViewModels if (Job != null && HasResumeModel) { JobResumeManager.DropResume(Job.Guid); - + } } - private void ResumeJob() + private void ResumeJob() { ShowSetButtons = ShowSetButtonsEnum.ShowDefault; if (Job != null && HasResumeModel) @@ -829,7 +834,7 @@ namespace Tango.PPC.UI.ViewModels private async void StartJob() { - + if (startingJob) return; RunningJobStatus = null; @@ -838,7 +843,7 @@ namespace Tango.PPC.UI.ViewModels { startingJob = true; LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); - + var printConfig = new PrintingConfiguration(); if (HasResumeModel) @@ -851,7 +856,7 @@ namespace Tango.PPC.UI.ViewModels { var handler = await PrintingManager.Print(Job, db, printConfig); } - + startingJob = false; } catch (InsufficientLiquidQuantityException) @@ -881,9 +886,9 @@ namespace Tango.PPC.UI.ViewModels private void RestartJob() { ShowSetButtons = ShowSetButtonsEnum.ShowDefault; - if (Job != null ) + if (Job != null) { - if(HasResumeModel) + if (HasResumeModel) { DropResume(); } @@ -923,13 +928,13 @@ namespace Tango.PPC.UI.ViewModels private void DisplayJobOutline() { - if(_handler != null && _handler.JobTicket != null) + if (_handler != null && _handler.JobTicket != null) { JobOutlineTicket = _handler.JobTicket; IsDisplayJobOutline = true; } } - + #endregion #region graph @@ -977,14 +982,14 @@ namespace Tango.PPC.UI.ViewModels var jobRuns = await db.JobRuns.Where(x => x.StartDate >= starttime).Select(x => new { x.StartDate, x.EndDate, x.EndPosition }).OrderBy(y => y.StartDate).ToListAsync(); double allvalues = 0; graphDyeingValuesCollection.StartTime = starttime; - for ( int i = 0; i < jobRuns.Count; i++) + for (int i = 0; i < jobRuns.Count; i++) { JobController.PushData(jobRuns[i].StartDate, allvalues); if (i > 0) { - allvalues += jobRuns[i-1].EndPosition; + allvalues += jobRuns[i - 1].EndPosition; } - graphDyeingValuesCollection.items.Add( new TimeToDyeValueItem(){ startTime = jobRuns[i].StartDate, endTime = jobRuns[i].EndDate, totalValue = allvalues }); + graphDyeingValuesCollection.items.Add(new TimeToDyeValueItem() { startTime = jobRuns[i].StartDate, endTime = jobRuns[i].EndDate, totalValue = allvalues }); JobController.PushData(jobRuns[i].EndDate, allvalues); } } @@ -1019,7 +1024,7 @@ namespace Tango.PPC.UI.ViewModels { if (Job != null && HasResumeModel) { - // if (await NotificationProvider.ShowQuestion("Drop resume information and enable job editing?")) + // if (await NotificationProvider.ShowQuestion("Drop resume information and enable job editing?")) { JobResumeManager.DropResume(Job.Guid); } diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index bdf915869..7562668d5 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -597,6 +597,10 @@ namespace Tango.Emulations.Emulators { airDryer++; } + else + { + airDryer = 0; + } res.Monitors.EuSpare1.Add(airDryer); -- cgit v1.3.1