From 3a17e13224cf2dd6d48deed58dc9713bbb02c10d Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 11 Jun 2020 11:10:39 +0200 Subject: [PATCH] fix div0 for VUMin and warmers config setup tested --- Thermo.Active.NC/NcAdapter.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index d9ed323a..dbd08eca 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1984,11 +1984,7 @@ namespace Thermo.Active.NC // scrivo l'abilitazione dei canali... foreach (var item in RiskBoardConfig) { - // FIXME TODO hard limit a 64... da chiarire - if (item.IdBoard < 64) - { - newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); - } + newData.Add(item.IdBoard, item.NumChannels > 0 ? 1 : 0); } cmsError = numericalControl.PLC_WWarmerConfBoardEnabl(newData); if (cmsError.IsError()) @@ -2005,10 +2001,15 @@ namespace Thermo.Active.NC return cmsError; // recupero parametro VUMin... - ushort VUMin = 1; + ushort VUMin = 1; cmsError = numericalControl.PLC_RWarmerConfVUMin(ref VUMin); if (cmsError.IsError()) return cmsError; + // check div0! + if (VUMin == 0) + { + VUMin = 1; + } // processo corrente minima! var newFloatTData = new Dictionary();