diff --git a/MTC_Adapter/MTC_Adapter/AdapterESA.cs b/MTC_Adapter/MTC_Adapter/AdapterESA.cs index af08d19..3b5f864 100644 --- a/MTC_Adapter/MTC_Adapter/AdapterESA.cs +++ b/MTC_Adapter/MTC_Adapter/AdapterESA.cs @@ -498,12 +498,21 @@ namespace MTC_Adapter } else if (mapIOT_Byte[i].varName.StartsWith("IOT_EXEC_A_")) { - // salvo SOLO SE ha bit = 1.. - if (((StFlag8)currByte).HasFlag((StFlag8)Math.Pow(2, bitNum))) + // recupero NUMERO + try { - // salvo area selezionata! - progAreaSel = bitNum + 1; - currProgName = vettMemArea[bitNum].mMemAreaProgName.Value.ToString(); + numero = Convert.ToInt32(mapIOT_Byte[i].varName.Replace("IOT_VAC_", "")); + // salvo SOLO SE ha bit = 1.. + if (((StFlag8)currByte).HasFlag((StFlag8)Math.Pow(2, bitNum))) + { + // salvo area selezionata! + progAreaSel = numero; + currProgName = vettMemArea[numero - 1].mMemAreaProgName.Value.ToString(); + } + } + catch (Exception exc) + { + lg.Error(exc, "Errore in decodifica " + mapIOT_Byte[i].varName); } } else if (mapIOT_Byte[i].varName.StartsWith("IOT_VAC_")) diff --git a/MTC_Adapter/MTC_Adapter/Resources/SCM/IOT_ByteList.map b/MTC_Adapter/MTC_Adapter/Resources/SCM/IOT_ByteList.map index c8e3ad5..9f804bd 100644 --- a/MTC_Adapter/MTC_Adapter/Resources/SCM/IOT_ByteList.map +++ b/MTC_Adapter/MTC_Adapter/Resources/SCM/IOT_ByteList.map @@ -11,10 +11,10 @@ 1.1|IOT_EXEC_A_02 |BOOL 1.2|IOT_EXEC_A_03 |BOOL 1.3|IOT_EXEC_A_04 |BOOL -1.4|libero |BOOL -1.5|libero |BOOL -1.6|libero |BOOL -1.7|libero |BOOL +1.4|IOT_VAC_01 |BOOL +1.5|IOT_VAC_02 |BOOL +1.6|IOT_VAC_03 |BOOL +1.7|IOT_VAC_04 |BOOL 002|libero |BYTE 003|IOT_MODECN |BYTE 004|IOT_OVRF |BYTE