diff --git a/Thermo.Active.Model/DTOModels/ThModules/DTOModule.cs b/Thermo.Active.Model/DTOModels/ThModules/DTOModule.cs deleted file mode 100644 index d62d74cf..00000000 --- a/Thermo.Active.Model/DTOModels/ThModules/DTOModule.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System.Collections.Generic; - -namespace Thermo.Active.Model.DTOModels.ThModules -{ - public class DTOModule - { - public int Id { get; set; } = 0; - public int ActualDuration { get; set; } = 0; - public int ActualDelay { get; set; } = 0; - public int EstimDuration { get; set; } = 0; - public int EstimDelay { get; set; } = 0; - public List PrevModId { get; set; } = new List(); - public RBStatus Status { get; set; } - - public override bool Equals(object obj) - { - if (!(obj is DTOModule item)) - return false; - - if (Id != item.Id) - return false; - if (ActualDuration != item.ActualDuration) - return false; - if (ActualDelay != item.ActualDelay) - return false; - if (PrevModId != item.PrevModId) - return false; - if (EstimDelay != item.EstimDelay) - return false; - if (!Status.Equals(item.Status)) - return false; - - return true; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - } - - public struct RBStatus - { - public bool Visible { get; set; } - public bool Executing { get; set; } - public bool HasError { get; set; } - public override bool Equals(object obj) - { - if (!(obj is RBStatus item)) - return false; - - if (Visible != item.Visible) - return false; - if (Executing != item.Executing) - return false; - if (HasError != item.HasError) - return false; - - return true; - } - - public override int GetHashCode() - { - return base.GetHashCode(); - } - } -} diff --git a/Thermo.Active.Model/DTOModels/ThModules/DTOModuleConfigModel.cs b/Thermo.Active.Model/DTOModels/ThModules/DTOModuleConfigModel.cs deleted file mode 100644 index 7664def6..00000000 --- a/Thermo.Active.Model/DTOModels/ThModules/DTOModuleConfigModel.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace Thermo.Active.Model.DTOModels.ThModules -{ - public class DTOModuleConfigModel - { - public int Id; - public string Label; - public BlockType Type; - public BlockSection Section; - public int IdMainParam = -1; // -1 = non visibile la parte a DX - public bool DelayVisible; - public int VisualPriority; - } - - public enum BlockType - { - HEATING, - DRAWING, - MOVEMENT, - VACUUM, - COOLING, - EXTRACTION - } - public enum BlockSection - { - HEATING, - FORMING, - EXTRACTION - } -} diff --git a/Thermo.Active.Model/Thermo.Active.Model.csproj b/Thermo.Active.Model/Thermo.Active.Model.csproj index d557dbae..36c2ef50 100644 --- a/Thermo.Active.Model/Thermo.Active.Model.csproj +++ b/Thermo.Active.Model/Thermo.Active.Model.csproj @@ -106,8 +106,6 @@ - - diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 45509484..e8c90fdc 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -2149,10 +2149,12 @@ namespace Thermo.Active.NC IdParam = item.IdParam, ShowDelay = item.ShowDelay, Priority = item.Priority, - ActualDelay = currModule.ActualDelay, - ActualDuration = currModule.ActualDuration, - EstimatedDelay = currModule.EstimatedDelay, - EstimatedDuration = currModule.EstimatedDuration, + ScaleFactor = item.ScaleFactor, + NumDec = item.NumDec, + ActualDelay = (double)currModule.ActualDelay / item.ScaleFactor, + ActualDuration = (double)currModule.ActualDuration / item.ScaleFactor, + EstimatedDelay = (double)currModule.EstimatedDelay / item.ScaleFactor, + EstimatedDuration = (double)currModule.EstimatedDuration / item.ScaleFactor, PrecedingId = currModule.PrecedingId, Visible = currModule.Visible, Running = currModule.Running, @@ -2160,10 +2162,8 @@ namespace Thermo.Active.NC }; currModules.Add(item.Id, currVal); } - catch (Exception exc) - { - // FIXME TODO... - } + catch + { } } } return libraryError;