Component updated - displays pump power in %, crash when closing opto-serial port avoided, etc., ver. 2.12.492

This commit is contained in:
Milan Hanajik
2017-03-10 13:47:23 +01:00
parent 87bc0131cf
commit ff4dcc39db
3 changed files with 13 additions and 6 deletions
@@ -474,10 +474,17 @@ namespace TBF.BenchControl.WaterMeters.iPerl
public void StopDevice()
{
if (DebugLevel == DebugMode.Normal && optoSerialPort != null)
{
optoSerialPort.Close();
}
try
{
if (DebugLevel == DebugMode.Normal && optoSerialPort != null)
{
optoSerialPort.Close();
optoSerialPort = null;
}
}
catch
{
}
}
/// <summary>