From ffd24f25398c04a7698ea58dc532fc43fc75e6bb Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 23 Sep 2020 20:03:11 +0200 Subject: [PATCH] COmpletata gestione dll core assi thermo --- .../DTOModels/ThAxes/DTOAxisInfoModel.cs | 13 ++++++++++++- Thermo.Active/Listeners/SignalR/SignalRListener.cs | 12 ------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Thermo.Active.Model/DTOModels/ThAxes/DTOAxisInfoModel.cs b/Thermo.Active.Model/DTOModels/ThAxes/DTOAxisInfoModel.cs index afd00dc6..60e190d2 100644 --- a/Thermo.Active.Model/DTOModels/ThAxes/DTOAxisInfoModel.cs +++ b/Thermo.Active.Model/DTOModels/ThAxes/DTOAxisInfoModel.cs @@ -58,6 +58,16 @@ namespace Thermo.Active.Model.DTOModels.ThAxes if (name != item.name) return false; + if (Math.Round(Math.Abs(position - item.position), 3) >= Constants.EPSILON) + return false; + + if (Math.Round(Math.Abs(speed - item.speed), 3) >= Constants.EPSILON) + return false; + + if (Math.Round(Math.Abs(load - item.load), 3) >= Constants.EPSILON) + return false; + +#if false if (position != item.position) return false; @@ -65,7 +75,8 @@ namespace Thermo.Active.Model.DTOModels.ThAxes return false; if (load != item.load) - return false; + return false; +#endif if (errorCode != item.errorCode) return false; diff --git a/Thermo.Active/Listeners/SignalR/SignalRListener.cs b/Thermo.Active/Listeners/SignalR/SignalRListener.cs index a93e70f6..1f28a167 100644 --- a/Thermo.Active/Listeners/SignalR/SignalRListener.cs +++ b/Thermo.Active/Listeners/SignalR/SignalRListener.cs @@ -464,18 +464,6 @@ namespace Thermo.Active.Listeners.SignalR var context = GlobalHost.ConnectionManager.GetHubContext(); context.Clients.Group("ncData").axisInfo(diffData); } - -#if false - if (!LastAxisInfoData.Equals(currInfoAxes)) - { - LastAxisInfoData = currInfoAxes; - var context = GlobalHost.ConnectionManager.GetHubContext(); - - - // fare confronto 1:1 --> se variato --> invio (come SendThermoRecipeFullData) - context.Clients.Group("ncData").axisInfo(currInfoAxes); - } -#endif } public static void SetGatewayRebootStatus(object status)