From 0a1400389fc9a30df62dfd1474fd8a0aa1409530 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 15 Jun 2020 09:03:40 +0200 Subject: [PATCH] update try-catch on NcAdapter for status strb/ack --- Thermo.Active.NC/NcAdapter.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index 7ef23791..790b3d0e 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -97,7 +97,12 @@ namespace Thermo.Active.NC bool answ = false; if (statusCmd.Count > 0) { - answ = checkBitOnWord(statusCmd[0], 7); + try + { + answ = checkBitOnWord(statusCmd[0], 7); + } + catch + { } } return answ; } @@ -116,7 +121,12 @@ namespace Thermo.Active.NC bool answ = false; if (statusCmd.Count > 0) { - answ = checkBitOnWord(statusCmd[0], 8); + try + { + answ = checkBitOnWord(statusCmd[0], 8); + } + catch + { } } return answ; }