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
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Tracker|Any CPU = Tracker|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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}.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}.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.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.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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="TrackerSerialNumber" value="TPSP1-010108442534" />
<add key="TrackerSerialNumber" value="TPSP1-010108442544" />
<add key="TrackerFrequency_Hz" value="120" />
<add key="WebSocketPort" value="8001" />
<add key="WebSocketEndpoint" value="/gaze" />
......
......@@ -34,12 +34,23 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</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>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
......
......@@ -18,7 +18,7 @@ namespace GazeWebSocketServer
ConfigurationData.InitializeUnexistingWithDefaults();
ConfigurationData config = ConfigurationData.ParseToObject();
if (args[0] == "-d")
if (args.Length > 0 && args[0] == "-d")
{
Task.Run(() => SimulateGazeData(300));
}
......@@ -55,7 +55,6 @@ namespace GazeWebSocketServer
private static void OnGazeDataAvailable(TobiiEyeTracker sender, GazeData data)
{
Console.WriteLine(data);
if (gazeServer != null && gazeServer.isRunning)
{
gazeServer.Publish(data);
......@@ -69,7 +68,7 @@ namespace GazeWebSocketServer
private static void OnConnectionEstablished(TobiiEyeTracker sender)
{
Console.WriteLine($"Tracker {sender.ToString()} connected.");
Console.WriteLine($"Tracker {sender.SerialNumber} connected.");
ConfigurationData config = ConfigurationData.ParseToObject();
sender.SetTrackingFrequency(config.TrackerFrequency);
}
......
......@@ -16,6 +16,7 @@ namespace TrackerBridge
public event GazeDataHandler GazeDataAvailable;
public Boolean IsConnected { get; private set; }
public String SerialNumber { get => serialNumber; }
private IEyeTracker eyeTracker = null;
private String serialNumber = null;
......@@ -93,6 +94,7 @@ namespace TrackerBridge
}
}
eyeTracker.GazeDataReceived += OnGazeDataReceived;
serialNumber = eyeTracker.SerialNumber;
SetTrackingFrequency(600f);
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