diff --git a/THermo.Active.Thermocamera/Thermo.Active.Thermocamera.csproj b/THermo.Active.Thermocamera/Thermo.Active.Thermocamera.csproj
index 50920185..aef09dff 100644
--- a/THermo.Active.Thermocamera/Thermo.Active.Thermocamera.csproj
+++ b/THermo.Active.Thermocamera/Thermo.Active.Thermocamera.csproj
@@ -51,6 +51,14 @@
MinimumRecommendedRules.ruleset
+
+ False
+ ..\..\..\..\..\..\Program Files (x86)\FLIR Systems\FLIR Atlas SDK 6\bin\x86\Flir.Atlas.Image.dll
+
+
+ False
+ ..\..\..\..\..\..\Program Files (x86)\FLIR Systems\FLIR Atlas SDK 6\bin\x86\Flir.Atlas.Live.dll
+
diff --git a/THermo.Active.Thermocamera/ThermoCamComunicator.cs b/THermo.Active.Thermocamera/ThermoCamComunicator.cs
index ef1ef7ef..438286ac 100644
--- a/THermo.Active.Thermocamera/ThermoCamComunicator.cs
+++ b/THermo.Active.Thermocamera/ThermoCamComunicator.cs
@@ -1,4 +1,5 @@
-using System;
+using Flir.Atlas.Live.Device;
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -26,6 +27,11 @@ namespace Thermo.Active.Thermocamera
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
+ ///
+ /// Indica se la camera sia connessa
+ ///
+ public bool CameraIsConnected = false;
+
#endregion Public Fields
#region Public Constructors
@@ -33,12 +39,15 @@ namespace Thermo.Active.Thermocamera
///
/// Init classe
///
- /// Indica aabilitazione alive straming vs load dati storici
+ /// Indica aabilitazione a live straming vs load dati storici
public ThermoCamComunicator(bool isLive)
{
// init classe controllo camera
TCamLive = new TCContr($"{Constants.WEBSITE_DIRECTORY}\\{Constants.THERMO_DATA_FOLDER}", $"{BASE_PATH}\\{Constants.CONFIG_DIRECTORY}");
+ // aggancio evento connesisone/disconnessione
+ TCamLive.eh_CameraConnStatusChanged += TCamLive_eh_CameraConnStatusChanged;
+
// avvio classe gestione thermocamera...
TCamLive.tryReloadConf();
@@ -49,6 +58,12 @@ namespace Thermo.Active.Thermocamera
}
}
+ private void TCamLive_eh_CameraConnStatusChanged(object sender, Flir.Atlas.Live.ConnectionStatusChangedEventArgs e)
+ {
+ // salvo stato connessione
+ CameraIsConnected = e.Status == ConnectionStatus.Connected;
+ }
+
#endregion Public Constructors
#region Protected Methods
diff --git a/Thermo.Active.Core/ThreadsFunctions.cs b/Thermo.Active.Core/ThreadsFunctions.cs
index a42ef5de..61276672 100644
--- a/Thermo.Active.Core/ThreadsFunctions.cs
+++ b/Thermo.Active.Core/ThreadsFunctions.cs
@@ -394,6 +394,9 @@ public static class ThreadsFunctions
ncAdapter.SendTCamImageReadyStrb();
}
}
+
+ // salvo status thermocam...
+ NcAdapter.cameraIsConnected = TCCom.CameraIsConnected;
}
else
RestoreConnection();
diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs
index 9c65ca4b..8e677335 100644
--- a/Thermo.Active.NC/NcAdapter.cs
+++ b/Thermo.Active.NC/NcAdapter.cs
@@ -135,6 +135,11 @@ namespace Thermo.Active.NC
///
public NcThermo numericalControl;
+ ///
+ /// Indica se la FLIR camera è connessa
+ ///
+ public static bool cameraIsConnected = false;
+
#endregion Public Fields
#region Public Constructors