Commit 3cdd786a by Stefan Schreistetter

Could not reproduce reconnection bug, most likely the architectural changes…

Could not reproduce reconnection bug, most likely the architectural changes fixed it already. Reconnections work fine now.
parent 27926ae6
...@@ -11,16 +11,21 @@ Global ...@@ -11,16 +11,21 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
Tracker|Any CPU = Tracker|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Release|Any CPU.Build.0 = Release|Any CPU {F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Release|Any CPU.Build.0 = Release|Any CPU
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Tracker|Any CPU.ActiveCfg = Tracker|Any CPU
{F8F11E64-7946-4054-8C27-F0FCAF967F1A}.Tracker|Any CPU.Build.0 = Tracker|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Debug|Any CPU.Build.0 = Debug|Any CPU {64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Release|Any CPU.ActiveCfg = Release|Any CPU {64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Release|Any CPU.Build.0 = Release|Any CPU {64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Release|Any CPU.Build.0 = Release|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Tracker|Any CPU.ActiveCfg = Release|Any CPU
{64D52257-ECA7-4F4D-A901-B14D544A1D0A}.Tracker|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<appSettings> <appSettings>
<add key="TrackerSerialNumber" value="TPSP1-010108442534" /> <add key="TrackerSerialNumber" value="TPSP1-010108442544" />
<add key="TrackerFrequency_Hz" value="120" /> <add key="TrackerFrequency_Hz" value="120" />
<add key="WebSocketPort" value="8001" /> <add key="WebSocketPort" value="8001" />
<add key="WebSocketEndpoint" value="/gaze" /> <add key="WebSocketEndpoint" value="/gaze" />
<add key="DebugFlag" value="false" /> <add key="DebugFlag" value="false" />
</appSettings> </appSettings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
</configuration> </configuration>
\ No newline at end of file
...@@ -34,12 +34,23 @@ ...@@ -34,12 +34,23 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Tracker|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Tracker\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
......
...@@ -18,7 +18,7 @@ namespace GazeWebSocketServer ...@@ -18,7 +18,7 @@ namespace GazeWebSocketServer
ConfigurationData.InitializeUnexistingWithDefaults(); ConfigurationData.InitializeUnexistingWithDefaults();
ConfigurationData config = ConfigurationData.ParseToObject(); ConfigurationData config = ConfigurationData.ParseToObject();
if (args[0] == "-d") if (args.Length > 0 && args[0] == "-d")
{ {
Task.Run(() => SimulateGazeData(300)); Task.Run(() => SimulateGazeData(300));
} }
...@@ -55,7 +55,6 @@ namespace GazeWebSocketServer ...@@ -55,7 +55,6 @@ namespace GazeWebSocketServer
private static void OnGazeDataAvailable(TobiiEyeTracker sender, GazeData data) private static void OnGazeDataAvailable(TobiiEyeTracker sender, GazeData data)
{ {
Console.WriteLine(data);
if (gazeServer != null && gazeServer.isRunning) if (gazeServer != null && gazeServer.isRunning)
{ {
gazeServer.Publish(data); gazeServer.Publish(data);
...@@ -69,7 +68,7 @@ namespace GazeWebSocketServer ...@@ -69,7 +68,7 @@ namespace GazeWebSocketServer
private static void OnConnectionEstablished(TobiiEyeTracker sender) private static void OnConnectionEstablished(TobiiEyeTracker sender)
{ {
Console.WriteLine($"Tracker {sender.ToString()} connected."); Console.WriteLine($"Tracker {sender.SerialNumber} connected.");
ConfigurationData config = ConfigurationData.ParseToObject(); ConfigurationData config = ConfigurationData.ParseToObject();
sender.SetTrackingFrequency(config.TrackerFrequency); sender.SetTrackingFrequency(config.TrackerFrequency);
} }
......
...@@ -16,6 +16,7 @@ namespace TrackerBridge ...@@ -16,6 +16,7 @@ namespace TrackerBridge
public event GazeDataHandler GazeDataAvailable; public event GazeDataHandler GazeDataAvailable;
public Boolean IsConnected { get; private set; } public Boolean IsConnected { get; private set; }
public String SerialNumber { get => serialNumber; }
private IEyeTracker eyeTracker = null; private IEyeTracker eyeTracker = null;
private String serialNumber = null; private String serialNumber = null;
...@@ -93,6 +94,7 @@ namespace TrackerBridge ...@@ -93,6 +94,7 @@ namespace TrackerBridge
} }
} }
eyeTracker.GazeDataReceived += OnGazeDataReceived; eyeTracker.GazeDataReceived += OnGazeDataReceived;
serialNumber = eyeTracker.SerialNumber;
SetTrackingFrequency(600f); SetTrackingFrequency(600f);
ConnectionEvent?.Invoke(this); ConnectionEvent?.Invoke(this);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment